From: nekral-guest Date: Sat, 26 Jan 2008 17:41:20 +0000 (+0000) Subject: Fix build failures with --disable-shadowgrp. Thanks to Jürgen X-Git-Tag: 4.1.1~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae99674e9b54dc15d000f99cd9fab30560b7317e;p=thirdparty%2Fshadow.git Fix build failures with --disable-shadowgrp. Thanks to Jürgen Daubert for the patch. * libmisc/salt.c: Include , needed for stderr and printf functions. * lib/encrypt.c: Include , needed for perror, stderr and printf functions * src/usermod.c: sgr_locked exists only if SHADOWGRP is defined. * src/chgpasswd.c: Only check is the gshadow file exists if SHADOWGRP is defined. --- diff --git a/ChangeLog b/ChangeLog index c2c159986..1bf0a6421 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-01-26 Nicolas François + + Fix build failures with --disable-shadowgrp. Thanks to Jürgen + Daubert for the patch. + * libmisc/salt.c: Include , needed for stderr and printf + functions. + * lib/encrypt.c: Include , needed for perror, stderr and + printf functions + * src/usermod.c: sgr_locked exists only if SHADOWGRP is defined. + * src/chgpasswd.c: Only check is the gshadow file exists if + SHADOWGRP is defined. + 2008-01-24 Nicolas François * src/gpasswd.c, src/chfn.c, src/chage.c, src/chsh.c, src/grpck.c, diff --git a/lib/encrypt.c b/lib/encrypt.c index 9a880e83b..6b6d270b4 100644 --- a/lib/encrypt.c +++ b/lib/encrypt.c @@ -32,8 +32,11 @@ #ident "$Id$" #include +#include + #include "prototypes.h" #include "defines.h" + char *pw_encrypt (const char *clear, const char *salt) { static char cipher[128]; diff --git a/lib/groupio.c b/lib/groupio.c index 7d84dd972..9d9b3d300 100644 --- a/lib/groupio.c +++ b/lib/groupio.c @@ -3,6 +3,8 @@ #ident "$Id$" +#include + #include "prototypes.h" #include "defines.h" #include "commonio.h" @@ -230,7 +232,7 @@ static int group_open_hook (void) * same name, password and gid. * * It merge the members of the second entry in the first one, and return - * the modified first entry on success, or NUll on failure (with errno + * the modified first entry on success, or NULL on failure (with errno * set). */ static struct commonio_entry *merge_group_entries (struct commonio_entry *gr1, diff --git a/libmisc/salt.c b/libmisc/salt.c index 30ac920ff..c61d3e190 100644 --- a/libmisc/salt.c +++ b/libmisc/salt.c @@ -13,6 +13,7 @@ #include #include +#include #include #include "prototypes.h" #include "defines.h" diff --git a/src/chgpasswd.c b/src/chgpasswd.c index f2bde98df..77176feb5 100644 --- a/src/chgpasswd.c +++ b/src/chgpasswd.c @@ -342,7 +342,9 @@ int main (int argc, char **argv) check_perms (); +#ifdef SHADOWGRP is_shadow_grp = sgr_file_present (); +#endif open_files (); diff --git a/src/usermod.c b/src/usermod.c index 509f365c6..d7ff6fdf3 100644 --- a/src/usermod.c +++ b/src/usermod.c @@ -1113,7 +1113,9 @@ static void close_files (void) pw_locked = 0; spw_locked = 0; gr_locked = 0; +#ifdef SHADOWGRP sgr_locked = 0; +#endif /* * Close the DBM and/or flat files