diff options
-rw-r--r-- | Changelog | 2 | ||||
-rw-r--r-- | edquota.c | 19 | ||||
-rw-r--r-- | po/fr.po | 8 | ||||
-rw-r--r-- | po/pl.po | 4 | ||||
-rw-r--r-- | setquota.c | 2 |
5 files changed, 22 insertions, 13 deletions
@@ -1,4 +1,6 @@ Changes in quota-tools from 3.16 to 3.17 +* some typos fixes (Matthew Boyle) +* fixed possible segfault when unpriviledged user run edquota (Matthew Boyle) * fixed format strings to use "%llu" and "%lld" instead of "%Lu" and "%Ld" (Ladislav Michnovic) * removed ssl, resolv, lber from the list of LDAP libraries since we don't need them directly (Jan Kara) * added limits.h include to quota_nld (Jan Kara) @@ -34,7 +34,7 @@ #ident "$Copyright: (c) 1980, 1990 Regents of the University of California. $" #ident "$Copyright: All rights reserved. $" -#ident "$Id: edquota.c,v 1.22 2007/09/18 16:21:07 jkar8572 Exp $" +#ident "$Id: edquota.c,v 1.23 2008/04/28 10:25:37 jkar8572 Exp $" /* * Disk quota editor. @@ -181,7 +181,7 @@ int parse_options(int argc, char **argv) if (((flags & FL_EDIT_PERIOD) && argc != 0) || ((flags & FL_EDIT_TIMES) && argc < 1)) usage(); if ((flags & (FL_EDIT_PERIOD | FL_EDIT_TIMES)) && protoname) { - errstr(_("Prototype name does not make sence when editting grace period or times.\n")); + errstr(_("Prototype name does not make sense when editing grace period or times.\n")); usage(); } return optind; @@ -196,8 +196,11 @@ void copy_prototype(int argc, char **argv, struct quota_handle **handles) protoid = name2id(protoname, quotatype, !!(flags & FL_NUMNAMES), NULL); protoprivs = getprivs(protoid, handles, 0); while (argc-- > 0) { - id = name2id(*argv++, quotatype, !!(flags & FL_NUMNAMES), NULL); + id = name2id(*argv, quotatype, !!(flags & FL_NUMNAMES), NULL); curprivs = getprivs(id, handles, 0); + if (!curprivs) + die(1, _("Cannot get quota information for user %s\n"), *argv); + argv++; for (pprivs = protoprivs, cprivs = curprivs; pprivs && cprivs; pprivs = pprivs->dq_next, cprivs = cprivs->dq_next) { @@ -276,7 +279,7 @@ int main(int argc, char **argv) ret = -1; } if (editprivs(tmpfil) < 0) { - errstr(_("Error while editting grace times.\n")); + errstr(_("Error while editing grace times.\n")); ret = -1; } if (readtimes(handles, tmpfd) < 0) { @@ -288,13 +291,15 @@ int main(int argc, char **argv) for (; argc > 0; argc--, argv++) { id = name2id(*argv, quotatype, !!(flags & FL_NUMNAMES), NULL); curprivs = getprivs(id, handles, 0); + if (!curprivs) + die(1, _("Cannot get quota information for user %s.\n"), *argv); if (writeindividualtimes(curprivs, tmpfd, *argv, quotatype) < 0) { errstr(_("Cannot write individual grace times to file.\n")); ret = -1; continue; } if (editprivs(tmpfil) < 0) { - errstr(_("Error while editting individual grace times.\n")); + errstr(_("Error while editing individual grace times.\n")); ret = -1; continue; } @@ -312,13 +317,15 @@ int main(int argc, char **argv) for (; argc > 0; argc--, argv++) { id = name2id(*argv, quotatype, !!(flags & FL_NUMNAMES), NULL); curprivs = getprivs(id, handles, 0); + if (!curprivs) + die(1, _("Cannot get quota information for user %s.\n"), *argv); if (writeprivs(curprivs, tmpfd, *argv, quotatype) < 0) { errstr(_("Cannot write quotas to file.\n")); ret = -1; continue; } if (editprivs(tmpfil) < 0) { - errstr(_("Error while editting quotas.\n")); + errstr(_("Error while editing quotas.\n")); ret = -1; continue; } @@ -175,7 +175,7 @@ msgid "Can't write grace times to file.\n" msgstr "Impossible d'écrire les temps de sursis dans le fichier.\n" #: edquota.c:204 -msgid "Error while editting grace times.\n" +msgid "Error while editing grace times.\n" msgstr "Erreur lors de la modification des temps de sursis.\n" #: edquota.c:208 @@ -187,7 +187,7 @@ msgid "Can't write individual grace times to file.\n" msgstr "Impossible d'écrire les temps de sursis individuels dans le fichier.\n" #: edquota.c:220 -msgid "Error while editting individual grace times.\n" +msgid "Error while editing individual grace times.\n" msgstr "Erreur lors de la modification des temps de sursis individuels.\n" #: edquota.c:224 @@ -199,7 +199,7 @@ msgid "Can't write quotas to file.\n" msgstr "Impossible d'écrire les quotas dans le fichier.\n" #: edquota.c:240 -msgid "Error while editting quotas.\n" +msgid "Error while editing quotas.\n" msgstr "Erreur lors de la modification des quotas.\n" #: edquota.c:244 @@ -1833,7 +1833,7 @@ msgid "Group and user quotas can't be used together.\n" msgstr "Les quotas groupes et utilisateurs ne peuvent pas ętre utilisés simultanément.\n" #: setquota.c:137 -msgid "Prototype user has no sense when editting grace times.\n" +msgid "Prototype user has no sense when editing grace times.\n" msgstr "Un prototype d'utilisateur n'a pas lieu d'ętre pour la modification des temps de sursis.\n" #: setquota.c:158 @@ -192,7 +192,7 @@ msgid "Bugs to: %s\n" msgstr "Błędy na adres: %s\n" #: edquota.c:178 -msgid "Prototype name does not make sence when editting grace period or times.\n" +msgid "Prototype name does not make sense when editing grace period or times.\n" msgstr "Wzorcowy użytkownik nie ma sensu przy edycji okresów pobłażliwości.\n" #: edquota.c:199 @@ -2277,7 +2277,7 @@ msgid "Group and user quotas cannot be used together.\n" msgstr "Limity grupy i użytkownika nie mogą być użyte razem.\n" #: setquota.c:174 -msgid "Prototype user has no sense when editting grace times.\n" +msgid "Prototype user has no sense when editing grace times.\n" msgstr "Wzorcowy użytkownik nie ma sensu przy edycji okresów pobłażliwości.\n" #: setquota.c:178 @@ -184,7 +184,7 @@ static void parse_options(int argcnt, char **argstr) usage(); } if (flags & FL_PROTO && flags & FL_GRACE) { - errstr(_("Prototype user has no sense when editting grace times.\n")); + errstr(_("Prototype user has no sense when editing grace times.\n")); usage(); } if (flags & FL_INDIVIDUAL_GRACE && flags & FL_GRACE) { |