*** dist/./Makefile Sun Mar 15 12:00:39 1992 --- src/./Makefile Sun Mar 15 12:03:10 1992 *************** *** 25,32 **** # Define the directory login is copied to. BE VERY CAREFUL!!! BSD old SunOS # seems to use /bin, USG seems to use /etc, SunOS 4.1.1 seems to use /usr/bin. # If you define SCOLOGIN, you MUST use /etc as LOGINDIR. ! # LOGINDIR = /bin ! LOGINDIR = /etc # LOGINDIR = /usr/bin # Define any special libraries required to access the directory routines. --- 25,32 ---- # Define the directory login is copied to. BE VERY CAREFUL!!! BSD old SunOS # seems to use /bin, USG seems to use /etc, SunOS 4.1.1 seems to use /usr/bin. # If you define SCOLOGIN, you MUST use /etc as LOGINDIR. ! LOGINDIR = /bin ! # LOGINDIR = /etc # LOGINDIR = /usr/bin # Define any special libraries required to access the directory routines. *************** *** 33,40 **** # Some systems require -lndir for the directory routines. SCO Xenix uses # -lx for that. Your system might need nothing. # NDIR = -lndir ! NDIR = -lx ! # NDIR = # Pick your favorite C compiler and tags command CC = cc --- 33,40 ---- # Some systems require -lndir for the directory routines. SCO Xenix uses # -lx for that. Your system might need nothing. # NDIR = -lndir ! # NDIR = -lx ! NDIR = # Pick your favorite C compiler and tags command CC = cc *************** *** 69,80 **** DEST_INCLUDE_DIR = /usr/include # Flags for SCO Xenix/386 ! CFLAGS = -O -M3 -g $(OS) -I$(DEST_INCLUDE_DIR) ! LIBS = -lcrypt -lndbm # LIBS = -lcrypt -ldbm ! LDFLAGS = -M3 -g ! LTFLAGS = # Flags for normal machines # CFLAGS = -O -g $(OS) -I$(DEST_INCLUDE_DIR) --- 69,87 ---- DEST_INCLUDE_DIR = /usr/include + # Flags for Linux + CFLAGS = $(OS) -DSVR4 -O3 + LIBS = -lufc -lsdbm + # LIBS = -lshadow -lufc -lsdbm + # LDFLAGS = -static # very optional + # LTFLAGS = + # Flags for SCO Xenix/386 ! # CFLAGS = -O -M3 -g $(OS) -I$(DEST_INCLUDE_DIR) ! # LIBS = -lcrypt -lndbm # LIBS = -lcrypt -ldbm ! # LDFLAGS = -M3 -g ! # LTFLAGS = # Flags for normal machines # CFLAGS = -O -g $(OS) -I$(DEST_INCLUDE_DIR) *************** *** 89,96 **** # This should be Slibsec.a for small model, or Llibsec.a for # large model or whatever. MUST AGREE WITH CFLAGS!!! For non-Intel # machines, just use libsec.a ! LIBSEC = Slibsec.a ! # LIBSEC = libsec.a # Names for root user and group, and bin user and group. See your # /etc/passwd and /etc/group files. BSD and SUN use "wheel", most --- 96,103 ---- # This should be Slibsec.a for small model, or Llibsec.a for # large model or whatever. MUST AGREE WITH CFLAGS!!! For non-Intel # machines, just use libsec.a ! # LIBSEC = Slibsec.a ! LIBSEC = libsec.a # Names for root user and group, and bin user and group. See your # /etc/passwd and /etc/group files. BSD and SUN use "wheel", most *************** *** 227,256 **** .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) --- 234,247 ---- .PRECIOUS: libshadow.a ! SHADOWFILES=dialchk.o dialup.o encrypt.o getdef.o getpass.o grdbm.o \ ! grent.o groupio.o grpack.o gshadow.o gsdbm.o gspack.o sgroupio.o \ ! port.o pwdbm.o pwent.o pwio.o pwpack.o rad64.o spdbm.o shadow.o \ ! shadowio.o sppack.o ! ! libshadow.a: $(SHADOWFILES) ! rm -f libshadow.a ! ar cqv libshadow.a $(SHADOWFILES) $(RANLIB) libshadow.a libsec: $(LIBSEC)(shadow.o) *************** *** 377,383 **** $(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 --- 368,374 ---- $(LINT) $(LINTFLAGS) $(SULOGSRCS) > sulogin.lint faillog: faillog.o ! $(CC) -o faillog $(LDFLAGS) faillog.o libshadow.a $(LIBS) faillog.lint: faillog.c faillog.h config.h $(LINT) $(LINTFLAGS) faillog.c > faillog.lint *** dist/./chfn.c Sun Mar 15 12:00:43 1992 --- src/./chfn.c Sun Mar 15 12:01:34 1992 *************** *** 42,51 **** #define LOG_WARN LOG_WARNING #endif #endif ! #ifdef USE_RLIMIT #include ! struct rlimit rlimit_fsize = { RLIM_INFINITY, RLIM_INFINIT }; #endif /* --- 42,52 ---- #define LOG_WARN LOG_WARNING #endif #endif ! #ifdef HAVE_RLIMIT ! #include #include ! struct rlimit rlimit_fsize = { RLIM_INFINITY, RLIM_INFINITY }; #endif /* *** dist/./chsh.c Sun Mar 15 12:00:44 1992 --- src/./chsh.c Sun Mar 15 12:01:35 1992 *************** *** 42,51 **** #define LOG_WARN LOG_WARNING #endif #endif ! #ifdef USE_RLIMIT #include ! struct rlimit rlimit_fsize = { RLIM_INFINITY, RLIM_INFINIT }; #endif /* --- 42,52 ---- #define LOG_WARN LOG_WARNING #endif #endif ! #ifdef HAVE_RLIMIT ! #include #include ! struct rlimit rlimit_fsize = { RLIM_INFINITY, RLIM_INFINITY }; #endif /* *** dist/./config.h Sun Mar 15 12:00:44 1992 --- src/./config.h Sun Mar 15 12:37:46 1992 *************** *** 43,49 **** * the concept of a group administrator. */ ! /* #define SHADOWGRP /**/ /* * Define DOUBLESIZE to use 16 character passwords --- 43,49 ---- * the concept of a group administrator. */ ! #define SHADOWGRP /**/ /* * Define DOUBLESIZE to use 16 character passwords *************** *** 64,76 **** */ /* #define DBM /**/ ! /* #define NDBM /**/ /* * Define USE_SYSLOG if you want to have SYSLOG functions included in your code. */ ! #define USE_SYSLOG /* * Enable RLOGIN to support the "-r" and "-h" options. --- 64,76 ---- */ /* #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. *************** *** 77,83 **** * Also enable UT_HOST if your /etc/utmp provides for a host name. */ ! #define RLOGIN #undef UT_HOST /* --- 77,83 ---- * Also enable UT_HOST if your /etc/utmp provides for a host name. */ ! #undef RLOGIN #undef UT_HOST /* *************** *** 92,100 **** * Select one of the following */ ! #define DIR_XENIX /* include , use (struct direct) */ /* #define DIR_BSD /* include , use (struct direct) */ ! /* #define DIR_SYSV /* include , use (struct dirent) */ /* * Various system environment definitions. --- 92,100 ---- * Select one of the following */ ! /* #define DIR_XENIX /* include , use (struct direct) */ /* #define DIR_BSD /* include , use (struct direct) */ ! #define DIR_SYSV /* include , use (struct dirent) */ /* * Various system environment definitions. *************** *** 101,115 **** */ #define HAVE_ULIMIT /* Define if your UNIX supports ulimit() */ ! #undef HAVE_RLIMIT /* Define if your UNIX supports setrlimit() */ #define GETPWENT /* Define if you want my GETPWENT(3) routines */ #define GETGRENT /* Define if you want my GETGRENT(3) routines */ #define NEED_AL64 /* Define if library does not include a64l() */ ! #define NEED_MKDIR /* Define if system does not have mkdir() */ ! #define NEED_RMDIR /* Define if system does not have rmdir() */ #define NEED_RENAME /* Define if system does not have rename() */ ! #define NEED_STRSTR /* Define if library does not include strstr() */ ! #undef NEED_PUTPWENT /* Define if library does not include putpwent()*/ #define SIGTYPE int /* Type returned by signal() */ /* --- 101,115 ---- */ #define HAVE_ULIMIT /* Define if your UNIX supports ulimit() */ ! #define HAVE_RLIMIT /* Define if your UNIX supports setrlimit() */ #define GETPWENT /* Define if you want my GETPWENT(3) routines */ #define GETGRENT /* Define if you want my GETGRENT(3) routines */ #define 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() */ #define NEED_RENAME /* Define if system does not have rename() */ ! #undef NEED_STRSTR /* Define if library does not include strstr() */ ! #define NEED_PUTPWENT /* Define if library does not include putpwent()*/ #define SIGTYPE int /* Type returned by signal() */ /* *************** *** 116,122 **** * These definitions MUST agree with the values defined in . */ ! #undef BSD_QUOTA /* the pw_quota field exists */ #define ATT_AGE /* the pw_age field exists */ #define ATT_COMMENT /* the pw_comment field exists */ --- 116,122 ---- * These definitions MUST agree with the values defined in . */ ! #define BSD_QUOTA /* the pw_quota field exists */ #define ATT_AGE /* the pw_age field exists */ #define ATT_COMMENT /* the pw_comment field exists */ *************** *** 159,163 **** * from single user to multi-user mode. */ ! #define TELINIT /**/ ! #define RUNLEVEL "2" /**/ --- 159,163 ---- * from single user to multi-user mode. */ ! #undef TELINIT /**/ ! #undef RUNLEVEL "2" /**/ *** dist/./encrypt.c Sun Mar 15 12:00:45 1992 --- src/./encrypt.c Sun Mar 15 12:01:37 1992 *************** *** 38,44 **** --- 38,46 ---- if (salt == (char *) 0) { now = time ((long *) 0) + count++; + #ifndef linux now ^= clock (); + #endif now ^= getpid (); now = ((now >> 12) ^ (now)) & 07777; newsalt[0] = i64c ((now >> 6) & 077); *** dist/./faillog.c Sun Mar 15 12:00:45 1992 --- src/./faillog.c Sun Mar 15 13:31:16 1992 *************** *** 58,68 **** #if __STDC__ void print(void); ! void print_one(struct faillog *faillog, uid_t uid); void reset(void); ! int reset_one(uid_t uid); void setmax(void); ! void setmax_one(uid_t uid); #else void print(); void print_one(); --- 58,68 ---- #if __STDC__ void print(void); ! void print_one(struct faillog *faillog, int uid); void reset(void); ! int reset_one(int uid); void setmax(void); ! void setmax_one(int uid); #else void print(); void print_one(); *** dist/./grent.c Sun Mar 15 12:00:49 1992 --- src/./grent.c Sun Mar 15 12:01:37 1992 *************** *** 264,270 **** */ struct group *getgrgid (gid) ! int gid; { struct group *grp; #ifdef NDBM --- 264,270 ---- */ struct group *getgrgid (gid) ! gid_t gid; { struct group *grp; #ifdef NDBM *************** *** 364,370 **** } struct group *getgrnam (name) ! char *name; { struct group *grp; #ifdef NDBM --- 364,370 ---- } struct group *getgrnam (name) ! const char *name; { struct group *grp; #ifdef NDBM *** dist/./newgrp.c Sun Mar 15 12:00:57 1992 --- src/./newgrp.c Sun Mar 15 12:01:38 1992 *************** *** 57,63 **** struct group *getgrgid(); struct group *getgrnam(); ! char *getlogin(); char *crypt(); char *getpass(); char *getenv(); --- 57,63 ---- struct group *getgrgid(); struct group *getgrnam(); ! extern char *getlogin(); char *crypt(); char *getpass(); char *getenv(); *** dist/./passwd.c Sun Mar 15 12:00:59 1992 --- src/./passwd.c Sun Mar 15 12:01:39 1992 *************** *** 60,69 **** #define LOG_WARN LOG_WARNING #endif #endif ! #ifdef USE_RLIMIT #include ! struct rlimit rlimit_fsize = { RLIM_INFINITY, RLIM_INFINIT }; #endif /* --- 60,70 ---- #define LOG_WARN LOG_WARNING #endif #endif ! #ifdef HAVE_RLIMIT ! #include #include ! struct rlimit rlimit_fsize = { RLIM_INFINITY, RLIM_INFINITY }; #endif /* *** dist/./pwd.h.m4 Sun Mar 15 12:01:00 1992 --- src/./pwd.h.m4 Sun Mar 15 12:03:48 1992 *************** *** 14,20 **** * reimplementation of the definitions used by AT&T, BSD, and POSIX. * It is not derived from any of those sources. Note that it can be * site-defined to have non-POSIX features as well. Ideally this file ! * is simply replaced by the standard system supplied /usr/include/pwd.h * file. * * @(#)pwd.h.m4 3.4 13:22:36 3/9/92 --- 14,20 ---- * reimplementation of the definitions used by AT&T, BSD, and POSIX. * It is not derived from any of those sources. Note that it can be * site-defined to have non-POSIX features as well. Ideally this file ! * is simply replaced by the standard system supplied (includedir)/pwd.h * file. * * @(#)pwd.h.m4 3.4 13:22:36 3/9/92 *************** *** 42,47 **** --- 42,48 ---- ifdef(`SUN4', `#define ATT_COMMENT') ifdef(`SUN', `#define BSD_QUOTAS') ifdef(`BSD', `#define BSD_QUOTAS') + ifdef(`linux', `#define BSD_QUOTAS') ifdef(`USG', `#define ATT_AGE') ifdef(`USG', `#define ATT_COMMENT') *************** *** 86,92 **** #if __STDC__ extern struct passwd *getpwent( void ) ; ! extern struct passwd *getpwuid( uid_t user_uid ) ; extern struct passwd *getpwnam( char *name ) ; int setpwent( void ); int endpwent( void ); --- 87,93 ---- #if __STDC__ extern struct passwd *getpwent( void ) ; ! extern struct passwd *getpwuid( int user_uid ) ; extern struct passwd *getpwnam( char *name ) ; int setpwent( void ); int endpwent( void ); *** dist/./smain.c Sun Mar 15 12:01:06 1992 --- src/./smain.c Sun Mar 15 12:01:41 1992 *************** *** 108,114 **** --- 108,116 ---- extern char *getpass (); extern char *tz (); extern char *pw_encrypt(); + #ifndef linux extern struct passwd *getpwuid (); + #endif extern struct passwd *getpwnam (); extern struct spwd *getspnam (); extern char *getdef_str(); *** dist/./utmp.c Sun Mar 15 12:01:12 1992 --- src/./utmp.c Sun Mar 15 12:59:54 1992 *************** *** 34,39 **** --- 34,45 ---- #define UTMP_FILE "/etc/utmp" #endif + #if defined(linux) + #ifndef WTMP_FILE + #define WTMP_FILE "/etc/wtmp" + #endif + #endif + #if defined(SUN) || defined(BSD) || defined(SUN4) #ifndef WTMP_FILE #define WTMP_FILE "/usr/adm/wtmp" *************** *** 177,183 **** char *name; char *line; { ! #ifdef SVR4 struct utmp utmp; struct utmpx *utmpx, utxline; extern int gettimeofday (struct timeval *tp); --- 183,189 ---- char *name; char *line; { ! #if defined(SVR4) && !defined(linux) struct utmp utmp; struct utmpx *utmpx, utxline; extern int gettimeofday (struct timeval *tp); *** src/Makefile.bak Mon Mar 23 17:03:24 1992 --- src/Makefile Mon Mar 23 17:03:34 1992 *************** *** 67,73 **** # CFLAGS - C compiler flags # -DLAI_TCP - needed for SCO Xenix Lachman TCP/IP ! DEST_INCLUDE_DIR = /usr/include # Flags for Linux CFLAGS = $(OS) -DSVR4 -O3 --- 67,73 ---- # CFLAGS - C compiler flags # -DLAI_TCP - needed for SCO Xenix Lachman TCP/IP ! DEST_INCLUDE_DIR = /usr/include # Flags for Linux CFLAGS = $(OS) -DSVR4 -O3