]> granicus.if.org Git - shadow/commitdiff
Compilation fix. gshadow_locked should only be used if SHADOWGRP is defined.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 17 Mar 2008 23:02:23 +0000 (23:02 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 17 Mar 2008 23:02:23 +0000 (23:02 +0000)
ChangeLog
src/gpasswd.c
src/groupmod.c

index cc181faa9424daf7e2bc0f15b9b75c38b5246473..13704f9309d1c984e845000e8a0208eed7899edb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-17  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * src/gpasswd.c, src/groupmod.c: Compilation fix. gshadow_locked
+       should only be used if SHADOWGRP is defined.
+
 2008-03-17  Nicolas François  <nicolas.francois@centraliens.net>
 
        * src/grpck.c: Fix some warnings. compare_members_lists() is only
index f5b42b72cb59b949ade04b00f32efaecf11b7449..f7738d0279d1b183a180364f8c39bddf89e5b092 100644 (file)
@@ -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);
 }
index 67b407a72476f9588220bd127a8398a6ed5add2f..274c3adb7cfec0446da24dcfe50261f3eff64e02 100644 (file)
@@ -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();
        }