[svn-upgrade] Integrating new upstream version, shadow (4.0.17)
This commit is contained in:
@ -21,6 +21,7 @@ INCLUDES = \
|
||||
# $prefix/bin and $prefix/sbin, no install-data hacks...)
|
||||
|
||||
bin_PROGRAMS = groups login su
|
||||
sbin_PROGRAMS = nologin
|
||||
ubin_PROGRAMS = faillog lastlog chage chfn chsh expiry gpasswd newgrp passwd
|
||||
usbin_PROGRAMS = \
|
||||
chgpasswd \
|
||||
@ -33,7 +34,6 @@ usbin_PROGRAMS = \
|
||||
grpunconv \
|
||||
logoutd \
|
||||
newusers \
|
||||
nologin \
|
||||
pwck \
|
||||
pwconv \
|
||||
pwunconv \
|
||||
|
@ -37,16 +37,16 @@ POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
bin_PROGRAMS = groups$(EXEEXT) login$(EXEEXT) su$(EXEEXT)
|
||||
sbin_PROGRAMS = nologin$(EXEEXT)
|
||||
ubin_PROGRAMS = faillog$(EXEEXT) lastlog$(EXEEXT) chage$(EXEEXT) \
|
||||
chfn$(EXEEXT) chsh$(EXEEXT) expiry$(EXEEXT) gpasswd$(EXEEXT) \
|
||||
newgrp$(EXEEXT) passwd$(EXEEXT)
|
||||
usbin_PROGRAMS = chgpasswd$(EXEEXT) chpasswd$(EXEEXT) \
|
||||
groupadd$(EXEEXT) groupdel$(EXEEXT) groupmod$(EXEEXT) \
|
||||
grpck$(EXEEXT) grpconv$(EXEEXT) grpunconv$(EXEEXT) \
|
||||
logoutd$(EXEEXT) newusers$(EXEEXT) nologin$(EXEEXT) \
|
||||
pwck$(EXEEXT) pwconv$(EXEEXT) pwunconv$(EXEEXT) \
|
||||
useradd$(EXEEXT) userdel$(EXEEXT) usermod$(EXEEXT) \
|
||||
vipw$(EXEEXT)
|
||||
logoutd$(EXEEXT) newusers$(EXEEXT) pwck$(EXEEXT) \
|
||||
pwconv$(EXEEXT) pwunconv$(EXEEXT) useradd$(EXEEXT) \
|
||||
userdel$(EXEEXT) usermod$(EXEEXT) vipw$(EXEEXT)
|
||||
noinst_PROGRAMS = id$(EXEEXT) sulogin$(EXEEXT)
|
||||
subdir = src
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
@ -58,13 +58,14 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(ubindir)" \
|
||||
"$(DESTDIR)$(usbindir)"
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" \
|
||||
"$(DESTDIR)$(ubindir)" "$(DESTDIR)$(usbindir)"
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
ubinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
usbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(ubin_PROGRAMS) \
|
||||
$(usbin_PROGRAMS)
|
||||
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(sbin_PROGRAMS) \
|
||||
$(ubin_PROGRAMS) $(usbin_PROGRAMS)
|
||||
chage_SOURCES = chage.c
|
||||
chage_OBJECTS = chage.$(OBJEXT)
|
||||
am__DEPENDENCIES_1 = $(top_builddir)/libmisc/libmisc.a \
|
||||
@ -412,9 +413,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign src/Makefile
|
||||
$(AUTOMAKE) --gnu src/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
@ -467,6 +468,34 @@ clean-noinstPROGRAMS:
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
install-sbinPROGRAMS: $(sbin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)"
|
||||
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-sbinPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(sbindir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-sbinPROGRAMS:
|
||||
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
install-ubinPROGRAMS: $(ubin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(ubindir)" || $(mkdir_p) "$(DESTDIR)$(ubindir)"
|
||||
@ -771,7 +800,7 @@ check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(ubindir)" "$(DESTDIR)$(usbindir)"; do \
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(ubindir)" "$(DESTDIR)$(usbindir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
@ -798,8 +827,8 @@ maintainer-clean-generic:
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic clean-libtool \
|
||||
clean-noinstPROGRAMS clean-ubinPROGRAMS clean-usbinPROGRAMS \
|
||||
mostlyclean-am
|
||||
clean-noinstPROGRAMS clean-sbinPROGRAMS clean-ubinPROGRAMS \
|
||||
clean-usbinPROGRAMS mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
@ -819,7 +848,7 @@ info-am:
|
||||
|
||||
install-data-am: install-ubinPROGRAMS install-usbinPROGRAMS
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
install-exec-am: install-binPROGRAMS install-sbinPROGRAMS
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
@ -846,22 +875,24 @@ ps: ps-am
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-info-am \
|
||||
uninstall-ubinPROGRAMS uninstall-usbinPROGRAMS
|
||||
uninstall-sbinPROGRAMS uninstall-ubinPROGRAMS \
|
||||
uninstall-usbinPROGRAMS
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
|
||||
clean-generic clean-libtool clean-noinstPROGRAMS \
|
||||
clean-ubinPROGRAMS clean-usbinPROGRAMS ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-binPROGRAMS install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip install-ubinPROGRAMS \
|
||||
install-usbinPROGRAMS installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-binPROGRAMS uninstall-info-am uninstall-ubinPROGRAMS \
|
||||
uninstall-usbinPROGRAMS
|
||||
clean-sbinPROGRAMS clean-ubinPROGRAMS clean-usbinPROGRAMS \
|
||||
ctags distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-binPROGRAMS \
|
||||
install-data install-data-am install-exec install-exec-am \
|
||||
install-info install-info-am install-man install-sbinPROGRAMS \
|
||||
install-strip install-ubinPROGRAMS install-usbinPROGRAMS \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-binPROGRAMS \
|
||||
uninstall-info-am uninstall-sbinPROGRAMS \
|
||||
uninstall-ubinPROGRAMS uninstall-usbinPROGRAMS
|
||||
|
||||
|
||||
install-am: all-am
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: chage.c,v 1.71 2006/02/21 22:44:35 kloczek Exp $"
|
||||
#ident "$Id: chage.c,v 1.72 2006/06/20 20:00:04 kloczek Exp $"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
@ -116,7 +116,8 @@ static void usage (void)
|
||||
" change to MIN_DAYS\n"
|
||||
" -M, --maxdays MAX_DAYS set maximim number of days before password\n"
|
||||
" change to MAX_DAYS\n"
|
||||
" -W, --warndays WARN_DAYS set expiration warning days to WARN_DAYS\n"));
|
||||
" -W, --warndays WARN_DAYS set expiration warning days to WARN_DAYS\n"
|
||||
"\n"));
|
||||
exit (E_USAGE);
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: chgpasswd.c,v 1.4 2006/05/19 23:47:11 kloczek Exp $"
|
||||
#ident "$Id: chgpasswd.c,v 1.5 2006/06/20 20:00:04 kloczek Exp $"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <getopt.h>
|
||||
@ -71,7 +71,8 @@ static void usage (void)
|
||||
" -e, --encrypted supplied passwords are encrypted\n"
|
||||
" -h, --help display this help message and exit\n"
|
||||
" -m, --md5 use MD5 encryption instead DES when the supplied\n"
|
||||
" passwords are not encrypted\n"));
|
||||
" passwords are not encrypted\n"
|
||||
"\n"));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: chpasswd.c,v 1.34 2005/10/19 15:21:07 kloczek Exp $"
|
||||
#ident "$Id: chpasswd.c,v 1.37 2006/06/24 10:18:55 kloczek Exp $"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <getopt.h>
|
||||
@ -40,6 +40,7 @@
|
||||
#include "pam_defs.h"
|
||||
#endif /* USE_PAM */
|
||||
#include "defines.h"
|
||||
#include "exitcodes.h"
|
||||
#include "nscd.h"
|
||||
#include "prototypes.h"
|
||||
#include "pwio.h"
|
||||
@ -67,8 +68,9 @@ static void usage (void)
|
||||
" -e, --encrypted supplied passwords are encrypted\n"
|
||||
" -h, --help display this help message and exit\n"
|
||||
" -m, --md5 use MD5 encryption instead DES when the supplied\n"
|
||||
" passwords are not encrypted\n"));
|
||||
exit (1);
|
||||
" passwords are not encrypted\n"
|
||||
"\n"));
|
||||
exit (E_USAGE);
|
||||
}
|
||||
|
||||
int main (int argc, char **argv)
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: faillog.c,v 1.26 2005/08/31 17:25:00 kloczek Exp $"
|
||||
#ident "$Id: faillog.c,v 1.28 2006/06/25 13:08:25 kloczek Exp $"
|
||||
|
||||
#include <getopt.h>
|
||||
#include <pwd.h>
|
||||
@ -71,7 +71,8 @@ static void usage (void)
|
||||
" -t, --time DAYS display faillog records more recent than DAYS\n"
|
||||
" -u, --user LOGIN display faillog record or maintains failure counters\n"
|
||||
" and limits (if used with -r, -m or -l options) only\n"
|
||||
" for user with LOGIN\n"));
|
||||
" for user with LOGIN\n"
|
||||
"\n"));
|
||||
exit (E_USAGE);
|
||||
}
|
||||
|
||||
@ -311,11 +312,11 @@ int main (int argc, char **argv)
|
||||
static struct option long_options[] = {
|
||||
{"all", no_argument, NULL, 'a'},
|
||||
{"help", no_argument, NULL, 'h'},
|
||||
{"lock-secs", no_argument, NULL, 'l'},
|
||||
{"maximum", no_argument, NULL, 'm'},
|
||||
{"lock-secs", required_argument, NULL, 'l'},
|
||||
{"maximum", required_argument, NULL, 'm'},
|
||||
{"reset", no_argument, NULL, 'r'},
|
||||
{"time", no_argument, NULL, 't'},
|
||||
{"user", no_argument, NULL, 'u'},
|
||||
{"time", required_argument, NULL, 't'},
|
||||
{"user", required_argument, NULL, 'u'},
|
||||
{NULL, 0, NULL, '\0'}
|
||||
};
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: groupadd.c,v 1.51 2006/01/18 19:55:15 kloczek Exp $"
|
||||
#ident "$Id: groupadd.c,v 1.53 2006/06/24 05:52:00 kloczek Exp $"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
@ -97,13 +97,14 @@ static void usage (void)
|
||||
fprintf (stderr, _("Usage: groupadd [options] group\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -f, --force force exit with success status if the specified\n"
|
||||
" -f, --force force exit with success status if the specified\n"
|
||||
" group already exists\n"
|
||||
" -g, --gid GID use GID for the new group\n"
|
||||
" -g, --gid GID use GID for the new group\n"
|
||||
" -h, --help display this help message and exit\n"
|
||||
" -K, --key KEY=VALUE overrides /etc/login.defs defaults\n"
|
||||
" -o, --non-unique allow create group with duplicate\n"
|
||||
" (non-unique) GID\n"));
|
||||
" (non-unique) GID\n"
|
||||
"\n"));
|
||||
exit (E_USAGE);
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: lastlog.c,v 1.25 2006/03/05 22:06:58 kloczek Exp $"
|
||||
#ident "$Id: lastlog.c,v 1.26 2006/06/20 20:00:04 kloczek Exp $"
|
||||
|
||||
#include <getopt.h>
|
||||
#include <lastlog.h>
|
||||
@ -74,7 +74,8 @@ static void usage (void)
|
||||
" -b, --before DAYS print only lastlog records older than DAYS\n"
|
||||
" -h, --help display this help message and exit\n"
|
||||
" -t, --time DAYS print only lastlog records more recent than DAYS\n"
|
||||
" -u, --user LOGIN print lastlog record for user with specified LOGIN\n"));
|
||||
" -u, --user LOGIN print lastlog record for user with specified LOGIN\n"
|
||||
"\n"));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: login.c,v 1.85 2006/05/07 17:44:39 kloczek Exp $"
|
||||
#ident "$Id: login.c,v 1.86 2006/07/10 04:11:32 kloczek Exp $"
|
||||
|
||||
#include <errno.h>
|
||||
#include <grp.h>
|
||||
@ -889,9 +889,7 @@ int main (int argc, char **argv)
|
||||
}
|
||||
strncpy (failent.ut_user, failent_user,
|
||||
sizeof (failent.ut_user));
|
||||
#ifdef USER_PROCESS
|
||||
failent.ut_type = USER_PROCESS;
|
||||
#endif
|
||||
failtmp (&failent);
|
||||
}
|
||||
memzero (username, sizeof username);
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: logoutd.c,v 1.30 2005/09/07 15:00:45 kloczek Exp $"
|
||||
#ident "$Id: logoutd.c,v 1.31 2006/07/10 04:11:32 kloczek Exp $"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
@ -204,10 +204,8 @@ int main (int argc, char **argv)
|
||||
#else
|
||||
while ((ut = getutent ())) {
|
||||
#endif
|
||||
#ifdef USER_PROCESS
|
||||
if (ut->ut_type != USER_PROCESS)
|
||||
continue;
|
||||
#endif
|
||||
if (ut->ut_user[0] == '\0')
|
||||
continue;
|
||||
if (check_login (ut))
|
||||
@ -244,24 +242,12 @@ int main (int argc, char **argv)
|
||||
close (tty_fd);
|
||||
sleep (10);
|
||||
}
|
||||
#ifdef USER_PROCESS /* USG_UTMP */
|
||||
|
||||
if (ut->ut_pid > 1) {
|
||||
kill (-ut->ut_pid, SIGHUP);
|
||||
sleep (10);
|
||||
kill (-ut->ut_pid, SIGKILL);
|
||||
}
|
||||
#else /* BSD || SUN || SUN4 */
|
||||
/*
|
||||
* vhangup() the line to kill try and kill
|
||||
* whatever is out there using it.
|
||||
*/
|
||||
if ((tty_fd =
|
||||
open (tty_name, O_RDONLY | O_NDELAY)) == -1)
|
||||
continue;
|
||||
|
||||
vhangup (tty_fd);
|
||||
close (tty_fd);
|
||||
#endif /* BSD || SUN || SUN4 */
|
||||
|
||||
strncpy (user, ut->ut_user, sizeof (user) - 1);
|
||||
user[sizeof (user) - 1] = '\0';
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: passwd.c,v 1.58 2006/03/26 19:15:27 kloczek Exp $"
|
||||
#ident "$Id: passwd.c,v 1.59 2006/06/20 20:00:04 kloczek Exp $"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@ -149,7 +149,8 @@ static void usage (int status)
|
||||
" -u, --unlock unlock the named account\n"
|
||||
" -w, --warndays WARN_DAYS set expiration warning days to WARN_DAYS\n"
|
||||
" -x, --maxdays MAX_DAYS set maximim number of days before password\n"
|
||||
" change to MAX_DAYS\n"));
|
||||
" change to MAX_DAYS\n"
|
||||
"\n"));
|
||||
exit (status);
|
||||
}
|
||||
|
||||
|
5
src/su.c
5
src/su.c
@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: su.c,v 1.70 2006/05/07 17:26:59 kloczek Exp $"
|
||||
#ident "$Id: su.c,v 1.71 2006/06/20 20:00:04 kloczek Exp $"
|
||||
|
||||
#include <getopt.h>
|
||||
#include <grp.h>
|
||||
@ -261,7 +261,8 @@ static void usage (void)
|
||||
" -m, -p,\n"
|
||||
" --preserve-environment do not reset environment variables, and keep\n"
|
||||
" the same shell\n"
|
||||
" -s, --shell SHELL use SHELL instead of the default in passwd\n"));
|
||||
" -s, --shell SHELL use SHELL instead of the default in passwd\n"
|
||||
"\n"));
|
||||
exit (E_USAGE);
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: useradd.c,v 1.96 2006/05/30 18:28:45 kloczek Exp $"
|
||||
#ident "$Id: useradd.c,v 1.99 2006/06/22 11:30:32 kloczek Exp $"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
@ -633,7 +633,8 @@ static void usage (void)
|
||||
" -p, --password PASSWORD use encrypted password for the new user\n"
|
||||
" account\n"
|
||||
" -s, --shell SHELL the login shell for the new user account\n"
|
||||
" -u, --uid UID force use the UID for the new user account\n"));
|
||||
" -u, --uid UID force use the UID for the new user account\n"
|
||||
"\n"));
|
||||
exit (E_USAGE);
|
||||
}
|
||||
|
||||
@ -1246,6 +1247,11 @@ static void process_flags (int argc, char **argv)
|
||||
|
||||
if (!sflg)
|
||||
user_shell = def_shell;
|
||||
|
||||
/* TODO: add handle change default spool mail creation by
|
||||
-K CREATE_MAIL_SPOOL={yes,no}. It need rewrite internal API for handle
|
||||
shadow tools configuration */
|
||||
create_mail_spool = def_create_mail_spool;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1599,24 +1605,24 @@ static void create_mail (void)
|
||||
if (fd < 0) {
|
||||
perror (_("Creating mailbox file"));
|
||||
return;
|
||||
|
||||
gr = getgrnam ("mail");
|
||||
if (!gr) {
|
||||
fprintf (stderr,
|
||||
_
|
||||
("Group 'mail' not found. Creating the user mailbox file with 0600 mode.\n"));
|
||||
gid = user_gid;
|
||||
mode = 0600;
|
||||
} else {
|
||||
gid = gr->gr_gid;
|
||||
mode = 0660;
|
||||
}
|
||||
|
||||
if (fchown (fd, user_id, gid) || fchmod (fd, mode))
|
||||
perror (_("Setting mailbox file permissions"));
|
||||
|
||||
close (fd);
|
||||
}
|
||||
|
||||
gr = getgrnam ("mail");
|
||||
if (!gr) {
|
||||
fprintf (stderr,
|
||||
_
|
||||
("Group 'mail' not found. Creating the user mailbox file with 0600 mode.\n"));
|
||||
gid = user_gid;
|
||||
mode = 0600;
|
||||
} else {
|
||||
gid = gr->gr_gid;
|
||||
mode = 0660;
|
||||
}
|
||||
|
||||
if (fchown (fd, user_id, gid) || fchmod (fd, mode))
|
||||
perror (_("Setting mailbox file permissions"));
|
||||
|
||||
close (fd);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: userdel.c,v 1.64 2006/05/12 23:37:33 kloczek Exp $"
|
||||
#ident "$Id: userdel.c,v 1.66 2006/07/10 04:11:32 kloczek Exp $"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@ -104,7 +104,8 @@ static void usage (void)
|
||||
"Options:\n"
|
||||
" -f, --force force removal of files, even if not owned by user\n"
|
||||
" -h, --help display this help message and exit\n"
|
||||
" -r, --remove remove home directory and mail spool\n"));
|
||||
" -r, --remove remove home directory and mail spool\n"
|
||||
"\n"));
|
||||
exit (E_USAGE);
|
||||
}
|
||||
|
||||
@ -448,13 +449,9 @@ static void user_busy (const char *name, uid_t uid)
|
||||
setutent ();
|
||||
while ((utent = getutent ())) {
|
||||
#endif
|
||||
#ifdef USER_PROCESS
|
||||
if (utent->ut_type != USER_PROCESS)
|
||||
continue;
|
||||
#else
|
||||
if (utent->ut_user[0] == '\0')
|
||||
continue;
|
||||
#endif
|
||||
|
||||
if (strncmp (utent->ut_user, name, sizeof utent->ut_user))
|
||||
continue;
|
||||
fprintf (stderr,
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: usermod.c,v 1.66 2006/05/07 17:44:39 kloczek Exp $"
|
||||
#ident "$Id: usermod.c,v 1.69 2006/06/25 13:10:29 kloczek Exp $"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
@ -273,19 +273,19 @@ static int get_groups (char *list)
|
||||
*/
|
||||
static void usage (void)
|
||||
{
|
||||
fprintf (stderr, _("Usage: usermod [options] login\n"
|
||||
fprintf (stderr, _("Usage: usermod [options] LOGIN\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -a, --append GROUP append the user to the supplemental GROUP\n"
|
||||
" -c, --comment COMMENT new value of the GECOS field\n"
|
||||
" -d, --home HOME_DIR new login directory for the new user account\n"
|
||||
" -d, --home HOME_DIR new home directory for the user account\n"
|
||||
" -e, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE\n"
|
||||
" -f, --inactive INACTIVE set password inactive after expiration\n"
|
||||
" to INACTIVE\n"
|
||||
" -g, --gid GROUP force use GROUP as new initial login group\n"
|
||||
" -G, --groups GROUPS list of supplementary GROUPS\n"
|
||||
" -g, --gid GROUP force use GROUP as new primary group\n"
|
||||
" -G, --groups GROUPS new list of supplementary GROUPS\n"
|
||||
" -h, --help display this help message and exit\n"
|
||||
" -l, --login LOGIN new value of the login name\n"
|
||||
" -l, --login NEW_LOGIN new value of the login name\n"
|
||||
" -L, --lock lock the user account\n"
|
||||
" -m, --move-home move contents of the home directory to the new\n"
|
||||
" location (use only with -d)\n"
|
||||
@ -293,7 +293,8 @@ static void usage (void)
|
||||
" -p, --password PASSWORD use encrypted password for the new password\n"
|
||||
" -s, --shell SHELL new login shell for the user account\n"
|
||||
" -u, --uid UID new UID for the user account\n"
|
||||
" -U, --unlock unlock the user account\n"));
|
||||
" -U, --unlock unlock the user account\n"
|
||||
"\n"));
|
||||
exit (E_USAGE);
|
||||
}
|
||||
|
||||
@ -921,7 +922,7 @@ static void process_flags (int argc, char **argv)
|
||||
{NULL, 0, NULL, '\0'}
|
||||
};
|
||||
while ((c =
|
||||
getopt_long (argc, argv, "ac:d:e:f:g:G:l:Lmop:s:u:U",
|
||||
getopt_long (argc, argv, "a:c:d:e:f:g:G:hl:Lmop:s:u:U",
|
||||
long_options, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'a':
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: vipw.c,v 1.21 2006/01/18 19:55:15 kloczek Exp $"
|
||||
#ident "$Id: vipw.c,v 1.22 2006/06/20 20:00:04 kloczek Exp $"
|
||||
|
||||
#include <errno.h>
|
||||
#include <getopt.h>
|
||||
@ -67,7 +67,8 @@ static void usage (void)
|
||||
" -h, --help display this help message and exit\n"
|
||||
" -p, --passwd edit passwd database\n"
|
||||
" -q, --quiet quiet mode\n"
|
||||
" -s, --shadow edit shadow or gshadow database\n"));
|
||||
" -s, --shadow edit shadow or gshadow database\n"
|
||||
"\n"));
|
||||
exit (E_USAGE);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user