summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjkar8572 <jkar8572>2005-09-13 15:54:01 +0000
committerjkar8572 <jkar8572>2005-09-13 15:54:01 +0000
commit447597643f3c5a642ab8258477fa17e5b07fed41 (patch)
treea46ef176fbf83d3690674d791f5236c2c4502e14
parentadb7d506c74944fc76a140f7995323ad130092e8 (diff)
downloadlinuxquota-447597643f3c5a642ab8258477fa17e5b07fed41.tar.gz
Fix handling of UID and GID - they are unsigned. (Matthew Kent)
-rw-r--r--Changelog1
-rw-r--r--quota.c6
-rw-r--r--quotasys.c4
3 files changed, 6 insertions, 5 deletions
diff --git a/Changelog b/Changelog
index 7984e06..5927860 100644
--- a/Changelog
+++ b/Changelog
@@ -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)
diff --git a/quota.c b/quota.c
index 2ac58e0..c5e3f09 100644
--- a/quota.c
+++ b/quota.c
@@ -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"),
diff --git a/quotasys.c b/quotasys.c
index 0875ef6..d3399c3 100644
--- a/quotasys.c
+++ b/quotasys.c
@@ -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))) {