diff options
author | jkar8572 <jkar8572> | 2005-09-13 15:54:01 +0000 |
---|---|---|
committer | jkar8572 <jkar8572> | 2005-09-13 15:54:01 +0000 |
commit | 447597643f3c5a642ab8258477fa17e5b07fed41 (patch) | |
tree | a46ef176fbf83d3690674d791f5236c2c4502e14 | |
parent | adb7d506c74944fc76a140f7995323ad130092e8 (diff) | |
download | linuxquota-447597643f3c5a642ab8258477fa17e5b07fed41.tar.gz |
Fix handling of UID and GID - they are unsigned. (Matthew Kent)
-rw-r--r-- | Changelog | 1 | ||||
-rw-r--r-- | quota.c | 6 | ||||
-rw-r--r-- | quotasys.c | 4 |
3 files changed, 6 insertions, 5 deletions
@@ -1,4 +1,5 @@ Changes in quota-tools from 3.13 to 3.14 +* made UID/GID prints unsigned (Matthew Kent) * fixed very verbose printing for quotacheck (Jan Kara) * fixed off-by-one bug in mount options parsing (Jan Kara) * implemented nicer message formatting for warnquota(8) (Jan Kara) @@ -34,7 +34,7 @@ #ident "$Copyright: (c) 1980, 1990 Regents of the University of California. $" #ident "$Copyright: All rights reserved. $" -#ident "$Id: quota.c,v 1.16 2005/07/19 15:09:07 jkar8572 Exp $" +#ident "$Id: quota.c,v 1.17 2005/09/13 15:54:01 jkar8572 Exp $" /* * Disk quota reporting program. @@ -274,8 +274,8 @@ int showquotas(int type, qid_t id) void heading(int type, qid_t id, char *name, char *tag) { - printf(_("Disk quotas for %s %s (%cid %d): %s\n"), type2name(type), - name, *type2name(type), id, tag); + printf(_("Disk quotas for %s %s (%cid %u): %s\n"), type2name(type), + name, *type2name(type), (uint) id, tag); if (!(flags & FL_QUIET) && !tag[0]) { printf("%15s%8s %7s%8s%8s%8s %7s%8s%8s\n", _("Filesystem"), _("blocks"), _("quota"), _("limit"), _("grace"), @@ -97,7 +97,7 @@ uid_t user2uid(char *name, int *err) if (err) *err = 0; - ret = strtol(name, &errch, 0); + ret = strtoul(name, &errch, 0); if (!*errch) /* Is name number - we got directly uid? */ return ret; if (!(entry = getpwnam(name))) { @@ -124,7 +124,7 @@ gid_t group2gid(char *name, int *err) if (err) *err = 0; - ret = strtol(name, &errch, 0); + ret = strtoul(name, &errch, 0); if (!*errch) /* Is name number - we got directly gid? */ return ret; if (!(entry = getgrnam(name))) { |