/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.8 */
/*
* acctdusg [-u file] [-p file] > dtmp-file
* -u file for names of files not charged to anyone
* -p get password info from file
* reads std input (normally from find / -print)
* and computes disk resource consumption by login
*/
#include <stdio.h>
#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <libcmdutils.h>
#include "acctdef.h"
struct disk {
};
static void openerr(char *);
static void output(void);
static void charge(char *);
#ifdef DEBUG
static void pdisk(void);
#endif
int
{
int c;
switch (c) {
case 'u':
break;
case 'p':
break;
default:
exit(1);
}
}
if (pfile) {
}
/* fill usglist with the user's in the passwd file */
}
}
/* charge the files listed in names to users listed in the usglist */
/*
* replace the newline char at the end of the
* filename with a null character
*/
*fb = '\0';
}
}
output();
if (nchrg)
#ifdef DEBUG
pdisk();
#endif
return (0);
}
/*
* create a new entry and insert.
*/
static struct disk *
{
"for hash table entry\n");
exit(1);
}
return (curdisk);
}
/*
* return the disk entry for given uid. return NULL if not found.
*/
static struct disk *
{
return (curdisk);
}
}
return (NULL);
}
static void
{
exit(1);
}
static void
output(void)
{
int index;
(void) printf("%ld\t%s\t%lld\n",
}
}
}
}
/*
* Initialize the disk entry for a valid passwd entry.
*/
static void
{
}
static void
charge(char *n)
{
return;
/*
* do not count the duplicate entries.
*/
case 0:
/* already exist */
return;
case 1:
/* added */
break;
default:
perror("acctdusg");
exit(1);
}
}
/*
*/
/*
* If -p is given, we've all loaded the passwd entries.
* Files with unknown uid should go into nchrg. Otherwise
* (without -p), we try creating new entry for the uid.
*/
}
}
}
} else if (nchrg) {
}
}
#ifdef DEBUG
static void
pdisk()
{
int index;
}
}
}
#endif