From e33e2b7d7950bdf4440580ab759fe79c45e1ba07 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Mon, 17 Mar 2008 23:02:23 +0000 Subject: [PATCH] Compilation fix. gshadow_locked should only be used if SHADOWGRP is defined. --- ChangeLog | 5 +++++ src/gpasswd.c | 2 ++ src/groupmod.c | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cc181faa..13704f93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-03-17 Nicolas François + + * src/gpasswd.c, src/groupmod.c: Compilation fix. gshadow_locked + should only be used if SHADOWGRP is defined. + 2008-03-17 Nicolas François * src/grpck.c: Fix some warnings. compare_members_lists() is only diff --git a/src/gpasswd.c b/src/gpasswd.c index f5b42b72..f7738d02 100644 --- a/src/gpasswd.c +++ b/src/gpasswd.c @@ -156,9 +156,11 @@ static void fail_exit (int status) if (group_locked) { gr_unlock (); } +#ifdef SHADOWGRP if (gshadow_locked) { sgr_unlock (); } +#endif exit (status); } diff --git a/src/groupmod.c b/src/groupmod.c index 67b407a7..274c3adb 100644 --- a/src/groupmod.c +++ b/src/groupmod.c @@ -66,7 +66,7 @@ #ifdef SHADOWGRP static int is_shadow_grp; static int gshadow_locked = 0; -#endif +#endif /* SHADOWGRP */ static int group_locked = 0; static int passwd_locked = 0; static char *group_name; @@ -123,9 +123,11 @@ static void fail_exit (int status) if (group_locked) { gr_unlock (); } +#ifdef SHADOWGRP if (gshadow_locked) { sgr_unlock (); } +#endif /* SHADOWGRP */ if (passwd_locked) { pw_unlock(); }