version 1.22, 2003/06/03 02:56:14 |
version 1.23, 2003/06/10 22:20:49 |
|
|
int vflag; |
int vflag; |
|
|
int |
int |
main(argc, argv) |
main(int argc, char *argv[]) |
int argc; |
|
char *argv[]; |
|
{ |
{ |
int ngroups; |
int ngroups; |
gid_t mygid, gidset[NGROUPS]; |
gid_t mygid, gidset[NGROUPS]; |
|
|
} |
} |
|
|
void |
void |
usage() |
usage(void) |
{ |
{ |
|
|
fprintf(stderr, "%s\n%s\n%s\n", |
fprintf(stderr, "%s\n%s\n%s\n", |
|
|
* Print out quotas for a specified user identifier. |
* Print out quotas for a specified user identifier. |
*/ |
*/ |
void |
void |
showuid(uid) |
showuid(uid_t uid) |
uid_t uid; |
|
{ |
{ |
struct passwd *pwd = getpwuid(uid); |
struct passwd *pwd = getpwuid(uid); |
uid_t myuid; |
uid_t myuid; |
|
|
* Print out quotas for a specified user name. |
* Print out quotas for a specified user name. |
*/ |
*/ |
void |
void |
showusrname(name) |
showusrname(const char *name) |
const char *name; |
|
{ |
{ |
struct passwd *pwd = getpwnam(name); |
struct passwd *pwd = getpwnam(name); |
uid_t myuid; |
uid_t myuid; |
|
|
* Print out quotas for a specified group identifier. |
* Print out quotas for a specified group identifier. |
*/ |
*/ |
void |
void |
showgid(gid) |
showgid(gid_t gid) |
gid_t gid; |
|
{ |
{ |
struct group *grp = getgrgid(gid); |
struct group *grp = getgrgid(gid); |
int ngroups; |
int ngroups; |
|
|
* Print out quotas for a specified group name. |
* Print out quotas for a specified group name. |
*/ |
*/ |
void |
void |
showgrpname(name) |
showgrpname(const char *name) |
const char *name; |
|
{ |
{ |
struct group *grp = getgrnam(name); |
struct group *grp = getgrnam(name); |
int ngroups; |
int ngroups; |
|
|
} |
} |
|
|
void |
void |
showquotas(type, id, name) |
showquotas(int type, u_long id, const char *name) |
int type; |
|
u_long id; |
|
const char *name; |
|
{ |
{ |
struct quotause *qup; |
struct quotause *qup; |
struct quotause *quplist; |
struct quotause *quplist; |
|
|
} |
} |
|
|
void |
void |
heading(type, id, name, tag) |
heading(int type, u_long id, const char *name, const char *tag) |
int type; |
|
u_long id; |
|
const char *name, *tag; |
|
{ |
{ |
|
|
printf("Disk quotas for %s %s (%cid %ld): %s\n", qfextension[type], |
printf("Disk quotas for %s %s (%cid %ld): %s\n", qfextension[type], |
|
|
* Calculate the grace period and return a printable string for it. |
* Calculate the grace period and return a printable string for it. |
*/ |
*/ |
char * |
char * |
timeprt(seconds) |
timeprt(time_t seconds) |
time_t seconds; |
|
{ |
{ |
time_t hours, minutes; |
time_t hours, minutes; |
static char buf[20]; |
static char buf[20]; |
|
|
* Collect the requested quota information. |
* Collect the requested quota information. |
*/ |
*/ |
struct quotause * |
struct quotause * |
getprivs(id, quotatype) |
getprivs(long id, int quotatype) |
long id; |
|
int quotatype; |
|
{ |
{ |
struct quotause *qup, *quptail; |
struct quotause *qup, *quptail; |
struct fstab *fs; |
struct fstab *fs; |
|
|
* Check to see if a particular quota is to be enabled. |
* Check to see if a particular quota is to be enabled. |
*/ |
*/ |
int |
int |
ufshasquota(fs, type, qfnamep) |
ufshasquota(struct fstab *fs, int type, char **qfnamep) |
struct fstab *fs; |
|
int type; |
|
char **qfnamep; |
|
{ |
{ |
static char initname, usrname[100], grpname[100]; |
static char initname, usrname[100], grpname[100]; |
static char buf[BUFSIZ]; |
static char buf[BUFSIZ]; |
|
|
} |
} |
|
|
int |
int |
getufsquota(fst, fs, qup, id, quotatype) |
getufsquota(struct statfs *fst, struct fstab *fs, struct quotause *qup, |
struct statfs *fst; |
long id, int quotatype) |
struct fstab *fs; |
|
struct quotause *qup; |
|
long id; |
|
int quotatype; |
|
{ |
{ |
char *qfpathname; |
char *qfpathname; |
int fd, qcmd; |
int fd, qcmd; |
|
|
} |
} |
|
|
int |
int |
getnfsquota(fst, fs, qup, id, quotatype) |
getnfsquota(struct statfs *fst, struct fstab *fs, struct quotause *qup, |
struct statfs *fst; |
long id, int quotatype) |
struct fstab *fs; |
|
struct quotause *qup; |
|
long id; |
|
int quotatype; |
|
{ |
{ |
struct getquota_args gq_args; |
struct getquota_args gq_args; |
struct getquota_rslt gq_rslt; |
struct getquota_rslt gq_rslt; |
|
|
} |
} |
|
|
int |
int |
callaurpc(host, prognum, versnum, procnum, inproc, in, outproc, out) |
callaurpc(char *host, int prognum, int versnum, int procnum, |
char *host; |
xdrproc_t inproc, void *in, xdrproc_t outproc, void *out) |
int prognum, versnum, procnum; |
|
xdrproc_t inproc; |
|
void *in; |
|
xdrproc_t outproc; |
|
void *out; |
|
{ |
{ |
struct sockaddr_in server_addr; |
struct sockaddr_in server_addr; |
enum clnt_stat clnt_stat; |
enum clnt_stat clnt_stat; |
|
|
} |
} |
|
|
int |
int |
alldigits(s) |
alldigits(char *s) |
char *s; |
|
{ |
{ |
int c; |
int c; |
|
|