From: Thorsten Kukuk Date: Mon, 21 Feb 2005 09:52:05 +0000 (+0000) Subject: Relevant BUGIDs: mail X-Git-Tag: Linux-PAM-0-79~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e5a337d397e46f65a4704014d8434c22497588c;p=linux-pam Relevant BUGIDs: mail Purpose of commit: bugfix Commit summary: --------------- The following reported by mail was fixed: "I've been in trouble using the '%group' feature in the limits.conf file. There are priorities when settings the limits and the order is as enumerated here. The problem is that the initial value is LIMITS_DEF_NONE, so neither LIMITS_DEF_ALL nor LIMITS_DEF_ALLGROUP can ever be set." --- diff --git a/CHANGELOG b/CHANGELOG index 38b21696..9ae5d7a3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -82,6 +82,7 @@ BerliOS Bugs are marked with (BerliOS #XXXX). avoid seg.faults (kukuk) * pam_shells: correct README * libpam: Fix debug code (kukuk) +* pam_limits: Fix order of LIMITS_DEF_* priorities (kukuk) 0.78: Do Nov 18 14:48:36 CET 2004 diff --git a/modules/pam_limits/pam_limits.c b/modules/pam_limits/pam_limits.c index 9ba19843..1482833a 100644 --- a/modules/pam_limits/pam_limits.c +++ b/modules/pam_limits/pam_limits.c @@ -44,19 +44,19 @@ #define LIMITS_DEF_USER 0 /* limit was set by an user entry */ #define LIMITS_DEF_GROUP 1 /* limit was set by a group entry */ -#define LIMITS_DEF_DEFAULT 2 /* limit was set by an default entry */ -#define LIMITS_DEF_NONE 3 /* this limit was not set yet */ -#define LIMITS_DEF_ALL 4 /* limit was set by an default entry */ -#define LIMITS_DEF_ALLGROUP 5 /* limit was set by a group entry */ +#define LIMITS_DEF_ALLGROUP 2 /* limit was set by a group entry */ +#define LIMITS_DEF_ALL 3 /* limit was set by an default entry */ +#define LIMITS_DEF_DEFAULT 4 /* limit was set by an default entry */ +#define LIMITS_DEF_NONE 5 /* this limit was not set yet */ static const char *limits_def_names[] = { "USER", "GROUP", + "ALLGROUP", + "ALL", "DEFAULT", "NONE", - "ALL", - "ALLGROUP", - NULL, + NULL }; struct user_limits_struct {