Commit the last version from the PLD CVS repository.
(last changelog entry: 2007-02-01) This also adds the files which were present in the CVS repository, but not present in the shadow archives.
This commit is contained in:
@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: groupadd.c,v 1.55 2006/07/28 17:38:52 kloczek Exp $"
|
||||
#ident "$Id: groupadd.c,v 1.56 2006/08/15 17:25:58 kloczek Exp $"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
@ -548,10 +548,10 @@ int main (int argc, char **argv)
|
||||
find_new_gid ();
|
||||
|
||||
grp_update ();
|
||||
nscd_flush_cache ("group");
|
||||
|
||||
close_files ();
|
||||
|
||||
nscd_flush_cache ("group");
|
||||
|
||||
#ifdef USE_PAM
|
||||
if (retval == PAM_SUCCESS)
|
||||
pam_end (pamh, PAM_SUCCESS);
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: groupdel.c,v 1.31 2006/01/18 19:55:15 kloczek Exp $"
|
||||
#ident "$Id: groupdel.c,v 1.32 2006/08/15 17:25:58 kloczek Exp $"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
@ -330,10 +330,10 @@ int main (int argc, char **argv)
|
||||
open_files ();
|
||||
|
||||
grp_update ();
|
||||
nscd_flush_cache ("group");
|
||||
|
||||
close_files ();
|
||||
|
||||
nscd_flush_cache ("group");
|
||||
|
||||
#ifdef USE_PAM
|
||||
if (retval == PAM_SUCCESS)
|
||||
pam_end (pamh, PAM_SUCCESS);
|
||||
|
@ -47,8 +47,8 @@
|
||||
#define EXIT_SUCCESS 0 /* success */
|
||||
#define EXIT_USAGE 1 /* invalid command syntax */
|
||||
#define EXIT_GROUP_FILE 2 /* group file access problems */
|
||||
#define EXIT_NOT_ROOT 3 /* not super user */
|
||||
#define EXIT_NOT_EROOT 4 /* not effective super user */
|
||||
#define EXIT_NOT_ROOT 3 /* not superuser */
|
||||
#define EXIT_NOT_EROOT 4 /* not effective superuser */
|
||||
#define EXIT_NOT_PRIMARY 5 /* not primary owner of group */
|
||||
#define EXIT_NOT_MEMBER 6 /* member of group does not exist */
|
||||
#define EXIT_MEMBER_EXISTS 7 /* member of group already exists */
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: groupmod.c,v 1.41 2006/07/28 17:38:52 kloczek Exp $"
|
||||
#ident "$Id: groupmod.c,v 1.42 2006/08/15 17:25:58 kloczek Exp $"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
@ -576,10 +576,10 @@ int main (int argc, char **argv)
|
||||
open_files ();
|
||||
|
||||
grp_update ();
|
||||
nscd_flush_cache ("group");
|
||||
|
||||
close_files ();
|
||||
|
||||
nscd_flush_cache ("group");
|
||||
|
||||
#ifdef USE_PAM
|
||||
if (retval == PAM_SUCCESS)
|
||||
pam_end (pamh, PAM_SUCCESS);
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: useradd.c,v 1.100 2006/07/28 17:42:48 kloczek Exp $"
|
||||
#ident "$Id: useradd.c,v 1.103 2006/11/04 00:55:00 kloczek Exp $"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
@ -206,7 +206,8 @@ static struct group *getgr_nam_gid (const char *grname)
|
||||
gid = strtol (grname, &errptr, 10);
|
||||
if (*errptr || errno == ERANGE || gid < 0) {
|
||||
fprintf (stderr,
|
||||
_("%s: invalid numeric argument '%s'\n"), Prog, grname);
|
||||
_("%s: invalid numeric argument '%s'\n"), Prog,
|
||||
grname);
|
||||
exit (E_BAD_ARG);
|
||||
}
|
||||
return getgrnam (grname);
|
||||
@ -1574,6 +1575,11 @@ static void create_home (void)
|
||||
_
|
||||
("%s: cannot create directory %s\n"),
|
||||
Prog, user_home);
|
||||
#ifdef WITH_AUDIT
|
||||
audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
|
||||
"adding home directory", user_name,
|
||||
user_id, 0);
|
||||
#endif
|
||||
fail_exit (E_HOMEDIR);
|
||||
}
|
||||
chown (user_home, user_id, user_gid);
|
||||
@ -1809,11 +1815,11 @@ int main (int argc, char **argv)
|
||||
|
||||
create_mail ();
|
||||
|
||||
close_files ();
|
||||
|
||||
nscd_flush_cache ("passwd");
|
||||
nscd_flush_cache ("group");
|
||||
|
||||
close_files ();
|
||||
|
||||
#ifdef USE_PAM
|
||||
if (retval == PAM_SUCCESS)
|
||||
pam_end (pamh, PAM_SUCCESS);
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: userdel.c,v 1.66 2006/07/10 04:11:32 kloczek Exp $"
|
||||
#ident "$Id: userdel.c,v 1.67 2006/08/15 17:25:58 kloczek Exp $"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@ -727,9 +727,6 @@ int main (int argc, char **argv)
|
||||
update_user ();
|
||||
update_groups ();
|
||||
|
||||
nscd_flush_cache ("passwd");
|
||||
nscd_flush_cache ("group");
|
||||
|
||||
if (rflg)
|
||||
remove_mailbox ();
|
||||
if (rflg && !fflg && !is_owner (user_id, user_home)) {
|
||||
@ -739,6 +736,7 @@ int main (int argc, char **argv)
|
||||
rflg = 0;
|
||||
errors++;
|
||||
}
|
||||
|
||||
#ifdef EXTRA_CHECK_HOME_DIR
|
||||
/* This may be slow, the above should be good enough. */
|
||||
if (rflg && !fflg) {
|
||||
@ -792,6 +790,10 @@ int main (int argc, char **argv)
|
||||
*/
|
||||
user_cancel (user_name);
|
||||
close_files ();
|
||||
|
||||
nscd_flush_cache ("passwd");
|
||||
nscd_flush_cache ("group");
|
||||
|
||||
#ifdef USE_PAM
|
||||
if (retval == PAM_SUCCESS)
|
||||
pam_end (pamh, PAM_SUCCESS);
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: usermod.c,v 1.71 2006/07/28 17:42:48 kloczek Exp $"
|
||||
#ident "$Id: usermod.c,v 1.74 2007/01/16 12:51:50 kloczek Exp $"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
@ -166,11 +166,8 @@ static struct group *getgr_nam_gid (const char *grname)
|
||||
char *errptr;
|
||||
|
||||
val = strtol (grname, &errptr, 10);
|
||||
if (*errptr || errno == ERANGE || val < 0) {
|
||||
fprintf (stderr, _("%s: invalid numeric argument '%s'\n"), Prog,
|
||||
grname);
|
||||
exit (E_BAD_ARG);
|
||||
}
|
||||
if (*grname != '\0' && *errptr == '\0' && errno != ERANGE && val >= 0)
|
||||
return getgrgid (val);
|
||||
return getgrnam (grname);
|
||||
}
|
||||
|
||||
@ -908,7 +905,7 @@ static void process_flags (int argc, char **argv)
|
||||
*/
|
||||
int c;
|
||||
static struct option long_options[] = {
|
||||
{"append", required_argument, NULL, 'a'},
|
||||
{"append", no_argument, NULL, 'a'},
|
||||
{"comment", required_argument, NULL, 'c'},
|
||||
{"home", required_argument, NULL, 'd'},
|
||||
{"expiredate", required_argument, NULL, 'e'},
|
||||
@ -1528,13 +1525,12 @@ int main (int argc, char **argv)
|
||||
* change the home directory, then close and update the files.
|
||||
*/
|
||||
open_files ();
|
||||
|
||||
usr_update ();
|
||||
close_files ();
|
||||
|
||||
nscd_flush_cache ("passwd");
|
||||
nscd_flush_cache ("group");
|
||||
|
||||
close_files ();
|
||||
|
||||
if (Gflg || lflg)
|
||||
grp_err = grp_update ();
|
||||
|
||||
|
Reference in New Issue
Block a user