home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-04-03 | 50.1 KB | 1,851 lines |
- Newsgroups: comp.sources.misc
- From: jfh@rpp386.cactus.org (John F Haugh II)
- Subject: v29i048: shadow - Shadow Login Suite, Patch04b/3
- Message-ID: <1992Apr3.202818.19950@sparky.imd.sterling.com>
- X-Md4-Signature: 9b3ad82403f4ea5620e69b7c9af541ee
- Date: Fri, 3 Apr 1992 20:28:18 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: jfh@rpp386.cactus.org (John F Haugh II)
- Posting-number: Volume 29, Issue 48
- Archive-name: shadow/patch04b
- Environment: UNIX
- Patch-To: shadow: Volume 26, Issue 54-64
-
- This is the second part of the patch for 3.1.4.
- --
- Index: useradd.1
- *** rel3/useradd.1 Fri Mar 27 10:24:35 1992
- --- useradd.1 Fri Mar 27 10:26:39 1992
- ***************
- *** 1,4 ****
- ! .\" Copyright 1991, John F. Haugh II
- .\" All rights reserved.
- .\"
- .\" Permission is granted to copy and create derivative works for any
- --- 1,4 ----
- ! .\" Copyright 1991, 1992, John F. Haugh II
- .\" All rights reserved.
- .\"
- .\" Permission is granted to copy and create derivative works for any
- ***************
- *** 7,13 ****
- .\" and conspicuously displayed on all copies of object code or
- .\" distribution media.
- .\"
- ! .\" @(#)useradd.1 3.1 07:45:46 7/13/91
- .\"
- .TH USERADD 1M
- .SH NAME
- --- 7,13 ----
- .\" and conspicuously displayed on all copies of object code or
- .\" distribution media.
- .\"
- ! .\" @(#)useradd.1 3.2 20:38:24 3/7/92
- .\"
- .TH USERADD 1M
- .SH NAME
- ***************
- *** 70,76 ****
- .IP \fB-m\fR
- The user's home directory will be created if it does not exist.
- The files contained in \fIskeleton_dir\fR will be copied to the
- ! home directory if the \fB-k\fR option is used.
- The \fB-k\fR option is only valid in conjunction with the \fB-m\fR
- option.
- The default is to not create the directory and to not copy any
- --- 70,79 ----
- .IP \fB-m\fR
- The user's home directory will be created if it does not exist.
- The files contained in \fIskeleton_dir\fR will be copied to the
- ! home directory if the \fB-k\fR option is used, otherwise the
- ! files contained in \fB/etc/skel\fR will be used instead.
- ! Any directories contained in \fIskeleton_dir\fR or \fB/etc/skel\fR
- ! will be created in the user's home directory as well.
- The \fB-k\fR option is only valid in conjunction with the \fB-m\fR
- option.
- The default is to not create the directory and to not copy any
- ***************
- *** 109,114 ****
- --- 112,120 ----
- .PP
- If no options are specified, \fIuseradd\fR displays the current
- default values.
- + .SH Notes
- + The system administrator is responsible for placing the default
- + user files in the \fB/etc/skel\fR directory.
- .SH Files
- /etc/passwd \- user account information
- .br
- ***************
- *** 117,122 ****
- --- 123,130 ----
- /etc/group \- group information
- .br
- /etc/defaults/useradd \- default information
- + .br
- + /etc/skel \- directory containing default files
- .SH SEE ALSO
- \fBchfn(1), chsh(1), groupadd(1M), groupdel(1M), groupmod(1M),
- passwd(1), userdel(1M), usermod(1M)
- Index: newgrp.c
- *** rel3/newgrp.c Fri Mar 27 10:25:46 1992
- --- newgrp.c Fri Mar 27 10:26:41 1992
- ***************
- *** 1,5 ****
- /*
- ! * Copyright 1990, 1991, John F. Haugh II
- * All rights reserved.
- *
- * Permission is granted to copy and create derivative works for any
- --- 1,5 ----
- /*
- ! * Copyright 1990, 1991, 1992, John F. Haugh II
- * All rights reserved.
- *
- * Permission is granted to copy and create derivative works for any
- ***************
- *** 29,35 ****
- #endif
-
- #ifndef lint
- ! static char sccsid[] = "@(#)newgrp.c 3.8 11:59:02 12/28/91";
- #endif
-
- #ifdef NGROUPS
- --- 29,35 ----
- #endif
-
- #ifndef lint
- ! static char sccsid[] = "@(#)newgrp.c 3.9 20:37:26 3/7/92";
- #endif
-
- #ifdef NGROUPS
- ***************
- *** 191,196 ****
- --- 191,197 ----
- fprintf (stderr, "unknown group: %s\n", group);
- goto failure;
- }
- + argc--; argv++;
- #ifdef SHADOWGRP
- sgrp = getsgnam (group);
- #endif
- ***************
- *** 263,275 ****
- needspasswd = sgrp->sg_passwd[0] != '\0';
- #endif
- #endif
- -
- - /*
- - * Skip over the user name
- - */
- -
- - argc--; argv++;
- -
- } else {
-
- /*
- --- 264,269 ----
- ***************
- *** 457,473 ****
- }
-
- /*
- ! * exec the login shell and go away. if there were additional
- ! * arguments, use those instead.
- */
-
- - if (argc > 0) {
- - argv--;
- - argv[0] = prog;
- - execve (argv[0], argv, newenvp);
- - perror (argv[0]);
- - _exit (127);
- - }
- shell (prog, base);
- /*NOTREACHED*/
- }
- --- 451,461 ----
- }
-
- /*
- ! * exec the login shell and go away. we are trying to get
- ! * back to the previous environment which should be the
- ! * user's login shell.
- */
-
- shell (prog, base);
- /*NOTREACHED*/
- }
- Index: Makefile
- *** rel3/Makefile Fri Mar 27 10:25:57 1992
- --- Makefile Fri Mar 27 10:26:48 1992
- ***************
- *** 1,5 ****
- #
- ! # Copyright 1988,1989,1990,1991, John F. Haugh II
- # All rights reserved.
- #
- # Permission is granted to copy and create derivative works for any
- --- 1,5 ----
- #
- ! # Copyright 1988,1989,1990,1991,1992 John F. Haugh II
- # All rights reserved.
- #
- # Permission is granted to copy and create derivative works for any
- ***************
- *** 8,16 ****
- # and conspicuously displayed on all copies of object code or
- # distribution media.
- #
- ! # @(#)Makefile 3.25.1.4 10:13:51 - Shadow password system
- #
- ! # @(#)Makefile 3.25.1.4 10:13:51 1/20/92
- #
- SHELL = /bin/sh
-
- --- 8,16 ----
- # and conspicuously displayed on all copies of object code or
- # distribution media.
- #
- ! # @(#)Makefile 3.25.1.9 10:18:08 - Shadow password system
- #
- ! # @(#)Makefile 3.25.1.9 10:18:08 3/27/92
- #
- SHELL = /bin/sh
-
- ***************
- *** 41,52 ****
- TAGS = ctags
-
- # OS. Pick one of USG (AT&T, SYSV, SYS3), BSD, SUN (SunOS 2 and 3),
- ! # or SUN4 (SunOS 4.1.1.).
- # OS = -DUSG -DSYS3
- OS = -DUSG
- # OS = -DBSD
- # OS = -DSUN
- # OS = -DSUN4
-
- # Do you have to do ranlib (probably SUN, BSD and XENIX)?
- RANLIB = ranlib
- --- 41,53 ----
- TAGS = ctags
-
- # OS. Pick one of USG (AT&T, SYSV, SYS3), BSD, SUN (SunOS 2 and 3),
- ! # SUN4 (SunOS 4.1.1.), or UNIXPC (AT&T PC/7300, 3B1)
- # OS = -DUSG -DSYS3
- OS = -DUSG
- # OS = -DBSD
- # OS = -DSUN
- # OS = -DSUN4
- + # OS = -DUSG -DUNIXPC
-
- # Do you have to do ranlib (probably SUN, BSD and XENIX)?
- RANLIB = ranlib
- ***************
- *** 81,87 ****
- # LDFLAGS = -g
-
- # Flags for SunOS 4.1.1
- ! # CFLAGS = -O2 $(OS)
- # LIBS =
- # LDFLAGS =
-
- --- 82,88 ----
- # LDFLAGS = -g
-
- # Flags for SunOS 4.1.1
- ! # CFLAGS = -O2 $(OS) -I$(DEST_INCLUDE_DIR)
- # LIBS =
- # LDFLAGS =
-
- ***************
- *** 201,207 ****
- FILES9 = groupadd.c groupdel.c groupmod.c tz.c console.c hushed.c getdef.c \
- scologin.c logoutd.c sulog.c getpass.c userdel.c
-
- ! FILES_SUN = Makefile.sun4 README.sun4 config.h.sun4
-
- MAN_1 = chage.1 chfn.1 chsh.1 id.1 login.1 newgrp.1 passwd.1 su.1 \
- useradd.1 userdel.1 usermod.1 groupadd.1 groupdel.1 groupmod.1 \
- --- 202,209 ----
- FILES9 = groupadd.c groupdel.c groupmod.c tz.c console.c hushed.c getdef.c \
- scologin.c logoutd.c sulog.c getpass.c userdel.c
-
- ! FILES_SUN4 = Makefile.sun4 README.sun4 config.h.sun4
- ! FILES_SVR4 = Makefile.svr4 config.h.svr4
-
- MAN_1 = chage.1 chfn.1 chsh.1 id.1 login.1 newgrp.1 passwd.1 su.1 \
- useradd.1 userdel.1 usermod.1 groupadd.1 groupdel.1 groupmod.1 \
- ***************
- *** 276,290 ****
- chgrp $(BGID) /bin/faillog /bin/id $(DEST_INCLUDE_DIR)/shadow.h \
- $(DEST_INCLUDE_DIR)/dialup.h $(DEST_INCLUDE_DIR)/pwd.h
- chmod 700 /etc/pwconv /etc/pwunconv /etc/sulogin /etc/mkpasswd \
- ! /etc/chpasswd /etc/newusers /bin/dpasswd /bin/chage \
- /etc/useradd /etc/userdel /etc/usermod /etc/groupadd \
- ! /etc/groupdel /etc/groupmod /etc/logoutd
- chmod 4711 $(LOGINDIR)/login /bin/su /bin/passwd /bin/gpasswd \
- ! /bin/newgrp /bin/chfn /bin/chsh
- chmod 711 /bin/faillog /bin/id
- chmod 444 $(DEST_INCLUDE_DIR)/shadow.h $(DEST_INCLUDE_DIR)/dialup.h \
- $(DEST_INCLUDE_DIR)/pwd.h
- ! [ -f $(DEST_LOGIN_DEFS) ] || (cp $(DEST_LOGIN_DEFS) /etc ; \
- chown $(RUID) $(DEST_LOGIN_DEFS) ; \
- chgrp $(RGID) $(DEST_LOGIN_DEFS) ; \
- chmod 600 $(DEST_LOGIN_DEFS) )
- --- 278,292 ----
- chgrp $(BGID) /bin/faillog /bin/id $(DEST_INCLUDE_DIR)/shadow.h \
- $(DEST_INCLUDE_DIR)/dialup.h $(DEST_INCLUDE_DIR)/pwd.h
- chmod 700 /etc/pwconv /etc/pwunconv /etc/sulogin /etc/mkpasswd \
- ! /etc/chpasswd /etc/newusers /bin/dpasswd /etc/logoutd \
- /etc/useradd /etc/userdel /etc/usermod /etc/groupadd \
- ! /etc/groupdel /etc/groupmod
- chmod 4711 $(LOGINDIR)/login /bin/su /bin/passwd /bin/gpasswd \
- ! /bin/newgrp /bin/chfn /bin/chsh /bin/chage
- chmod 711 /bin/faillog /bin/id
- chmod 444 $(DEST_INCLUDE_DIR)/shadow.h $(DEST_INCLUDE_DIR)/dialup.h \
- $(DEST_INCLUDE_DIR)/pwd.h
- ! [ -f $(DEST_LOGIN_DEFS) ] || (cp login.defs $(DEST_LOGIN_DEFS) ; \
- chown $(RUID) $(DEST_LOGIN_DEFS) ; \
- chgrp $(RGID) $(DEST_LOGIN_DEFS) ; \
- chmod 600 $(DEST_LOGIN_DEFS) )
- ***************
- *** 314,319 ****
- --- 316,324 ----
- Makefile.sun4:
- [ -f s.Makefile.sun4 ] && get -t -r$(RELEASE) s.Makefile.sun4
-
- + Makefile.svr4:
- + [ -f s.Makefile.svr4 ] && get -t -r$(RELEASE) s.Makefile.svr4
- +
- README.sun4:
- [ -f s.README.sun4 ] && get -t -r$(RELEASE) s.README.sun4
-
- ***************
- *** 320,325 ****
- --- 325,333 ----
- config.h.sun4:
- [ -f s.config.h.sun4 ] && get -t -r$(RELEASE) s.config.h.sun4
-
- + config.h.svr4:
- + [ -f s.config.h.svr4 ] && get -t -r$(RELEASE) s.config.h.svr4
- +
- login: $(LOBJS) libshadow.a
- $(CC) -o login $(LDFLAGS) $(LOBJS) libshadow.a $(LIBS)
-
- ***************
- *** 525,531 ****
- groupadd.o: config.h shadow.h
- groupdel.o: config.h shadow.h
- groupmod.o: config.h shadow.h
- ! logoutd.o:
-
- libshadow.a(shadow.o): shadow.h config.h
- libshadow.a(shadowio.o): shadow.h
- --- 533,540 ----
- groupadd.o: config.h shadow.h
- groupdel.o: config.h shadow.h
- groupmod.o: config.h shadow.h
- ! logoutd.o: config.h
- ! sulogin.o: config.h
-
- libshadow.a(shadow.o): shadow.h config.h
- libshadow.a(shadowio.o): shadow.h
- ***************
- *** 535,540 ****
- --- 544,552 ----
- libshadow.a(dialchk.o): dialup.h config.h
- libshadow.a(getdef.o): config.h
- libshadow.a(pwdbm.o): config.h pwd.h
- + libshadow.a(spdbm.o): config.h shadow.h
- + libshadow.a(grdbm.o): config.h
- + libshadow.a(gsdbm.o): config.h shadow.h
- libshadow.a(pwpack.o): config.h pwd.h
- libshadow.a(pwent.o): config.h pwd.h
- libshadow.a(pwio.o): pwd.h
- ***************
- *** 541,549 ****
- libshadow.a(getpass.o): config.h
- libshadow.a(encrypt.o): config.h
- libshadow.a(port.o): port.h
-
- clean:
- ! -rm -f susetup.c *.o a.out core npasswd nshadow *.pag *.dir
-
- clobber: clean
- -rm -f $(BINS) *.lint *.L libshadow.a
- --- 553,562 ----
- libshadow.a(getpass.o): config.h
- libshadow.a(encrypt.o): config.h
- libshadow.a(port.o): port.h
- + libshadow.a(rad64.o): config.h
-
- clean:
- ! -rm -f susetup.c *.o a.out core npasswd nshadow *.pag *.dir pwd.h
-
- clobber: clean
- -rm -f $(BINS) *.lint *.L libshadow.a
- ***************
- *** 592,596 ****
- login.sh.11: $(DOCS2) Makefile
- shar -a $(DOCS2) > login.sh.11
-
- ! login.sh.12: $(FILES_SUN) Makefile
- ! shar -a $(FILES_SUN) > login.sh.12
- --- 605,609 ----
- login.sh.11: $(DOCS2) Makefile
- shar -a $(DOCS2) > login.sh.11
-
- ! login.sh.12: $(FILES_SUN4) $(FILES_SVR4) Makefile
- ! shar -a $(FILES_SUN4) $(FILES_SVR4) > login.sh.12
- Index: README
- *** rel3/README Fri Mar 27 10:25:54 1992
- --- README Fri Mar 27 10:26:51 1992
- ***************
- *** 1,7 ****
- ! [ @(#)README 3.8 21:49:26 1/19/92 ]
-
- This is the explanatory document for John F. Haugh II's login replacement,
- ! release 3. This document was last updated 1/19/92.
-
- This software is copyright 1988, 1989, 1990, 1991, 1992, John F. Haugh II.
- All rights reserved. Use, duplication and disclosure is permitted according
- --- 1,7 ----
- ! [ @(#)README 3.8.1.1 20:36:10 3/7/92 ]
-
- This is the explanatory document for John F. Haugh II's login replacement,
- ! release 3. This document was last updated 3/7/92.
-
- This software is copyright 1988, 1989, 1990, 1991, 1992, John F. Haugh II.
- All rights reserved. Use, duplication and disclosure is permitted according
- ***************
- *** 75,81 ****
- system version. The pwd.h file that is produced by "make" must agree
- exactly with the system supplied version. You should re-arrange the
- fields or #define's until they match. The same is true for "shadow.h",
- ! if you system provides one.
-
- Login Defaults File -
- This option selects the name of the file to read for the
- --- 75,83 ----
- system version. The pwd.h file that is produced by "make" must agree
- exactly with the system supplied version. You should re-arrange the
- fields or #define's until they match. The same is true for "shadow.h",
- ! if you system provides one. You may want to replace large portions of
- ! that file (or the entire file) with your system version. It is provided
- ! for those systems which do NOT provide /usr/include/shadow.h.
-
- Login Defaults File -
- This option selects the name of the file to read for the
- Index: getdef.c
- *** rel3/getdef.c Fri Mar 27 10:25:51 1992
- --- getdef.c Fri Mar 27 10:26:53 1992
- ***************
- *** 1,5 ****
- /*
- ! * Copyright 1991, John F. Haugh II and Chip Rosenthal
- * All rights reserved.
- *
- * Permission is granted to copy and create derivative works for any
- --- 1,5 ----
- /*
- ! * Copyright 1991, 1992, John F. Haugh II and Chip Rosenthal
- * All rights reserved.
- *
- * Permission is granted to copy and create derivative works for any
- ***************
- *** 10,16 ****
- */
-
- #ifndef lint
- ! static char sccsid[] = "@(#)getdef.c 3.3 19:51:46 12/28/91";
- #endif
-
- #include <stdio.h>
- --- 10,16 ----
- */
-
- #ifndef lint
- ! static char sccsid[] = "@(#)getdef.c 3.5 21:21:14 3/7/92";
- #endif
-
- #include <stdio.h>
- ***************
- *** 73,79 ****
- --- 73,81 ----
- { "PORTTIME_CHECKS_ENAB", NULL },
- { "QUOTAS_ENAB", NULL },
- { "SULOG_FILE", NULL },
- + { "SU_NAME", NULL },
- { "SYSLOG_SU_ENAB", NULL },
- + { "TTYGROUP", NULL },
- { "TTYPERM", NULL },
- { "TTYTYPE_FILE", NULL },
- { "ULIMIT", NULL },
- Index: login.5
- *** rel3/login.5 Fri Mar 27 10:25:15 1992
- --- login.5 Fri Mar 27 10:26:55 1992
- ***************
- *** 1,4 ****
- ! .\" Copyright 1991, John F. Haugh II and Chip Rosenthal
- .\" All rights reserved.
- .\"
- .\" Permission is granted to copy and create derivative works for any
- --- 1,4 ----
- ! .\" Copyright 1991, 1992, John F. Haugh II and Chip Rosenthal
- .\" All rights reserved.
- .\"
- .\" Permission is granted to copy and create derivative works for any
- ***************
- *** 7,13 ****
- .\" and conspicuously displayed on all copies of object code or
- .\" distribution media.
- .\"
- ! .\" @(#)login.5 3.2 08:52:50 11/3/91
- .\"
- .TH LOGIN 5
- .SH NAME
- --- 7,13 ----
- .\" and conspicuously displayed on all copies of object code or
- .\" distribution media.
- .\"
- ! .\" @(#)login.5 3.5 12:24:15 3/8/92
- .\"
- .TH LOGIN 5
- .SH NAME
- ***************
- *** 299,304 ****
- --- 299,314 ----
- file.
- c.f. passwd(4).
- .\"
- + .IP "SU_NAME (string)"
- + This parameter assigns a command name when ``su -'' is run. For
- + example, if the parameter is defined as ``su'', then a
- + .I ps(1)
- + listing would show the command running as ``-su''. If this parameter
- + is undefined, then a
- + .I ps(1)
- + listing would show the name of the actual shell being run, e.g.
- + something like ``-sh''.
- + .\"
- .IP "SULOG_FILE (string)"
- This parameter specifies a full pathname of a file in which
- .I su
- ***************
- *** 327,337 ****
- facility.
- See SULOG_FILE for related information.
- .\"
- .IP "TTYPERM (number)"
- The login terminal permissions are initialized to this value. Typical
- values will be \f(CW0622\fP to permit others write access to the line
- or \f(CW0600\fP to secure the line from other users. If not specified,
- ! the terminal permissions will be initialized to \f(CW0622\fP.
- .\"
- .IP "TTYTYPE_FILE (string)"
- This parameter specifies the full pathname to a file which maps terminal
- --- 337,366 ----
- facility.
- See SULOG_FILE for related information.
- .\"
- + .IP "TTYGROUP (string or number)"
- + The group ownership of the terminal is initialized to this group
- + name or number. One well-known security attack involves forcing terminal
- + control sequences upon another user's terminal line. This problem
- + can be averted by disabling permissions which allow other users to
- + access the terminal line, but this unfortunately prevents programs
- + such as
- + .I write
- + from operating. Another solution is to use a version of the
- + .I write
- + program which filters out potentially dangerous character sequences,
- + make this program ``setgid'' to a special group, assign group ownership
- + of the terminal line to this special group, and assign permissions of
- + \f(CW0620\fP to the terminal line. The TTYGROUP definition has been
- + provided for just this situation. If this item is not defined, then
- + the group ownership of the terminal is initialized to the user's group
- + number. See TTYPERMS for related information.
- + .\"
- .IP "TTYPERM (number)"
- The login terminal permissions are initialized to this value. Typical
- values will be \f(CW0622\fP to permit others write access to the line
- or \f(CW0600\fP to secure the line from other users. If not specified,
- ! the terminal permissions will be initialized to \f(CW0622\fP. See
- ! TTYGROUP for related information.
- .\"
- .IP "TTYTYPE_FILE (string)"
- This parameter specifies the full pathname to a file which maps terminal
- Index: login.defs
- *** rel3/login.defs Fri Mar 27 10:25:52 1992
- --- login.defs Fri Mar 27 10:26:57 1992
- ***************
- *** 1,7 ****
- #
- # /etc/login.defs - Configuration control definitions for the login package.
- #
- ! # @(#)login.defs 3.2 19:51:49 12/28/91
- #
- # Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH.
- # If unspecified, some arbitrary (and possibly incorrect) value will
- --- 1,7 ----
- #
- # /etc/login.defs - Configuration control definitions for the login package.
- #
- ! # @(#)login.defs 3.4 21:21:25 3/7/92
- #
- # Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH.
- # If unspecified, some arbitrary (and possibly incorrect) value will
- ***************
- *** 30,35 ****
- --- 30,36 ----
- # Enable logging and display of /usr/adm/lastlog login time info.
- #
- LASTLOG_ENAB yes
- +
- #
- # Enable checking and display of mailbox status upon login.
- #
- ***************
- *** 94,99 ****
- --- 95,108 ----
- NOLOGINS_FILE /etc/nologins
-
- #
- + # If defined, the command name to display when running "su -". For
- + # example, if this is defined as "su" then a "ps" will display the
- + # command is "-su". If not defined, then "ps" would display the
- + # name of the shell actually being run, e.g. something like "-sh".
- + #
- + SU_NAME su
- +
- + #
- # *REQUIRED*
- # Directory where mailboxes reside, _or_ name of file, relative to the
- # home directory. If you _do_ define both, MAIL_DIR takes precedence.
- ***************
- *** 127,132 ****
- --- 136,142 ----
- # If defined, an HZ environment parameter spec.
- #
- ENV_HZ HZ=50
- +
- #
- # *REQUIRED* The default PATH settings, for superuser and normal users.
- #
- ***************
- *** 134,139 ****
- --- 144,164 ----
- ENV_PATH PATH=/local/bin:/usr/bin:/bin
-
- #
- + # Terminal permissions
- + #
- + # TTYGROUP Login tty will be assigned this group ownership.
- + # TTYPERM Login tty will be set to this permission.
- + #
- + # If you have a "write" program which is "setgid" to a special group
- + # which owns the terminals, define TTYGROUP to the group number and
- + # TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign
- + # TTYPERM to either 622 or 600.
- + #
- + #TTYGROUP 7
- + #TTYPERM 0620
- + TTYPERM 0622
- +
- + #
- # Login configuration initializations:
- #
- # ERASECHAR Terminal ERASE character ('\010' = backspace).
- ***************
- *** 140,146 ****
- # KILLCHAR Terminal KILL character ('\025' = CTRL/U).
- # UMASK Default "umask" value.
- # ULIMIT Default "ulimit" value.
- - # TTYPERM Login tty will be set to this permission.
- #
- # The ERASECHAR and KILLCHAR are used only on System V machines.
- # The ULIMIT is used only if the system supports it.
- --- 165,170 ----
- ***************
- *** 151,157 ****
- KILLCHAR 025
- UMASK 022
- ULIMIT 2097152
- ! TTYPERM 0622
- #
- # Password aging controls:
- #
- --- 175,181 ----
- KILLCHAR 025
- UMASK 022
- ULIMIT 2097152
- !
- #
- # Password aging controls:
- #
- ***************
- *** 164,166 ****
- --- 188,191 ----
- PASS_MIN_DAYS 0
- PASS_MIN_LEN 5
- PASS_WARN_AGE 7
- +
- Index: rad64.c
- *** rel3/rad64.c Fri Mar 27 10:23:22 1992
- --- rad64.c Fri Mar 27 10:26:59 1992
- ***************
- *** 1,5 ****
- /*
- ! * Copyright 1989, 1990, John F. Haugh II
- * All rights reserved.
- *
- * Permission is granted to copy and create derivative works for any
- --- 1,5 ----
- /*
- ! * Copyright 1989, 1990, 1992, John F. Haugh II
- * All rights reserved.
- *
- * Permission is granted to copy and create derivative works for any
- ***************
- *** 9,16 ****
- * distribution media.
- */
-
- #ifndef lint
- ! static char sccsid[] = "@(#)rad64.c 3.2 19:44:25 12/10/90";
- #endif
-
- /*
- --- 9,18 ----
- * distribution media.
- */
-
- + #include "config.h"
- +
- #ifndef lint
- ! static char sccsid[] = "@(#)rad64.c 3.3 20:38:01 3/7/92";
- #endif
-
- /*
- ***************
- *** 68,73 ****
- --- 70,77 ----
- return ('\0');
- }
-
- + #ifdef NEED_AL64
- +
- /*
- * l64a - convert a long to a string of radix 64 characters
- */
- ***************
- *** 106,108 ****
- --- 110,114 ----
- }
- return (value);
- }
- +
- + #endif /* NEED_A64L */
- Index: setup.c
- *** rel3/setup.c Fri Mar 27 10:25:46 1992
- --- setup.c Fri Mar 27 10:27:00 1992
- ***************
- *** 1,5 ****
- /*
- ! * Copyright 1989, 1990, 1991, John F. Haugh II
- * All rights reserved.
- *
- * Permission is granted to copy and create derivative works for any
- --- 1,5 ----
- /*
- ! * Copyright 1989, 1990, 1991, 1992, John F. Haugh II
- * All rights reserved.
- *
- * Permission is granted to copy and create derivative works for any
- ***************
- *** 12,17 ****
- --- 12,18 ----
- #include <sys/types.h>
- #include <stdio.h>
- #include <utmp.h>
- + #include <grp.h>
-
- #ifdef BSD
- #include <strings.h>
- ***************
- *** 33,39 ****
- #endif
-
- #ifndef lint
- ! static char sccsid[] = "@(#)setup.c 3.9 11:58:33 12/28/91";
- #endif
-
- #ifndef SU
- --- 34,40 ----
- #endif
-
- #ifndef lint
- ! static char sccsid[] = "@(#)setup.c 3.11 12:21:39 3/8/92";
- #endif
-
- #ifndef SU
- ***************
- *** 74,81 ****
- --- 75,84 ----
- char tty[sizeof utent.ut_line + 8];
- #endif
- char *cp;
- + char *group; /* TTY group name or number */
- char *maildir; /* the directory in which the mailbox resides */
- char *mailfile; /* the name of the mailbox */
- + struct group *grent;
- int i;
- long l;
-
- ***************
- *** 82,88 ****
- #ifndef SU
- (void) strcat (strcpy (tty, "/dev/"), utent.ut_line);
-
- ! if (chown (tty, info->pw_uid, info->pw_gid) ||
- chmod (tty, getdef_num("TTYPERM", 0622))) {
- (void) sprintf (buf, "Unable to change tty %s", tty);
- #ifdef USE_SYSLOG
- --- 85,100 ----
- #ifndef SU
- (void) strcat (strcpy (tty, "/dev/"), utent.ut_line);
-
- ! if (! (group = getdef_str ("TTYGROUP")))
- ! i = info->pw_gid;
- ! else if (group[0] >= '0' && group[0] <= '9')
- ! i = atoi (group);
- ! else if (grent = getgrnam (group))
- ! i = grent->gr_gid;
- ! else
- ! i = info->pw_gid;
- !
- ! if (chown (tty, info->pw_uid, i) ||
- chmod (tty, getdef_num("TTYPERM", 0622))) {
- (void) sprintf (buf, "Unable to change tty %s", tty);
- #ifdef USE_SYSLOG
- Index: shadow.c
- *** rel3/shadow.c Fri Mar 27 10:23:00 1992
- --- shadow.c Fri Mar 27 10:27:02 1992
- ***************
- *** 1,5 ****
- /*
- ! * Copyright 1989, 1990, John F. Haugh II
- * All rights reserved.
- *
- * Permission is granted to copy and create derivative works for any
- --- 1,5 ----
- /*
- ! * Copyright 1989, 1990, 1991, 1992, John F. Haugh II
- * All rights reserved.
- *
- * Permission is granted to copy and create derivative works for any
- ***************
- *** 13,18 ****
- --- 13,22 ----
- #include "config.h"
- #include <stdio.h>
-
- + #ifdef STDLIB_H
- + #include <stdlib.h>
- + #endif
- +
- #ifndef BSD
- #include <string.h>
- #include <memory.h>
- ***************
- *** 31,39 ****
- static int dbmerror;
- #endif
-
- -
- #ifndef lint
- ! static char sccsid[] = "@(#)shadow.c 3.9 08:44:32 9/12/91";
- #endif
-
- static FILE *shadow;
- --- 35,42 ----
- static int dbmerror;
- #endif
-
- #ifndef lint
- ! static char sccsid[] = "@(#)shadow.c 3.10 20:38:10 3/7/92";
- #endif
-
- static FILE *shadow;
- ***************
- *** 198,203 ****
- --- 201,209 ----
-
- struct spwd
- *getspnam (name)
- + #if __STDC__
- + const
- + #endif
- char *name;
- {
- struct spwd *sp;
- ***************
- *** 238,243 ****
- --- 244,252 ----
-
- int
- putspent (sp, fp)
- + #if __STDC__
- + const
- + #endif
- struct spwd *sp;
- FILE *fp;
- {
- Index: smain.c
- *** rel3/smain.c Fri Mar 27 10:25:38 1992
- --- smain.c Fri Mar 27 10:27:04 1992
- ***************
- *** 13,19 ****
- #include <stdio.h>
-
- #ifndef lint
- ! static char sccsid[] = "@(#)smain.c 3.10 12:04:52 12/28/91";
- #endif
-
- /*
- --- 13,19 ----
- #include <stdio.h>
-
- #ifndef lint
- ! static char sccsid[] = "@(#)smain.c 3.11 21:21:19 3/7/92";
- #endif
-
- /*
- ***************
- *** 171,176 ****
- --- 171,177 ----
- {
- SIGTYPE (*oldsig)();
- char *cp;
- + char arg0[64];
- char *tty = 0; /* Name of tty SU is run from */
- int doshell = 0;
- int fakelogin = 0;
- ***************
- *** 445,455 ****
- motd ();
- mailcheck ();
- }
- ! cp = "-su";
- ! } else if (cp = strrchr (pwent.pw_shell, '/'))
- ! cp++;
- ! else
- ! cp = pwent.pw_shell;
-
- shell (pwent.pw_shell, cp);
- #ifdef USE_SYSLOG
- --- 446,467 ----
- motd ();
- mailcheck ();
- }
- ! if ((cp = getdef_str("SU_NAME")) == NULL) {
- ! if (cp = strrchr (pwent.pw_shell, '/'))
- ! cp++;
- ! else
- ! cp = pwent.pw_shell;
- ! }
- ! arg0[0] = '-';
- ! strncpy(arg0+1, cp, sizeof(arg0)-1);
- ! arg0[sizeof(arg0)-1] = '\0';
- ! cp = arg0;
- ! } else {
- ! if (cp = strrchr (pwent.pw_shell, '/'))
- ! cp++;
- ! else
- ! cp = pwent.pw_shell;
- ! }
-
- shell (pwent.pw_shell, cp);
- #ifdef USE_SYSLOG
- Index: sulogin.c
- *** rel3/sulogin.c Fri Mar 27 10:25:55 1992
- --- sulogin.c Fri Mar 27 10:27:06 1992
- ***************
- *** 10,15 ****
- --- 10,16 ----
- */
-
- #include <sys/types.h>
- + #include <signal.h>
- #include <stdio.h>
- #include "pwd.h"
- #include <utmp.h>
- ***************
- *** 24,29 ****
- --- 25,44 ----
- #endif
- #include "config.h"
-
- + #if defined(BSD) || defined(SUN)
- + #include <sgtty.h>
- + #define USE_SGTTY 1
- + #endif
- + #if defined(USG) || defined(SUN4)
- + #ifdef _POSIX_SOURCE
- + #include <termios.h>
- + #define USE_TERMIOS 1
- + #else
- + #include <termio.h>
- + #define USE_TERMIO 1
- + #endif
- + #endif
- +
- #ifdef USE_SYSLOG
- #include <syslog.h>
-
- ***************
- *** 33,39 ****
- #endif
-
- #ifndef lint
- ! static char sccsid[] = "@(#)sulogin.c 3.8 09:42:53 1/20/92";
- #endif
-
- char name[BUFSIZ];
- --- 48,54 ----
- #endif
-
- #ifndef lint
- ! static char sccsid[] = "@(#)sulogin.c 3.10 23:56:58 3/7/92";
- #endif
-
- char name[BUFSIZ];
- ***************
- *** 45,50 ****
- --- 60,75 ----
- struct passwd pwent;
- struct utmp utent;
-
- + #ifdef USE_SGTTY
- + struct sgttyb termio;
- + #endif
- + #ifdef USE_TERMIO
- + struct termio termio;
- + #endif
- + #ifdef USE_TERMIOS
- + struct termios termio;
- + #endif
- +
- #ifndef MAXENV
- #define MAXENV 64
- #endif
- ***************
- *** 65,72 ****
- #define RETRIES 3
- #endif
-
- /*ARGSUSED*/
- ! int main (argc, argv, envp)
- int argc;
- char **argv;
- char **envp;
- --- 90,104 ----
- #define RETRIES 3
- #endif
-
- + catch (sig)
- + int sig;
- + {
- + exit (1);
- + }
- +
- /*ARGSUSED*/
- ! int
- ! main (argc, argv, envp)
- int argc;
- char **argv;
- char **envp;
- ***************
- *** 77,82 ****
- --- 109,135 ----
- char *tz ();
- char *cp;
-
- + #ifdef USE_SGTTY
- + ioctl (0, TIOCGETP, &termio);
- + termio.sg_flags |= (ECHO|CRMOD);
- + termio.sg_flags &= ~(RAW|CBREAK);
- + ioctl (0, TIOCSETN, &termio);
- + #endif
- + #ifdef USE_TERMIO
- + ioctl (0, TCSETA, &termio);
- + termio.c_iflag |= (ICRNL|IXON);
- + termio.c_oflag |= (OPOST|ONLCR);
- + termio.c_cflag |= (CREAD);
- + termio.c_lflag |= (ISIG|ICANON|ECHO|ECHOE|ECHOK);
- + ioctl (0, TCSETAF, &termio);
- + #endif
- + #ifdef USE_TERMIOS
- + tcgetattr (0, &termio);
- + termio.c_iflag |= (ICRNL|IXON);
- + termio.c_oflag |= (CREAD);
- + termio.c_lflag |= (ECHO|ECHOE|ECHOK|ICANON|ISIG);
- + tcsetattr (0, TCSANOW, &termio);
- + #endif
- #ifdef USE_SYSLOG
- openlog ("sulogin", LOG_PID|LOG_CONS|LOG_NOWAIT, LOG_AUTH);
- #endif
- ***************
- *** 122,128 ****
- addenv (cp); /* set the default $HZ, if one */
- (void) strcpy (name, "root"); /* KLUDGE!!! */
-
- ! alarm (ALARM); /* only wait so long ... */
- while (1) { /* repeatedly get login/password pairs */
- entry (name, &pwent); /* get entry from password file */
- if (pwent.pw_name == (char *) 0) {
- --- 175,183 ----
- addenv (cp); /* set the default $HZ, if one */
- (void) strcpy (name, "root"); /* KLUDGE!!! */
-
- ! signal (SIGALRM, catch); /* exit if the timer expires */
- ! alarm (ALARM); /* only wait so long ... */
- !
- while (1) { /* repeatedly get login/password pairs */
- entry (name, &pwent); /* get entry from password file */
- if (pwent.pw_name == (char *) 0) {
- ***************
- *** 160,165 ****
- --- 215,221 ----
- #endif
- }
- alarm (0);
- + signal (SIGALRM, SIG_DFL);
- environ = newenvp; /* make new environment active */
-
- puts ("Entering System Maintenance Mode");
- Index: Makefile.svr4
- *** /dev/null Fri Mar 27 10:17:32 1992
- --- Makefile.svr4 Fri Mar 27 10:27:08 1992
- ***************
- *** 0 ****
- --- 1,577 ----
- + #
- + # Copyright 1988,1989,1990,1991,1992 John F. Haugh II
- + # All rights reserved.
- + #
- + # Permission is granted to copy and create derivative works for any
- + # non-commercial purpose, provided this copyright notice is preserved
- + # in all copies of source code, or included in human readable form
- + # and conspicuously displayed on all copies of object code or
- + # distribution media.
- + #
- + # @(#)Makefile.svr4 3.3 11:27:39 - Shadow password system (SVR4)
- + #
- + # @(#)Makefile.svr4 3.3 11:27:39 3/19/92
- + #
- + SHELL = /sbin/sh
- +
- + #
- + # Set this flag to decide what level of code "get" returns.
- + # The base USENET release was release 1. It is no longer supported.
- + # The version with the utilities added was release 2.
- + # The version with database-like file access is release 3.
- + RELEASE = 3
- + GFLAGS = -t -r$(RELEASE)
- +
- + # Define the directory login is copied to. SVr4 uses /usr/bin.
- + LOGINDIR = /usr/bin
- + SBIN=/usr/sbin
- + # system (admin) commands
- + UBIN=/usr/bin
- + # user commands
- +
- + # SVr4 doesn't need extra libraries
- + NDIR =
- +
- + # Pick your favorite C compiler and tags command
- + CC = cc
- + TAGS = ctags
- +
- + # OS. This is SVr4
- + OS = -DUSG -DSVR4
- +
- + # SVr4 doesn't use ranlib
- + RANLIB = echo
- +
- + # Configuration Flags
- + #
- + # DEST_INCLUDE_DIR - local include files
- + # LIBS - system libraries
- + # -lsocket - needed for TCP/IP and possibly SYSLOG
- + # -ldbm or -lndbm - needed for DBM support
- + # -lcrypt - needed for SCO crypt() functions
- + # CFLAGS - C compiler flags
- + # -DLAI_TCP - needed for SCO Xenix Lachman TCP/IP
- +
- + DEST_INCLUDE_DIR = /usr/include
- +
- + # Flags for SVr4
- + CFLAGS = -O -g $(OS) -I$(DEST_INCLUDE_DIR)
- + LIBS =
- + LDFLAGS = -g
- +
- + # Library is libsec.a
- + LIBSEC = libsec.a
- +
- + # Names for root user and group, and bin user and group.
- + RUID = root
- + RGID = root
- + BUID = bin
- + BGID = bin
- +
- + # Where the login.defs file will be copied. Must agree with config.h
- + DEST_LOGIN_DEFS = /etc/login.defs
- +
- + # Rules for .L (lint) files.
- + .SUFFIXES: .L
- + LINT = lint
- + LINTFLAGS = $(OS) -Dlint
- +
- + .c.L:
- + $(LINT) -pxu $(LINTFLAGS) $*.c > $*.L
- +
- + LOBJS = lmain.o login.o env.o valid.o setup.o shell.o age.o \
- + utmp.o sub.o mail.o motd.o log.o ttytype.o failure.o \
- + tz.o console.o hushed.o
- +
- + LSRCS = lmain.c login.c env.c valid.c setup.c shell.c age.c \
- + utmp.c sub.c mail.c motd.c log.c ttytype.c failure.c \
- + tz.c console.c hushed.c
- +
- + SOBJS = smain.o env.o entry.o susetup.o shell.o \
- + sub.o mail.o motd.o sulog.o age.o tz.o hushed.o
- +
- + SSRCS = smain.c env.c entry.c setup.c shell.c \
- + pwent.c sub.c mail.c motd.c sulog.c shadow.c age.c pwpack.c rad64.c \
- + tz.c hushed.c
- +
- + POBJS = passwd.o obscure.o
- + PSRCS = passwd.c obscure.c
- +
- + GPSRCS = gpmain.c
- +
- + GPOBJS = gpmain.o
- +
- + PWOBJS = pwconv.o
- +
- + PWSRCS = pwconv.c pwent.c shadow.c pwpack.c rad64.c
- +
- + PWUNOBJS = pwunconv.o
- +
- + PWUNSRCS = pwunconv.c pwent.c shadow.c pwpack.c rad64.c
- +
- + SULOGOBJS = sulogin.o entry.o env.o age.o setup.o \
- + valid.o shell.o tz.o
- +
- + SULOGSRCS = sulogin.c entry.c env.c age.c pwent.c setup.c \
- + shadow.c shell.c valid.c pwpack.c tz.c
- +
- + MKPWDOBJS = mkpasswd.o
- +
- + MKPWDSRCS = mkpasswd.c
- +
- + NGSRCS = newgrp.c env.c shell.c
- +
- + NGOBJS = newgrp.o env.o shell.o
- +
- + CHFNSRCS = chfn.c fields.c
- + CHFNOBJS = chfn.o fields.o
- + CHSHSRCS = chsh.c fields.c
- + CHSHOBJS = chsh.o fields.o
- + CHAGEOBJS = chage.o fields.o
- + CHAGESRCS = chage.c fields.c
- + CHPASSOBJS = chpasswd.o
- + CHPASSSRCS = chpasswd.c
- + DPSRCS = dpmain.c
- + DPOBJS = dpmain.o
- +
- + ALLSRCS = age.c dialchk.c dialup.c entry.c env.c lmain.c log.c login.c mail.c \
- + motd.c obscure.c passwd.c pwconv.c pwent.c pwunconv.c getpass.c \
- + setup.c shadow.c shell.c smain.c sub.c sulog.c sulogin.c ttytype.c \
- + utmp.c valid.c port.c newgrp.c gpmain.c grent.c mkpasswd.c pwpack.c \
- + chfn.c chsh.c chage.c rad64.c encrypt.c chpasswd.c shadowio.c pwio.c \
- + newusers.c groupio.c fields.c pwdbm.c grpack.c grdbm.c sppack.c \
- + spdbm.c dpmain.c gshadow.c gsdbm.c gspack.c sgroupio.c useradd.c \
- + userdel.c patchlevel.h usermod.c copydir.c mkrmdir.c groupadd.c \
- + groupdel.c groupmod.c tz.c console.c hushed.c getdef.c scologin.c \
- + logoutd.c groups.c
- +
- + FILES1 = README patchlevel.h newgrp.c Makefile config.h pwunconv.c obscure.c \
- + age.c id.c
- +
- + FILES2 = passwd.c port.c lmain.c sulogin.c pwpack.c dialup.c
- +
- + FILES3 = chfn.c chsh.c smain.c faillog.c pwconv.c shadow.c
- +
- + FILES4 = gpmain.c chage.c pwent.c valid.c setup.c entry.c ttytype.c port.h
- +
- + FILES5 = pwio.c encrypt.c chpasswd.c newusers.c rad64.c dialchk.c faillog.h \
- + pwdbm.c grdbm.c gshadow.c sppack.c
- +
- + FILES6 = gspack.c spdbm.c lastlog.h shell.c login.c sub.c dpmain.c mail.c \
- + env.c pwd.h.m4 grpack.c shadow.h log.c grent.c motd.c dialup.h \
- + fields.c gsdbm.c utmp.c failure.c
- +
- + FILES7 = groupio.c shadowio.c sgroupio.c groups.c copydir.c mkrmdir.c \
- + mkpasswd.c
- +
- + FILES8 = useradd.c usermod.c login.defs
- +
- + FILES9 = groupadd.c groupdel.c groupmod.c tz.c console.c hushed.c getdef.c \
- + scologin.c logoutd.c sulog.c getpass.c userdel.c
- +
- + FILES_SUN4 = Makefile.sun4 README.sun4 config.h.sun4
- + FILES_SVR4 = Makefile.svr4 config.h.svr4
- +
- + MAN_1 = chage.1 chfn.1 chsh.1 id.1 login.1 newgrp.1 passwd.1 su.1 \
- + useradd.1 userdel.1 usermod.1 groupadd.1 groupdel.1 groupmod.1 \
- + groups.1
- + MAN_3 = shadow.3
- + MAN_4 = faillog.4 passwd.4 porttime.4 shadow.4
- + MAN_5 = login.5
- + MAN_8 = chpasswd.8 dpasswd.8 faillog.8 newusers.8 pwconv.8 pwunconv.8 \
- + sulogin.8 mkpasswd.8 logoutd.8
- +
- + DOCS1 = $(MAN_1) $(MAN_3) $(MAN_4)
- + DOCS2 = $(MAN_5) $(MAN_8)
- + DOCS = $(DOCS1) $(DOCS2)
- +
- + BINS = su login pwconv pwunconv passwd sulogin faillog newgrp gpasswd \
- + mkpasswd chfn chsh chage chpasswd newusers dpasswd id useradd \
- + userdel usermod groupadd groupdel groupmod $(SCOLOGIN) logoutd \
- + groups
- +
- + all: $(BINS) $(DOCS)
- +
- + .PRECIOUS: libshadow.a
- +
- + libshadow.a: \
- + libshadow.a(dialchk.o) \
- + libshadow.a(dialup.o) \
- + libshadow.a(encrypt.o) \
- + libshadow.a(getdef.o) \
- + libshadow.a(getpass.o) \
- + libshadow.a(grdbm.o) \
- + libshadow.a(grent.o) \
- + libshadow.a(groupio.o) \
- + libshadow.a(grpack.o) \
- + libshadow.a(gshadow.o) \
- + libshadow.a(gsdbm.o) \
- + libshadow.a(gspack.o) \
- + libshadow.a(sgroupio.o) \
- + libshadow.a(port.o) \
- + libshadow.a(pwdbm.o) \
- + libshadow.a(pwent.o) \
- + libshadow.a(pwio.o) \
- + libshadow.a(pwpack.o) \
- + libshadow.a(rad64.o) \
- + libshadow.a(spdbm.o) \
- + libshadow.a(shadow.o) \
- + libshadow.a(shadowio.o) \
- + libshadow.a(sppack.o)
- + $(RANLIB) libshadow.a
- +
- + libsec: $(LIBSEC)(shadow.o)
- + $(RANLIB) $(LIBSEC)
- +
- + install: all
- + strip $(BINS)
- + mcs -da '@(#)shadow 3.1.1' $(BINS)
- + cp login $(LOGINDIR)/login
- + cp mkpasswd pwconv pwunconv sulogin chpasswd newusers \
- + useradd userdel usermod groupadd groupdel groupmod logoutd $(SBIN)
- + cp su passwd gpasswd dpasswd faillog newgrp chfn chsh chage id $(UBIN)
- + cp dialup.h shadow.h pwd.h /usr/include
- + chown $(RUID) $(LOGINDIR)/login $(SBIN)/pwconv $(SBIN)/pwunconv $(SBIN)/sulogin \
- + $(UBIN)/su $(UBIN)/passwd $(UBIN)/gpasswd $(UBIN)/newgrp $(SBIN)/mkpasswd \
- + $(UBIN)/dpasswd $(UBIN)/chsh $(UBIN)/chfn $(UBIN)/chage $(SBIN)/useradd \
- + $(SBIN)/userdel $(SBIN)/usermod $(SBIN)/groupadd $(SBIN)/groupdel \
- + $(SBIN)/groupmod $(SBIN)/logoutd
- + chgrp $(RGID) $(LOGINDIR)/login $(SBIN)/pwconv $(SBIN)/pwunconv $(SBIN)/sulogin \
- + $(UBIN)/su $(UBIN)/passwd $(UBIN)/gpasswd $(UBIN)/newgrp $(SBIN)/mkpasswd \
- + $(UBIN)/dpasswd $(UBIN)/chsh $(UBIN)/chfn $(UBIN)/chage $(SBIN)/useradd \
- + $(SBIN)/userdel $(SBIN)/usermod $(SBIN)/groupadd $(SBIN)/groupdel \
- + $(SBIN)/groupmod $(SBIN)/logoutd
- + chown $(BUID) $(UBIN)/faillog $(UBIN)/id /usr/include/shadow.h \
- + /usr/include/dialup.h /usr/include/pwd.h
- + chgrp $(BGID) $(UBIN)/faillog $(UBIN)/id /usr/include/shadow.h \
- + /usr/include/dialup.h /usr/include/pwd.h
- + chmod 700 $(SBIN)/pwconv $(SBIN)/pwunconv $(SBIN)/sulogin $(SBIN)/mkpasswd \
- + $(SBIN)/chpasswd $(SBIN)/newusers $(UBIN)/dpasswd $(UBIN)/chage \
- + $(SBIN)/useradd $(SBIN)/userdel $(SBIN)/usermod $(SBIN)/groupadd \
- + $(SBIN)/groupdel $(SBIN)/groupmod $(SBIN)/logoutd
- + chmod 4711 $(LOGINDIR)/login $(UBIN)/su $(UBIN)/passwd $(UBIN)/gpasswd \
- + $(UBIN)/newgrp $(UBIN)/chfn $(UBIN)/chsh
- + chmod 711 $(UBIN)/faillog $(UBIN)/id
- + chmod 444 /usr/include/shadow.h /usr/include/dialup.h \
- + /usr/include/pwd.h
- + [ -f /etc/login.defs ] || (cp login.defs /etc ; \
- + chown $(RUID) /etc/login.defs ; \
- + chgrp $(RGID) /etc/login.defs ; \
- + chmod 600 /etc/login.defs )
- + [ -z "$(SCOLOGIN)" ] || (cp scologin $(UBIN)/login ; \
- + chown $(RUID) $(UBIN)/login ; \
- + chgrp $(RGID) $(UBIN)/login ; \
- + chmod 755 $(UBIN)/login )
- +
- + lint: su.lint login.lint pwconv.lint pwunconv.lint passwd.lint sulogin.lint \
- + faillog.lint newgrp.lint gpasswd.lint mkpasswd.lint chfn.lint \
- + chsh.lint chage.lint dpasswd.lint id.lint useradd.lint userdel.lint \
- + usermod.lint groupadd.lint groupdel.lint groupmod.lint logoutd.lint \
- + $(ALLSRCS:.c=.L)
- +
- + tags: $(ALLSRCS)
- + $(TAGS) $(ALLSRCS)
- +
- + README:
- + [ -f s.README ] && get -t -r$(RELEASE) s.README
- +
- + $(DOCS):
- + [ -f s.$@ ] && get -t -r$(RELEASE) s.$@
- +
- + login.defs:
- + [ -f s.login.defs ] && get -t -r$(RELEASE) s.login.defs
- +
- + Makefile.sun4:
- + [ -f s.Makefile.sun4 ] && get -t -r$(RELEASE) s.Makefile.sun4
- +
- + Makefile.svr4:
- + [ -f s.Makefile.svr4 ] && get -t -r$(RELEASE) s.Makefile.svr4
- +
- + README.sun4:
- + [ -f s.README.sun4 ] && get -t -r$(RELEASE) s.README.sun4
- +
- + config.h.sun4:
- + [ -f s.config.h.sun4 ] && get -t -r$(RELEASE) s.config.h.sun4
- +
- + config.h.svr4:
- + [ -f s.config.h.svr4 ] && get -t -r$(RELEASE) s.config.h.svr4
- +
- + login: $(LOBJS) libshadow.a
- + $(CC) -o login $(LDFLAGS) $(LOBJS) libshadow.a $(LIBS)
- +
- + login.lint: $(LSRCS)
- + $(LINT) $(LINTFLAGS) $(LSRCS) > login.lint
- +
- + su: $(SOBJS) libshadow.a
- + $(CC) -o su $(LDFLAGS) $(SOBJS) libshadow.a $(LIBS)
- +
- + su.lint: $(SSRCS)
- + $(LINT) $(LINTFLAGS) -DSU $(SSRCS) > su.lint
- +
- + passwd: $(POBJS) libshadow.a
- + $(CC) -o passwd $(LDFLAGS) $(POBJS) libshadow.a $(LIBS)
- +
- + passwd.lint: $(PSRCS)
- + $(LINT) $(LINTFLAGS) -DPASSWD $(PSRCS) > passwd.lint
- +
- + gpasswd: $(GPOBJS) libshadow.a
- + $(CC) -o gpasswd $(LDFLAGS) $(GPOBJS) libshadow.a $(LIBS)
- +
- + gpasswd.lint: $(GPSRCS)
- + $(LINT) $(LINTFLAGS) $(GPSRCS) > gpasswd.lint
- +
- + dpasswd: $(DPOBJS) libshadow.a
- + $(CC) -o dpasswd $(LDFLAGS) $(DPOBJS) libshadow.a $(LIBS)
- +
- + dpasswd.lint: $(DPSRCS)
- + $(LINT) $(LINTFLAGS) $(DPSRCS) > dpasswd.lint
- +
- + pwconv: $(PWOBJS) libshadow.a config.h
- + $(CC) -o pwconv $(LDFLAGS) $(PWOBJS) libshadow.a $(LIBS)
- +
- + pwconv.lint: $(PWSRCS) config.h
- + $(LINT) $(LINTFLAGS) -DPASSWD $(PWSRCS) > pwconv.lint
- +
- + pwunconv: $(PWUNOBJS) libshadow.a config.h
- + $(CC) -o pwunconv $(LDFLAGS) $(PWUNOBJS) libshadow.a $(LIBS)
- +
- + pwunconv.lint: $(PWUNSRCS)
- + $(LINT) $(LINTFLAGS) -DPASSWD $(PWUNSRCS) > pwunconv.lint
- +
- + sulogin: $(SULOGOBJS) libshadow.a
- + $(CC) -o sulogin $(LDFLAGS) $(SULOGOBJS) libshadow.a $(LIBS)
- +
- + sulogin.lint: $(SULOGSRCS)
- + $(LINT) $(LINTFLAGS) $(SULOGSRCS) > sulogin.lint
- +
- + faillog: faillog.o
- + $(CC) -o faillog $(LDFLAGS) faillog.o $(LIBS)
- +
- + faillog.lint: faillog.c faillog.h config.h
- + $(LINT) $(LINTFLAGS) faillog.c > faillog.lint
- +
- + mkpasswd: $(MKPWDOBJS) libshadow.a
- + $(CC) -o mkpasswd $(LDFLAGS) $(MKPWDOBJS) libshadow.a $(LIBS)
- +
- + mkpasswd.lint: $(MKPWDSRCS)
- + $(LINT) $(LINTFLAGS) $(MKPWDSRCS) > mkpasswd.lint
- +
- + newgrp: $(NGOBJS) libshadow.a
- + $(CC) -o newgrp $(LDFLAGS) $(NGOBJS) libshadow.a $(LIBS)
- +
- + newgrp.lint: $(NGSRCS)
- + $(LINT) $(LINTFLAGS) $(NGSRCS) > newgrp.lint
- +
- + chfn: $(CHFNOBJS) libshadow.a
- + $(CC) -o chfn $(LDFLAGS) $(CHFNOBJS) libshadow.a $(LIBS)
- +
- + chfn.lint: $(CHFNSRCS)
- + $(LINT) $(LINTFLAGS) $(CHFNSRCS) > chfn.lint
- +
- + chsh: $(CHSHOBJS) libshadow.a
- + $(CC) -o chsh $(LDFLAGS) $(CHSHOBJS) libshadow.a $(LIBS)
- +
- + chsh.lint: $(CHSHSRCS)
- + $(LINT) $(LINTFLAGS) $(CHSHSRCS) > chsh.lint
- +
- + chage: $(CHAGEOBJS) libshadow.a
- + $(CC) -o chage $(LDFLAGS) $(CHAGEOBJS) libshadow.a $(LIBS)
- +
- + chage.lint: $(CHAGESRCS)
- + $(LINT) $(LINTFLAGS) -DPASSWD $(CHAGESRCS) > chage.lint
- +
- + chpasswd: $(CHPASSOBJS) libshadow.a
- + $(CC) -o chpasswd $(LDFLAGS) $(CHPASSOBJS) libshadow.a $(LIBS)
- +
- + chpasswd.lint: $(CHPASSSRCS)
- + $(LINT) $(LINTFLAGS) $(CHPASSSRCS) > chpasswd.lint
- +
- + newusers: newusers.o libshadow.a
- + $(CC) -o newusers $(LDFLAGS) newusers.o libshadow.a $(LIBS)
- +
- + newusers.lint: newusers.c
- + $(LINT) $(LINTFLAGS) newusers.c > newusers.lint
- +
- + id: id.o libshadow.a
- + $(CC) -o id $(LDFLAGS) id.o libshadow.a $(LIBS)
- +
- + id.lint: id.c
- + $(LINT) $(LINTFLAGS) id.c > id.lint
- +
- + groups: groups.o libshadow.a
- + $(CC) -o groups $(LDFLAGS) groups.o libshadow.a $(LIBS)
- +
- + groups.lint: groups.c
- + $(LINT) $(LINTFLAGS) groups.c > groups.lint
- +
- + useradd: useradd.o copydir.o mkrmdir.o libshadow.a
- + $(CC) -o useradd $(LDFLAGS) useradd.o copydir.o mkrmdir.o \
- + libshadow.a $(LIBS) $(NDIR)
- +
- + useradd.lint: useradd.c copydir.c mkrmdir.c
- + $(LINT) $(LINTFLAGS) useradd.c copydir.c mkrmdir.c > useradd.lint
- +
- + userdel: userdel.o copydir.o mkrmdir.o libshadow.a
- + $(CC) -o userdel $(LDFLAGS) userdel.o copydir.o mkrmdir.o \
- + libshadow.a $(LIBS) $(NDIR)
- +
- + userdel.lint: userdel.c copydir.c mkrmdir.c
- + $(LINT) $(LINTFLAGS) userdel.c copydir.c mkrmdir.c > userdel.lint
- +
- + usermod: usermod.o copydir.o mkrmdir.o libshadow.a
- + $(CC) -o usermod $(LDFLAGS) usermod.o copydir.o mkrmdir.o \
- + libshadow.a $(LIBS) $(NDIR)
- +
- + usermod.lint: usermod.c copydir.c mkrmdir.c
- + $(LINT) $(LINTFLAGS) usermod.c copydir.c mkrmdir.c > usermod.lint
- +
- + groupadd: groupadd.o libshadow.a
- + $(CC) -o groupadd $(LDFLAGS) groupadd.o libshadow.a $(LIBS)
- +
- + groupadd.lint: groupadd.c
- + $(LINT) $(LINTFLAGS) groupadd.c > groupadd.lint
- +
- + groupdel: groupdel.o libshadow.a
- + $(CC) -o groupdel $(LDFLAGS) groupdel.o libshadow.a $(LIBS)
- +
- + groupdel.lint: groupdel.c
- + $(LINT) $(LINTFLAGS) groupdel.c > groupdel.lint
- +
- + groupmod: groupmod.o libshadow.a
- + $(CC) -o groupmod $(LDFLAGS) groupmod.o libshadow.a $(LIBS)
- +
- + groupmod.lint: groupmod.c
- + $(LINT) $(LINTFLAGS) groupmod.c > groupmod.lint
- +
- + pwd.h.m4:
- + [ -f s.pwd.h.m4 ] && get -t -r$(RELEASE) s.pwd.h.m4
- +
- + pwd.h: pwd.h.m4
- + m4 $(OS) < pwd.h.m4 > pwd.h
- +
- + logoutd: logoutd.o libshadow.a
- + $(CC) -o logoutd $(LDFLAGS) logoutd.o libshadow.a
- +
- + logoutd.lint: logoutd.c
- + $(LINT) $(LINTFLAGS) logoutd.c > logoutd.lint
- +
- + sulog.o: config.h
- +
- + susetup.c: setup.c
- + cp setup.c susetup.c
- +
- + susetup.o: config.h susetup.c pwd.h
- + $(CC) -c $(CFLAGS) -DSU susetup.c
- +
- + scologin: scologin.o
- + $(CC) -o scologin $(LDFLAGS) scologin.o -lsocket
- +
- + passwd.o: config.h shadow.h pwd.h
- + lmain.o: config.h lastlog.h faillog.h pwd.h
- + smain.o: config.h lastlog.h pwd.h shadow.h
- + sub.o: pwd.h
- + setup.o: config.h pwd.h
- + mkrmdir.o: config.h
- + utmp.o: config.h
- + mail.o: config.h
- + motd.o: config.h
- + age.o: config.h pwd.h
- + log.o: config.h lastlog.h pwd.h
- + shell.o: config.h
- + entry.o: config.h shadow.h pwd.h
- + hushed.o: config.h pwd.h
- + valid.o: config.h pwd.h
- + failure.o: faillog.h config.h
- + faillog.o: faillog.h config.h pwd.h
- + newgrp.o: config.h shadow.h pwd.h
- + mkpasswd.o: config.h shadow.h pwd.h
- + gpmain.o: config.h pwd.h
- + chfn.o: config.h pwd.h
- + chsh.o: config.h pwd.h
- + chage.o: config.h shadow.h pwd.h
- + pwconv.o: config.h shadow.h
- + pwunconv.o: config.h shadow.h pwd.h
- + chpasswd.o: config.h shadow.h pwd.h
- + id.o: pwd.h
- + newusers.o: config.h shadow.h pwd.h
- + dpmain.o: dialup.h
- + useradd.o: config.h shadow.h pwd.h
- + userdel.o: config.h shadow.h pwd.h
- + usermod.o: config.h shadow.h pwd.h
- + groupadd.o: config.h shadow.h
- + groupdel.o: config.h shadow.h
- + groupmod.o: config.h shadow.h
- + logoutd.o: config.h
- + sulogin.o: config.h
- +
- + libshadow.a(shadow.o): shadow.h config.h
- + libshadow.a(shadowio.o): shadow.h
- + libshadow.a(grent.o): config.h shadow.h
- + libshadow.a(sgroupio.o): shadow.h
- + libshadow.a(dialup.o): dialup.h
- + libshadow.a(dialchk.o): dialup.h config.h
- + libshadow.a(getdef.o): config.h
- + libshadow.a(pwdbm.o): config.h pwd.h
- + libshadow.a(spdbm.o): config.h shadow.h
- + libshadow.a(grdbm.o): config.h
- + libshadow.a(gsdbm.o): config.h shadow.h
- + libshadow.a(pwpack.o): config.h pwd.h
- + libshadow.a(pwent.o): config.h pwd.h
- + libshadow.a(pwio.o): pwd.h
- + libshadow.a(getpass.o): config.h
- + libshadow.a(encrypt.o): config.h
- + libshadow.a(port.o): port.h
- + libshadow.a(rad64.o): config.h
- +
- + clean:
- + -rm -f susetup.c *.o a.out core npasswd nshadow *.pag *.dir pwd.h
- +
- + clobber: clean
- + -rm -f $(BINS) *.lint *.L libshadow.a
- +
- + nuke: clobber
- + -for file in * ; do \
- + if [ -f s.$$file -a ! -f p.$$file ] ; then \
- + rm -f $$file ;\
- + fi ;\
- + done
- +
- + shar: login.sh.01 login.sh.02 login.sh.03 login.sh.04 login.sh.05 \
- + login.sh.06 login.sh.07 login.sh.08 login.sh.09 login.sh.10 \
- + login.sh.11 login.sh.12
- +
- + login.sh.01: $(FILES1) Makefile
- + shar -a $(FILES1) > login.sh.01
- +
- + login.sh.02: $(FILES2) Makefile
- + shar -a $(FILES2) > login.sh.02
- +
- + login.sh.03: $(FILES3) Makefile
- + shar -a $(FILES3) > login.sh.03
- +
- + login.sh.04: $(FILES4) Makefile
- + shar -a $(FILES4) > login.sh.04
- +
- + login.sh.05: $(FILES5) Makefile
- + shar -a $(FILES5) > login.sh.05
- +
- + login.sh.06: $(FILES6) Makefile
- + shar -a $(FILES6) > login.sh.06
- +
- + login.sh.07: $(FILES7) Makefile
- + shar -a $(FILES7) > login.sh.07
- +
- + login.sh.08: $(FILES8) Makefile
- + shar -a $(FILES8) > login.sh.08
- +
- + login.sh.09: $(FILES9) Makefile
- + shar -a $(FILES9) > login.sh.09
- +
- + login.sh.10: $(DOCS1) Makefile
- + shar -a $(DOCS1) > login.sh.10
- +
- + login.sh.11: $(DOCS2) Makefile
- + shar -a $(DOCS2) > login.sh.11
- +
- + login.sh.12: $(FILES_SUN4) $(FILES_SVR4) Makefile
- + shar -a $(FILES_SUN4) $(FILES_SVR4) > login.sh.12
- Index: config.h.svr4
- *** /dev/null Fri Mar 27 10:17:32 1992
- --- config.h.svr4 Fri Mar 27 10:27:10 1992
- ***************
- *** 0 ****
- --- 1,125 ----
- + /*
- + * Copyright 1989, 1990, 1991, John F. Haugh II
- + * All rights reserved.
- + *
- + * Permission is granted to copy and create derivative works for any
- + * non-commercial purpose, provided this copyright notice is preserved
- + * in all copies of source code, or included in human readable form
- + * and conspicuously displayed on all copies of object code or
- + * distribution media.
- + */
- +
- + /*
- + * Configuration file for login.
- + *
- + * @(#)config.h.svr4 3.1 22:17:11 3/7/92 (SVR4)
- + */
- +
- +
- + /*
- + * Pathname to the run-time configuration definitions file.
- + */
- +
- + #define LOGINDEFS "/etc/login.defs"
- +
- + /*
- + * Define SHADOWPWD to use shadow [ unreadable ] password file.
- + * Release 3 has a requirement that SHADOWPWD always be defined.
- + */
- +
- + #define SHADOWPWD
- +
- + /*
- + * Define AUTOSHADOW to have root always copy sp_pwdp to pw_passwd
- + * for getpwuid() and getpwnam(). This provides compatibility for
- + * privileged applications which are shadow-ignorant. YOU ARE
- + * ENCOURAGED TO NOT USE THIS OPTION UNLESS ABSOLUTELY NECESSARY.
- + */
- +
- + #define AUTOSHADOW
- +
- + /*
- + * Define SHADOWGRP to user shadowed group files. This feature adds
- + * the concept of a group administrator.
- + */
- +
- + /* #define SHADOWGRP /**/
- +
- + /*
- + * Define DOUBLESIZE to use 16 character passwords
- + */
- +
- + #define DOUBLESIZE
- +
- + /*
- + * Define AGING if you want the password aging checks made.
- + * Release 3 has a requirement that AGING always be defined.
- + */
- +
- + #define AGING
- +
- + /*
- + * Pick your version of DBM. If you define either DBM or NDBM, you must
- + * define GETPWENT. If you define NDBM you must define GETGRENT as well.
- + */
- +
- + /* #define DBM /**/
- + /* #define NDBM /**/
- +
- + /*
- + * Define USE_SYSLOG if you want to have SYSLOG functions included in your code.
- + */
- +
- + #undef USE_SYSLOG
- +
- + /*
- + * Enable RLOGIN to support the "-r" and "-h" options.
- + * Also enable UT_HOST if your /etc/utmp provides for a host name.
- + */
- +
- + #undef RLOGIN
- + #undef UT_HOST
- +
- + /*
- + * Select one of the following
- + */
- +
- + /* #define DIR_XENIX /* include <sys/ndir.h>, use (struct direct) */
- + /* #define DIR_BSD /* include <ndir.h>, use (struct direct) */
- + #define DIR_SYSV /* include <dirent.h>, use (struct dirent) */
- +
- + /*
- + * Various system environment definitions.
- + */
- +
- + #define HAVE_ULIMIT /* Define if your UNIX supports ulimit() */
- + #undef GETPWENT /* Define if you want my GETPWENT(3) routines */
- + #undef GETGRENT /* Define if you want my GETGRENT(3) routines */
- + #undef NEED_AL64 /* Define if library does not include a64l() */
- + #undef NEED_MKDIR /* Define if system does not have mkdir() */
- + #undef NEED_RMDIR /* Define if system does not have rmdir() */
- + #undef NEED_RENAME /* Define if system does not have rename() */
- + #undef NEED_STRSTR /* Define if library does not include strstr() */
- + #define SIGTYPE void /* Type returned by signal() */
- +
- + /*
- + * These definitions MUST agree with the values defined in <pwd.h>.
- + */
- +
- + #undef BSD_QUOTA /* the pw_quota field exists */
- + #define ATT_AGE /* the pw_age field exists */
- + #define ATT_COMMENT /* the pw_comment field exists */
- +
- + /*
- + * Define NDEBUG for production versions
- + */
- +
- + #define NDEBUG
- +
- + /*
- + * Define PWDFILE and GRPFILE to the names of the password and
- + * group files.
- + */
- +
- + #define PWDFILE "/etc/passwd"
- + #define GRPFILE "/etc/group"
- --
- John F. Haugh II | Every 56 days. | UUCP: ...!cs.utexas.edu!rpp386!jfh
- Ma Bell: (512) 251-2151 | Give Blood, often. | Domain: jfh@rpp386.cactus.org
- "A countryman between two lawyers is like a fish between two cats."
- -- Benjamin Franklin
-
- exit 0 # Just in case...
-