home *** CD-ROM | disk | FTP | other *** search
/ Plex 2 / Plex2.mdf / u_linux / shad331.dif < prev    next >
Text File  |  1994-05-28  |  46KB  |  1,702 lines

  1.  
  2. Here is a new version of linux-patches for the original shadow 3.3.1 version.
  3. You need the patches (shadow-3.3.1.dif) and the unmodified original version
  4. (shadow-3.3.1.tar.gz).
  5. Patch the original version with:
  6. cd shadow-3.3.1; patch -s -p0 < shadow-3.3.1.dif
  7.  
  8. There are several bugs fixed. I advise to change to these new patches.
  9. I also tried to conform to the new Linux filesystem layout.
  10. They should work ok for the old Linux C library 4.4.x and also for the
  11. new C library 4.5.x.
  12. (Note: This version doesn't use the shadow routines in the new C library,
  13. so any maybe existing bugs in the C library do not harm. If you want to
  14. use them, do not include the files shadow.c and gshadow.c, when building
  15. the library libshadow.a.)
  16.  
  17. The original Patches were from Peter McDonald (for shadow 3.2.2).
  18. Newer patches are also from:
  19. - Wolfram Gloger u7y22ab@sunmail.lrz-muenchen.de
  20. - Steve Robins steve@nyongwa.cam.org
  21. - Neal Becker neal@ctd.comsat.com
  22.  
  23. Please mail any further patches to rzsfl@rz.uni-sb.de.
  24.  
  25. Florian  La Roche
  26.  
  27. (P.S.: Install also the new libshadow.a into /usr/lib, I forgot
  28. that in the Makefile, I think...)
  29.  
  30. (P.S.2.: Please look at the copyright!!! If you want to rewrite some
  31. of the programs and make them public under the GPL/LGPL, please
  32. contact me.)
  33.  
  34.  
  35. --- Makefile
  36. +++ Makefile    1994/01/10 21:33:16
  37. @@ -31,14 +31,14 @@
  38.  # seems to use /bin, USG seems to use /etc, SunOS 4.1.1 seems to use /usr/bin.
  39.  # If you define SCOLOGIN, you MUST use /etc as LOGINDIR.
  40.  # LOGINDIR = /bin
  41. -LOGINDIR = /etc
  42. +LOGINDIR = /bin
  43.  # LOGINDIR = /usr/bin
  44.  
  45.  # Define any special libraries required to access the directory routines.
  46.  # Some systems require -lndir for the directory routines.  SCO Xenix uses
  47.  # -lx for that.  Your system might need nothing.
  48.  # NDIR = -lndir
  49. -NDIR = -lx
  50. +NDIR =
  51.  # NDIR =
  52.  
  53.  # Define some stuff for Cracklib.  This assumes that libcracklib.a is
  54. @@ -80,10 +80,9 @@
  55.  DEST_INCLUDE_DIR = /usr/include
  56.  
  57.  # Flags for SCO Xenix/386
  58. -CFLAGS = -O -M3 -g $(OS) -I$(DEST_INCLUDE_DIR) $(CRACKDEF)
  59. -LIBS = -lcrypt -lndbm
  60. -# LIBS = -lcrypt -ldbm
  61. -LDFLAGS = -M3 -g
  62. +CFLAGS = -O2 -m486 -fomit-frame-pointer $(OS)
  63. +LIBS =
  64. +LDFLAGS = -s -v
  65.  LTFLAGS = 
  66.  
  67.  # Flags for normal machines
  68. @@ -96,24 +95,6 @@
  69.  # LIBS =
  70.  # LDFLAGS = 
  71.  
  72. -# This should be Slibsec.a for small model, or Llibsec.a for
  73. -# large model or whatever.  MUST AGREE WITH CFLAGS!!!  For non-Intel
  74. -# machines, just use libsec.a
  75. -LIBSEC = Slibsec.a
  76. -# LIBSEC = libsec.a
  77. -
  78. -# Names for root user and group, and bin user and group.  See your
  79. -# /etc/passwd and /etc/group files.  BSD and SUN use "wheel", most
  80. -# others use "root" for RGID.
  81. -RUID = root
  82. -RGID = root
  83. -# RGID = wheel
  84. -BUID = bin
  85. -BGID = bin
  86. -
  87. -# Where the login.defs file will be copied.  Must agree with config.h
  88. -DEST_LOGIN_DEFS = /etc/login.defs
  89. -
  90.  # Rules for .L (lint) files.
  91.  .SUFFIXES: .L
  92.  LINT = lint
  93. @@ -188,7 +169,7 @@
  94.      groupdel.c groupmod.c tz.c console.c hushed.c getdef.c scologin.c \
  95.      logoutd.c groups.c pwauth.c lockpw.c chowndir.c
  96.  
  97. -FILES1 = README patchlevel.h newgrp.c Makefile config.h pwunconv.c obscure.c \
  98. +FILES1 = README patchlevel.h newgrp.c config.h pwunconv.c obscure.c \
  99.      age.c id.c
  100.  
  101.  FILES2 = passwd.c port.c lmain.c sulogin.c pwpack.c dialup.c
  102. @@ -201,7 +182,7 @@
  103.      pwdbm.c grdbm.c gshadow.c sppack.c grpck.c
  104.  
  105.  FILES6 = gspack.c spdbm.c lastlog.h shell.c login.c sub.c dpmain.c mail.c \
  106. -    env.c pwd.h.m4 grpack.c shadow.h log.c grent.c motd.c dialup.h \
  107. +    env.c pwd.h.m4 grpack.c log.c grent.c motd.c dialup.h \
  108.      fields.c gsdbm.c utmp.c failure.c
  109.  
  110.  FILES7 = groupio.c shadowio.c sgroupio.c groups.c copydir.c mkrmdir.c \
  111. @@ -218,23 +199,28 @@
  112.  MAN_1 = chage.1 chfn.1 chsh.1 id.1 login.1 newgrp.1 passwd.1 su.1 \
  113.      useradd.1 userdel.1 usermod.1 groupadd.1 groupdel.1 groupmod.1 \
  114.      groups.1 pwck.1 grpck.1
  115. -MAN_3 = shadow.3 pwauth.3
  116. +MAN_3 = shadow.3
  117.  MAN_4 = faillog.4 passwd.4 porttime.4 shadow.4
  118.  MAN_5 = login.5
  119. -MAN_8 = chpasswd.8 dpasswd.8 faillog.8 newusers.8 pwconv.8 pwunconv.8 \
  120. -    sulogin.8 mkpasswd.8 logoutd.8 pwauth.8 lastlog.8
  121. +MAN_8 = dpasswd.8 faillog.8 newusers.8
  122.  
  123.  DOCS1 = $(MAN_1) $(MAN_3) $(MAN_4)
  124.  DOCS2 = $(MAN_5) $(MAN_8)
  125.  DOCS = $(DOCS1) $(DOCS2)
  126.  
  127. -BINS = su login pwconv pwunconv passwd sulogin faillog newgrp sg gpasswd \
  128. -    mkpasswd chfn chsh chage chpasswd newusers dpasswd id useradd \
  129. -    userdel usermod groupadd groupdel groupmod $(SCOLOGIN) logoutd \
  130. +BINS = su login passwd faillog newgrp sg gpasswd \
  131. +    chfn chsh chage newusers dpasswd id useradd \
  132. +    userdel usermod groupadd groupdel groupmod $(SCOLOGIN) \
  133.      groups pwck grpck lastlog
  134.  
  135.  all:    $(BINS) $(DOCS)
  136.  
  137. +Linux:
  138. +    rm -f shadow.h
  139. +    touch Linux
  140. +
  141. +$(BINS): Linux
  142. +
  143.  .PRECIOUS: libshadow.a
  144.  
  145.  libshadow.a: \
  146. @@ -262,11 +248,11 @@
  147.      libshadow.a(shadow.o) \
  148.      libshadow.a(shadowio.o) \
  149.      libshadow.a(sppack.o) \
  150. +    libshadow.a(sppwd.o) \
  151.      libshadow.a(lockpw.o)
  152.      $(RANLIB) libshadow.a
  153.  
  154. -libsec: $(LIBSEC)(shadow.o)
  155. -    $(RANLIB) $(LIBSEC)
  156. +sppwd.o: sppwd.c
  157.  
  158.  save:
  159.      [ ! -d save ] && mkdir save
  160. @@ -278,8 +264,7 @@
  161.      -cp /bin/su /bin/passwd /bin/gpasswd /bin/dpasswd /bin/faillog \
  162.          /bin/newgrp /bin/chfn /bin/chsh /bin/chage /bin/id \
  163.          /bin/scologin save
  164. -    -cp $(DEST_INCLUDE_DIR)/dialup.h $(DEST_INCLUDE_DIR)/shadow.h \
  165. -        $(DEST_INCLUDE_DIR)/pwd.h save
  166. +    -cp $(DEST_INCLUDE_DIR)/dialup.h save
  167.  
  168.  restore:
  169.      [ -d save ]
  170. @@ -289,49 +274,23 @@
  171.          logoutd login.defs pwck grpck /etc)
  172.      -(cd save ; cp su passwd gpasswd dpasswd faillog newgrp chfn chsh \
  173.          chage id scologin /bin)
  174. -    -(cd save ; cp dialup.h shadow.h pwd.h $(DEST_INCLUDE_DIR) )
  175. +    -(cd save ; cp dialup.h $(DEST_INCLUDE_DIR) )
  176.  
  177.  install: all
  178. -    strip $(BINS)
  179. -    cp login $(LOGINDIR)/login
  180. -    cp mkpasswd pwconv pwunconv sulogin chpasswd newusers \
  181. -        useradd userdel usermod groupadd groupdel groupmod logoutd \
  182. -        pwck grpck /etc
  183. -    cp su passwd gpasswd dpasswd faillog newgrp chfn chsh chage id /bin
  184. -    rm -f /bin/sg
  185. -    ln /bin/newgrp /bin/sg
  186. -    cp dialup.h shadow.h pwd.h $(DEST_INCLUDE_DIR)
  187. -    chown $(RUID) $(LOGINDIR)/login /etc/pwconv /etc/pwunconv /etc/sulogin \
  188. -        /bin/su /bin/passwd /bin/gpasswd /bin/newgrp /etc/mkpasswd \
  189. -        /bin/dpasswd /bin/chsh /bin/chfn /bin/chage /etc/useradd \
  190. -        /etc/userdel /etc/usermod /etc/groupadd /etc/groupdel \
  191. -        /etc/groupmod /etc/logoutd /etc/pwck /etc/grpck
  192. -    chgrp $(RGID) $(LOGINDIR)/login /etc/pwconv /etc/pwunconv /etc/sulogin \
  193. -        /bin/su /bin/passwd /bin/gpasswd /bin/newgrp /etc/mkpasswd \
  194. -        /bin/dpasswd /bin/chsh /bin/chfn /bin/chage /etc/useradd \
  195. -        /etc/userdel /etc/usermod /etc/groupadd /etc/groupdel \
  196. -        /etc/groupmod /etc/logoutd /etc/pwck /etc/grpck
  197. -    chown $(BUID) /bin/faillog /bin/id $(DEST_INCLUDE_DIR)/shadow.h \
  198. -        $(DEST_INCLUDE_DIR)/dialup.h $(DEST_INCLUDE_DIR)/pwd.h
  199. -    chgrp $(BGID) /bin/faillog /bin/id $(DEST_INCLUDE_DIR)/shadow.h \
  200. -        $(DEST_INCLUDE_DIR)/dialup.h $(DEST_INCLUDE_DIR)/pwd.h
  201. -    chmod 700 /etc/pwconv /etc/pwunconv /etc/sulogin /etc/mkpasswd \
  202. -        /etc/chpasswd /etc/newusers /bin/dpasswd /etc/logoutd \
  203. -        /etc/useradd /etc/userdel /etc/usermod /etc/groupadd \
  204. -        /etc/groupdel /etc/groupmod /etc/pwck /etc/grpck
  205. -    chmod 4711 $(LOGINDIR)/login /bin/su /bin/passwd /bin/gpasswd \
  206. -        /bin/newgrp /bin/chfn /bin/chsh /bin/chage
  207. -    chmod 711 /bin/faillog /bin/id
  208. -    chmod 444 $(DEST_INCLUDE_DIR)/shadow.h $(DEST_INCLUDE_DIR)/dialup.h \
  209. -        $(DEST_INCLUDE_DIR)/pwd.h
  210. -    [ -f $(DEST_LOGIN_DEFS) ] || (cp login.defs $(DEST_LOGIN_DEFS) ; \
  211. -        chown $(RUID) $(DEST_LOGIN_DEFS) ; \
  212. -        chgrp $(RGID) $(DEST_LOGIN_DEFS) ; \
  213. -        chmod 600 $(DEST_LOGIN_DEFS) )
  214. -    [ -z "$(SCOLOGIN)" ] || (cp scologin /bin/login ; \
  215. -        chown $(RUID) /bin/login ; \
  216. -        chgrp $(RGID) /bin/login ; \
  217. -        chmod 755 /bin/login )
  218. +    install -m 644 $(MAN_1) /usr/man/man1
  219. +    install -m 644 $(MAN_3) /usr/man/man3
  220. +    install -m 644 $(MAN_4) /usr/man/man4
  221. +    install -m 644 $(MAN_5) /usr/man/man5
  222. +    install -m 644 $(MAN_8) /usr/man/man8
  223. +    install groups /usr/bin
  224. +    install -m4755 chfn chsh chage /usr/bin
  225. +    install -m4755 login $(LOGINDIR)/login
  226. +    install -m744 newusers \
  227. +        useradd userdel usermod groupadd groupdel groupmod \
  228. +        pwck grpck /usr/sbin
  229. +    install -m755 dpasswd faillog id /bin
  230. +    install -m4755 su passwd gpasswd newgrp /bin
  231. +    ln -sf newgrp /bin/sg
  232.  
  233.  lint:    su.lint login.lint pwconv.lint pwunconv.lint passwd.lint sulogin.lint \
  234.      faillog.lint newgrp.lint gpasswd.lint mkpasswd.lint chfn.lint \
  235. @@ -531,8 +490,8 @@
  236.  pwd.h.m4:
  237.      [ -f s.pwd.h.m4 ] && $(GET) $(GFLAGS) s.pwd.h.m4
  238.  
  239. -pwd.h: pwd.h.m4
  240. -    m4 $(OS) < pwd.h.m4 > pwd.h
  241. +#pwd.h: pwd.h.m4
  242. +#    m4 $(OS) < pwd.h.m4 > pwd.h
  243.  
  244.  logoutd: logoutd.o libshadow.a
  245.      $(CC) -o logoutd $(LDFLAGS) logoutd.o libshadow.a
  246. @@ -557,70 +516,70 @@
  247.  susetup.c: setup.c
  248.      cp setup.c susetup.c
  249.  
  250. -susetup.o: config.h susetup.c pwd.h
  251. +susetup.o: config.h susetup.c
  252.      $(CC) -c $(CFLAGS) -DSU susetup.c
  253.  
  254.  scologin: scologin.o
  255.      $(CC) -o scologin $(LDFLAGS) scologin.o -lsocket
  256.  
  257. -passwd.o: config.h shadow.h pwd.h pwauth.h
  258. -lmain.o: config.h lastlog.h faillog.h pwd.h pwauth.h
  259. -smain.o: config.h lastlog.h pwd.h shadow.h pwauth.h
  260. -sub.o: pwd.h
  261. -setup.o: config.h pwd.h
  262. +passwd.o: config.h pwauth.h
  263. +lmain.o: config.h lastlog.h faillog.h pwauth.h
  264. +smain.o: config.h lastlog.h pwauth.h
  265. +sub.o:
  266. +setup.o: config.h
  267.  mkrmdir.o: config.h
  268.  utmp.o: config.h
  269.  mail.o: config.h
  270.  motd.o: config.h
  271. -age.o: config.h pwd.h
  272. -log.o: config.h lastlog.h pwd.h
  273. +age.o: config.h
  274. +log.o: config.h lastlog.h
  275.  shell.o: config.h
  276. -entry.o: config.h shadow.h pwd.h
  277. -hushed.o: config.h pwd.h
  278. -valid.o: config.h pwd.h
  279. +entry.o: config.h
  280. +hushed.o: config.h
  281. +valid.o: config.h
  282.  failure.o: faillog.h config.h
  283. -faillog.o: faillog.h config.h pwd.h
  284. -newgrp.o: config.h shadow.h pwd.h
  285. -mkpasswd.o: config.h shadow.h pwd.h
  286. -gpmain.o: config.h pwd.h
  287. -chfn.o: config.h pwd.h
  288. -chsh.o: config.h pwd.h
  289. -chage.o: config.h shadow.h pwd.h
  290. -pwconv.o: config.h shadow.h
  291. -pwunconv.o: config.h shadow.h pwd.h
  292. -chpasswd.o: config.h shadow.h pwd.h
  293. -id.o: pwd.h
  294. -newusers.o: config.h shadow.h pwd.h
  295. +faillog.o: faillog.h config.h
  296. +newgrp.o: config.h
  297. +mkpasswd.o: config.h
  298. +gpmain.o: config.h
  299. +chfn.o: config.h
  300. +chsh.o: config.h
  301. +chage.o: config.h
  302. +pwconv.o: config.h
  303. +pwunconv.o: config.h
  304. +chpasswd.o: config.h
  305. +id.o:
  306. +newusers.o: config.h
  307.  dpmain.o: config.h dialup.h
  308. -useradd.o: config.h shadow.h pwd.h pwauth.h
  309. -userdel.o: config.h shadow.h pwd.h pwauth.h
  310. -usermod.o: config.h shadow.h pwd.h pwauth.h
  311. -groupadd.o: config.h shadow.h
  312. -groupdel.o: config.h shadow.h
  313. -groupmod.o: config.h shadow.h
  314. +useradd.o: config.h pwauth.h
  315. +userdel.o: config.h pwauth.h
  316. +usermod.o: config.h pwauth.h
  317. +groupadd.o: config.h
  318. +groupdel.o: config.h
  319. +groupmod.o: config.h
  320.  logoutd.o: config.h
  321.  sulogin.o: config.h pwauth.h
  322.  copydir.o: config.h
  323.  chowndir.o: config.h
  324. -pwck.o: config.h shadow.h pwd.h
  325. -grpck.o: config.h shadow.h pwd.h
  326. +pwck.o: config.h
  327. +grpck.o: config.h
  328.  
  329. -libshadow.a(shadow.o): shadow.h config.h
  330. -libshadow.a(shadowio.o): shadow.h
  331. -libshadow.a(grent.o): config.h shadow.h
  332. -libshadow.a(sgroupio.o): shadow.h
  333. +libshadow.a(shadow.o): config.h
  334. +libshadow.a(shadowio.o):
  335. +libshadow.a(grent.o): config.h
  336. +libshadow.a(sgroupio.o):
  337.  libshadow.a(dialup.o): dialup.h
  338.  libshadow.a(dialchk.o): dialup.h config.h
  339.  libshadow.a(getdef.o): config.h
  340. -libshadow.a(pwdbm.o): config.h pwd.h
  341. -libshadow.a(spdbm.o): config.h shadow.h
  342. +libshadow.a(pwdbm.o): config.h
  343. +libshadow.a(spdbm.o): config.h
  344.  libshadow.a(grdbm.o): config.h
  345.  libshadow.a(gshadow.o): config.h
  346. -libshadow.a(gsdbm.o): config.h shadow.h
  347. +libshadow.a(gsdbm.o): config.h
  348.  libshadow.a(pwauth.o): config.h pwauth.h
  349. -libshadow.a(pwpack.o): config.h pwd.h
  350. -libshadow.a(pwent.o): config.h pwd.h
  351. -libshadow.a(pwio.o): pwd.h
  352. +libshadow.a(pwpack.o): config.h
  353. +libshadow.a(pwent.o): config.h
  354. +libshadow.a(pwio.o):
  355.  libshadow.a(getpass.o): config.h
  356.  libshadow.a(encrypt.o): config.h
  357.  libshadow.a(port.o): port.h
  358. @@ -628,7 +587,7 @@
  359.  libshadow.a(lockpw.o):
  360.  
  361.  clean:
  362. -    -rm -f susetup.c *.o a.out core npasswd nshadow *.pag *.dir pwd.h
  363. +    -rm -f susetup.c *.o a.out core npasswd nshadow *.pag *.dir
  364.  
  365.  clobber: clean
  366.      -rm -f $(BINS) *.lint *.L libshadow.a
  367. --- Makefile.Linux
  368. +++ Makefile.Linux    1994/01/10 21:28:40
  369. @@ -0,0 +1,18 @@
  370. +# patches by Wolfram Gloger u7y22ab@sunmail.lrz-muenchen.de (failure.c)
  371. +# Steve Robins steve@nyongwa.cam.org
  372. +# Neal Becker neal@ctd.comsat.com
  373. +
  374. +compile:
  375. +    make all
  376. +
  377. +install: compile
  378. +    make install
  379. +
  380. +clean:
  381. +    make clean
  382. +
  383. +realclean:
  384. +    make clobber
  385. +
  386. +small:
  387. +
  388. --- chage.1
  389. +++ chage.1    1994/01/10 21:28:40
  390. @@ -8,7 +8,7 @@
  391.  .\"
  392.  .TH CHAGE 1
  393.  .SH NAME
  394. -chage \- change user password expirate information
  395. +chage \- change user password expire information
  396.  .SH SYNOPSIS
  397.  \fBchage\fR [ \fB-m \fImindays\fR ] [ \fB-M \fImaxdays\fR ]
  398.  [ \fB-d \fIlastday\fR ] [ \fB-I \fIinactive\fR ]
  399. @@ -16,20 +16,20 @@
  400.  .sp 1
  401.  \fBchage\fR -l \fIuser\fR
  402.  .SH DESCRIPTION
  403. -\fIchage\f changes the number of days between password changes and the
  404. +\fIchage\fR changes the number of days between password changes and the
  405.  date of the last password change.
  406.  This information is used by the system to determine when a user must
  407.  change her password.
  408. -The \fIchage\f command is restricted to the root user, except for the
  409. +The \fIchage\fR command is restricted to the root user, except for the
  410.  \fB-l\fR option, which may be used by an unprivileged user to determine
  411.  when her password or account is due to expire.
  412.  .PP
  413. -With the \fB-m\fR option, the value of \fImindays\f is the minimum number
  414. +With the \fB-m\fR option, the value of \fImindays\fR is the minimum number
  415.  of days between password changes.
  416.  A value of zero for this field indicates that the user may change
  417.  her password at any time.
  418.  .PP
  419. -With the \fB-M\fR option, the value of \fImaxdays\f is the maximum number
  420. +With the \fB-M\fR option, the value of \fImaxdays\fR is the maximum number
  421.  of days during which a password is valid.
  422.  When \fImaxdays\fR plus \fIlastday\fR is less than the current day,
  423.  the user will be required to change her password before being
  424. @@ -37,7 +37,7 @@
  425.  This occurance can be planned for in advance by use of the \fB-W\fR option,
  426.  which provides the user with advance warning.
  427.  .PP
  428. -With the \fB-d\fR option, the value of \fIlastday\f is the number of days
  429. +With the \fB-d\fR option, the value of \fIlastday\fR is the number of days
  430.  since January 1st, 1970 when the password was last changed.
  431.  The date may also be expressed in the format MM/DD/YY (or the format more
  432.  commonly used in your area).
  433. @@ -63,16 +63,11 @@
  434.  The \fIwarndays\fR option is the number of days prior to the password
  435.  expiring that a user will be warned her password is about to expire.
  436.  .PP
  437. -All of the above values are stored exactly as days when the shadow
  438. -password file is used, but are converted to and from weeks when the
  439. -standard password file is used.
  440. -Because of this conversion, rounding errors may result.
  441. -.PP
  442. -If none of the options are selected, \fIchage\f operates in an interactive
  443. +If none of the options are selected, \fIchage\fR operates in an interactive
  444.  fashion, prompting the user with the current values for all of the fields.
  445.  Enter the new value to change the field, or leave the line blank to use
  446.  the current value.
  447. -The current value is displayed between a pair of \fB[ ]\f marks.
  448. +The current value is displayed between a pair of \fB[ ]\fR marks.
  449.  .SH Files
  450.  /etc/passwd \- user account information
  451.  .br
  452. --- chfn.1
  453. +++ chfn.1    1994/01/10 21:28:40
  454. @@ -15,25 +15,25 @@
  455.  [ \fB-w \fIwork_ph\fR ] [ \fB-h \fIhome_ph\fR ] [ \fB-o \fIother\fR ]
  456.  [ \fIuser\fR ]
  457.  .SH DESCRIPTION
  458. -\fIchfn\f changes user fullname, office number, office extension, and home
  459. +\fIchfn\fR changes user fullname, office number, office extension, and home
  460.  phone number information for a user's account. 
  461. -This information is typically printed by \fIfinger(1)\f and similiar
  462. +This information is typically printed by \fIfinger(1)\fR and similiar
  463.  programs.
  464.  A normal user may only change the fields for their own account,
  465.  the super user may change the fields for any account.
  466. -Also, only the super user may use the \fB-o\f option to change the
  467. +Also, only the super user may use the \fB-o\fR option to change the
  468.  undefined portions of the GCOS field.
  469.  .PP
  470.  The only restrictions placed on the contents of the fields is that no
  471.  control characters may be present, nor any of comma, colon, or equal sign.
  472. -The \fIother\f field does not have this restriction, and is used to
  473. +The \fIother\fR field does not have this restriction, and is used to
  474.  store accounting information used by other applications.
  475.  .PP
  476. -If none of the options are selected, \fIchfn\f operates in an interactive
  477. +If none of the options are selected, \fIchfn\fR operates in an interactive
  478.  fashion, prompting the user with the current values for all of the fields.
  479.  Enter the new value to change the field, or leave the line blank to use
  480.  the current value.
  481. -The current value is displayed between a pair of \fB[ ]\f marks.
  482. +The current value is displayed between a pair of \fB[ ]\fR marks.
  483.  Without options, chfn prompts for the current user account.
  484.  .SH Files
  485.  /etc/passwd \- user account information
  486. --- config.h
  487. +++ config.h    1994/01/10 21:28:40
  488. @@ -12,6 +12,9 @@
  489.   * no warrantee of any kind.
  490.   */
  491.  
  492. +#include <sys/types.h>
  493. +#include <stdio.h>
  494. +
  495.  /*
  496.   * Configuration file for login.
  497.   *
  498. @@ -19,6 +22,8 @@
  499.   */
  500.  
  501.  
  502. +#define LASTFILE "/var/adm/lastlog"
  503. +
  504.  /*
  505.   * Pathname to the run-time configuration definitions file.
  506.   */
  507. @@ -53,7 +58,7 @@
  508.   * Define DOUBLESIZE to use 16 character passwords
  509.   */
  510.  
  511. -#define DOUBLESIZE
  512. +#undef DOUBLESIZE
  513.  
  514.  /*
  515.   * Define AGING if you want the password aging checks made.
  516. @@ -82,7 +87,7 @@
  517.   */
  518.  
  519.  #define RLOGIN
  520. -#undef UT_HOST
  521. +#define UT_HOST
  522.  
  523.  /*
  524.   * Define the "success" code from ruserok().  Most modern systems use 0
  525. @@ -96,9 +101,9 @@
  526.   * Select one of the following
  527.   */
  528.  
  529. -#define DIR_XENIX    /* include <sys/ndir.h>, use (struct direct)    */
  530. +/* #define DIR_XENIX    /* include <sys/ndir.h>, use (struct direct)    */
  531.  /* #define DIR_BSD    /* include <ndir.h>, use (struct direct)    */
  532. -/* #define DIR_SYSV    /* include <dirent.h>, use (struct dirent)    */
  533. +#define DIR_SYSV    /* include <dirent.h>, use (struct dirent)    */
  534.  
  535.  /*
  536.   * Various system environment definitions.
  537. @@ -106,23 +111,23 @@
  538.  
  539.  #define    HAVE_ULIMIT    /* Define if your UNIX supports ulimit()    */
  540.  #undef    HAVE_RLIMIT    /* Define if your UNIX supports setrlimit()     */
  541. -#define    GETPWENT    /* Define if you want my GETPWENT(3) routines    */
  542. -#define    GETGRENT    /* Define if you want my GETGRENT(3) routines    */
  543. +#undef    GETPWENT    /* Define if you want my GETPWENT(3) routines    */
  544. +#undef    GETGRENT    /* Define if you want my GETGRENT(3) routines    */
  545.  #define    NEED_AL64    /* Define if library does not include a64l()    */
  546. -#define    NEED_MKDIR    /* Define if system does not have mkdir()    */
  547. -#define    NEED_RMDIR    /* Define if system does not have rmdir()    */
  548. -#define    NEED_RENAME    /* Define if system does not have rename()    */
  549. -#define    NEED_STRSTR    /* Define if library does not include strstr()    */
  550. +#undef    NEED_MKDIR    /* Define if system does not have mkdir()    */
  551. +#undef    NEED_RMDIR    /* Define if system does not have rmdir()    */
  552. +#undef    NEED_RENAME    /* Define if system does not have rename()    */
  553. +#undef    NEED_STRSTR    /* Define if library does not include strstr()    */
  554.  #undef    NEED_PUTPWENT    /* Define if library does not include putpwent()*/
  555. -#define    SIGTYPE    int    /* Type returned by signal()                    */
  556. +#define    SIGTYPE    void    /* Type returned by signal()                    */
  557.  
  558.  /*
  559.   * These definitions MUST agree with the values defined in <pwd.h>.
  560.   */
  561.  
  562.  #undef    BSD_QUOTA    /* the pw_quota field exists */
  563. -#define    ATT_AGE        /* the pw_age field exists */
  564. -#define    ATT_COMMENT    /* the pw_comment field exists */
  565. +#undef    ATT_AGE        /* the pw_age field exists */
  566. +#undef    ATT_COMMENT    /* the pw_comment field exists */
  567.  
  568.  #define    UID_T    uid_t    /* set to be the type of UID's */
  569.  #define    GID_T    gid_t    /* set to be the type of GID's */
  570. @@ -182,7 +187,7 @@
  571.   * from single user to multi-user mode.
  572.   */
  573.  
  574. -#define    TELINIT        /**/
  575. +#undef    TELINIT        /**/
  576.  #define    RUNLEVEL    "2"    /**/
  577.  
  578.  /*
  579. @@ -190,5 +195,6 @@
  580.   * HAS_CRONTAB.  If your system can "atrm <user>", define HAS_ATRM.
  581.   */
  582.  
  583. -#undef    HAS_CRONTAB
  584. -#undef    HAS_ATRM
  585. +#define CRONTAB_REM "crontab -d -u %s"
  586. +#define ATRUN_REM   "atrm %s"
  587. +
  588. --- copydir.c
  589. +++ copydir.c    1994/01/10 21:28:40
  590. @@ -213,8 +213,8 @@
  591.               */
  592.  
  593.              mkdir (dst_name, sb.st_mode & 0777);
  594. -            chown (dst_name, uid == -1 ? sb.st_uid:uid,
  595. -                gid == -1 ? sb.st_gid:gid);
  596. +            chown (dst_name, uid == (UID_T)-1 ? sb.st_uid:uid,
  597. +                gid == (GID_T)-1 ? sb.st_gid:gid);
  598.  
  599.              if (copy_tree (src_name, dst_name, uid, gid)) {
  600.                  err++;
  601. @@ -250,8 +250,8 @@
  602.  
  603.          if (! S_ISREG (sb.st_mode)) {
  604.              if (mknod (dst_name, sb.st_mode & ~07777, sb.st_rdev) ||
  605. -                chown (dst_name, uid == -1 ? sb.st_uid:uid,
  606. -                    gid == -1 ? sb.st_gid:gid) ||
  607. +                chown (dst_name, uid == (UID_T)-1 ? sb.st_uid:uid,
  608. +                    gid == (GID_T)-1 ? sb.st_gid:gid) ||
  609.                      chmod (dst_name, sb.st_mode & 07777)) {
  610.                  err++;
  611.                  break;
  612. @@ -269,8 +269,8 @@
  613.              break;
  614.          }
  615.          if ((ofd = open (dst_name, O_WRONLY|O_CREAT, 0)) < 0 ||
  616. -            chown (dst_name, uid == -1 ? sb.st_uid:uid,
  617. -                    gid == -1 ? sb.st_gid:gid) ||
  618. +            chown (dst_name, uid == (UID_T)-1 ? sb.st_uid:uid,
  619. +                    gid == (GID_T)-1 ? sb.st_gid:gid) ||
  620.                  chmod (dst_name, sb.st_mode & 07777)) {
  621.              close (ifd);
  622.              err++;
  623. --- faillog.4
  624. +++ faillog.4    1994/01/10 21:28:40
  625. @@ -31,6 +31,6 @@
  626.  
  627.  .DE
  628.  .SH Files
  629. -/usr/adm/faillog \- login failure log
  630. +/var/adm/faillog \- login failure log
  631.  .SH See Also
  632.  faillog(8)
  633. --- faillog.8
  634. +++ faillog.8    1994/01/10 21:28:40
  635. @@ -13,7 +13,7 @@
  636.  /etc/faillog [ -u uid ] [ -a ] [ -t days ] [ -m max ] [ -pr ] 
  637.  .SH DESCRIPTION
  638.  \fIfaillog\fR formats the contents of the failure log,
  639. -\fI/usr/adm/faillog\fR, and maintains failure counts and
  640. +\fI/var/adm/faillog\fR, and maintains failure counts and
  641.  limits.
  642.  The order of the arguments to \fIfaillog\fR is significant.
  643.  Each argument is processed immediately in the order given.
  644. @@ -31,14 +31,14 @@
  645.  It is meaningless with the \fB-r\fR flag.
  646.  .PP
  647.  The \fB-r\fR flag is used to reset the count of login failures.
  648. -Write access to \fI/usr/adm/faillog\fR is required for
  649. +Write access to \fI/var/adm/faillog\fR is required for
  650.  this option.
  651.  Entering \fB-u login-name\fR will cause only the failure count
  652.  for \fBlogin-name\fR to be reset.
  653.  .PP
  654.  The \fB-m\fR flag is used to set the maximum number of login
  655.  failures before the account is disabled.
  656. -Write access to \fB/usr/adm/faillog\fR is required for this
  657. +Write access to \fB/var/adm/faillog\fR is required for this
  658.  option.
  659.  Entering \fB-m max\fR will cause all accounts to be disabled
  660.  after \fBmax\fR failed logins occur.
  661. @@ -60,7 +60,7 @@
  662.  failure, you must explicitly request the user with the \fB-u\fR flag,
  663.  or print out all users with the \fB-a\fR flag.
  664.  .SH Files
  665. -/usr/adm/faillog \- failure logging file
  666. +/var/adm/faillog \- failure logging file
  667.  .SH See Also
  668.  login(1),
  669.  faillog(4)
  670. --- faillog.h
  671. +++ faillog.h    1994/01/10 21:28:40
  672. @@ -19,7 +19,7 @@
  673.   * is indexed in that fashion.
  674.   */
  675.  
  676. -#ifdef    SVR4
  677. +#if defined(SVR4) || defined(__linux__)
  678.  #define    FAILFILE    "/var/adm/faillog"
  679.  #else
  680.  #define    FAILFILE    "/usr/adm/faillog"
  681. --- failure.c
  682. +++ failure.c    1994/01/10 21:28:40
  683. @@ -183,7 +183,11 @@
  684.      char    lasttimeb[32];
  685.      char    *lasttime = lasttimeb;
  686.  #else
  687. +#if    __STDC__
  688. +    char    lasttime[256];
  689. +#else
  690.      char    *lasttime;
  691. +#endif
  692.  #endif
  693.  
  694.      if (fail->fail_cnt == 0)
  695. --- gpmain.c
  696. +++ gpmain.c    1994/01/10 21:28:40
  697. @@ -329,7 +329,9 @@
  698.      struct    sgrp    *getsgnam ();
  699.  #endif
  700.      struct    passwd    *pw = 0;
  701. +#ifndef __linux__
  702.      struct    passwd    *getpwuid ();
  703. +#endif
  704.      struct    passwd    *getpwnam ();
  705.  
  706.      /*
  707. --- groups.1
  708. +++ groups.1    1994/01/10 21:28:40
  709. @@ -24,7 +24,7 @@
  710.  If the value does not have a corresponding entry in
  711.  \fB/etc/group\fR, the value will be displayed as the numerical group value.
  712.  The optional \fIuser\fR parameter will display the groups for the named
  713. -\fIuser\R.
  714. +\fIuser\fR.
  715.  .SH Note
  716.  Systems which do not support concurrent group sets will have the information
  717.  from \fB/etc/group\fR reported.
  718. --- groups.c
  719. +++ groups.c    1994/01/10 21:28:40
  720. @@ -11,6 +11,8 @@
  721.  
  722.  static    char    sccsid[] = "@(#)groups.c    3.2    09:47:19    25 Nov 1991";
  723.  
  724. +#include "ngroups.h"
  725. +#include "config.h"
  726.  #include "stdio.h"
  727.  #include "pwd.h"
  728.  #include "grp.h"
  729. @@ -54,16 +56,11 @@
  730.  char    **argv;
  731.  {
  732.      int    ngroups;
  733. -#if NGROUPS > 0
  734. -#if NGROUPS > 100
  735. -    gid_t    *groups;
  736. -#else
  737. -    gid_t    groups[NGROUPS];
  738. -#endif
  739. +#ifdef NGROUPS_MAX
  740. +    GID_T    *groups;
  741.      int    i;
  742.  #else
  743.      char    *logname;
  744. -    char    *getlogin();
  745.  #endif
  746.      struct    group    *gr;
  747.      struct    group    *getgrgid();
  748. @@ -75,7 +72,7 @@
  749.           * for the current user.
  750.           */
  751.  
  752. -#if NGROUPS > 0
  753. +#ifdef NGROUPS_MAX
  754.          /*
  755.           * This system supports concurrent group sets, so
  756.           * I can ask the system to tell me which groups are
  757. @@ -83,9 +80,7 @@
  758.           */
  759.  
  760.          ngroups = getgroups (0, 0);
  761. -#if NGROUPS > 100
  762. -        groups = (gid_t *) malloc (ngroups * sizeof (int *));
  763. -#endif
  764. +        groups = (GID_T *) malloc (ngroups * sizeof (GID_T));
  765.          getgroups (ngroups, groups);
  766.  
  767.          /*
  768. --- gshadow.c
  769. +++ gshadow.c    1994/01/10 21:28:40
  770. @@ -135,8 +135,8 @@
  771.      long    atol ();
  772.      int    i;
  773.  
  774. -    strncpy (sgrbuf, string, (int) sizeof sgrbuf - 1);
  775. -    sgrbuf[sizeof sgrbuf - 1] = '\0';
  776. +    strncpy (sgrbuf, string, (int) sizeof (sgrbuf) - 1);
  777. +    sgrbuf[sizeof (sgrbuf) - 1] = '\0';
  778.  
  779.      if (cp = strrchr (sgrbuf, '\n'))
  780.          *cp = '\0';
  781. @@ -157,7 +157,7 @@
  782.       * the line is invalid.
  783.       */
  784.  
  785. -    if (cp || i != FIELDS)
  786. +    if ((cp && *cp) || i != FIELDS)
  787.          return 0;
  788.  
  789.      sgroup.sg_name = fields[0];
  790. --- id.c
  791. +++ id.c    1994/01/10 21:28:40
  792. @@ -20,6 +20,7 @@
  793.   *    the concurrent group set if the current system supports it.
  794.   */
  795.  
  796. +#include "ngroups.h"
  797.  #include <sys/types.h>
  798.  #include <stdio.h>
  799.  #include <grp.h>
  800. @@ -32,11 +33,7 @@
  801.  
  802.  usage ()
  803.  {
  804. -#if NGROUPS > 0
  805.      fprintf (stderr, "usage: id [ -a ]\n");
  806. -#else
  807. -    fprintf (stderr, "usage: id\n");
  808. -#endif
  809.      exit (1);
  810.  }
  811.  
  812. @@ -46,21 +43,13 @@
  813.  char    **argv;
  814.  {
  815.      int    id;
  816. -#if NGROUPS > 0
  817. -#if NGROUPS > 100
  818.      GID_T    *groups;
  819. -#else
  820. -    GID_T    groups[NGROUPS];
  821. -#endif
  822.      int    ngroups;
  823.      int    aflg = 0;
  824. -#endif
  825. -    struct    passwd    *pw,
  826. -            *getpwuid();
  827. -    struct    group    *gr,
  828. -            *getgrgid();
  829.  
  830. -#if NGROUPS > 0
  831. +    struct    passwd    *pw;
  832. +    struct    group    *gr;
  833. +
  834.      /*
  835.       * See if the -a flag has been given to print out the
  836.       * concurrent group set.
  837. @@ -72,10 +61,6 @@
  838.          else
  839.              aflg = 1;
  840.      }
  841. -#else
  842. -    if (argc > 1)
  843. -        usage ();
  844. -#endif
  845.  
  846.      /*
  847.       * Print out the real user ID and group ID.  If the user or
  848. @@ -109,7 +94,6 @@
  849.          else
  850.              printf (" egid=%d", id);
  851.      }
  852. -#if NGROUPS > 0
  853.  
  854.      /*
  855.       * Print out the concurrent group set if the user has requested
  856. @@ -117,21 +101,20 @@
  857.       * names.
  858.       */
  859.  
  860. -    if (aflg && (ngroups = getgroups (0, 0)) != -1) {
  861. +    if (aflg && NGROUPS_MAX > 1 && (ngroups = getgroups (0, 0)) > 0) {
  862.          int    i;
  863.  
  864. -#if NGROUPS > 100
  865.          /*
  866.           * The size of the group set is determined so an array
  867.           * large enough to hold it can be allocated.
  868.           */
  869.  
  870. -        if (groups = (int *) malloc (ngroups * sizeof *groups)) {
  871. +        if (!(groups = malloc (ngroups * sizeof *groups))) {
  872.              putchar ('\n');
  873.              perror ("out of memory");
  874.              exit (1);
  875.          }
  876. -#endif
  877. +
  878.          /*
  879.           * Start off the group message.  It will be of the format
  880.           *
  881. @@ -153,7 +136,6 @@
  882.                  printf ("%d", (int) groups[i]);
  883.          }
  884.      }
  885. -#endif
  886.  
  887.      /*
  888.       * Finish off the line.
  889. --- lastlog.c
  890. +++ lastlog.c    1994/01/10 21:28:41
  891. @@ -26,8 +26,6 @@
  892.  #define    strrchr    rindex
  893.  #endif
  894.  
  895. -#define LASTFILE "/usr/adm/lastlog"
  896. -
  897.  #include "config.h"
  898.  #include "lastlog.h"
  899.  
  900. --- lastlog.h
  901. +++ lastlog.h    1994/01/10 21:28:41
  902. @@ -1,3 +1,6 @@
  903. +#ifndef _LASTLOG_H
  904. +#define _LASTLOG_H
  905. +
  906.  /*
  907.   * Copyright 1989, 1990, 1992, 1993, John F. Haugh II
  908.   * All rights reserved.
  909. @@ -25,7 +28,7 @@
  910.  struct    lastlog    {
  911.      time_t    ll_time;
  912.      char    ll_line[8];
  913. -#ifdef    SVR4
  914.      char    ll_host[16];
  915. -#endif
  916.  };
  917. +
  918. +#endif
  919. --- log.c
  920. +++ log.c    1994/01/10 21:28:41
  921. @@ -36,14 +36,6 @@
  922.  
  923.  #include "lastlog.h"
  924.  
  925. -#ifndef    LASTLOG_FILE
  926. -#ifdef    SVR4
  927. -#define    LASTLOG_FILE    "/var/adm/lastlog"
  928. -#else
  929. -#define    LASTLOG_FILE    "/usr/adm/lastlog"
  930. -#endif    /* SVR4 */
  931. -#endif    /* LASTLOG_FILE */
  932. -
  933.  extern    struct    utmp    utent;
  934.  #ifdef    SVR4
  935.  extern    struct    utmpx    utxent;
  936. @@ -73,7 +65,7 @@
  937.       * If the file does not exist, don't create it.
  938.       */
  939.  
  940. -    if ((fd = open (LASTLOG_FILE, O_RDWR)) == -1)
  941. +    if ((fd = open (LASTFILE, O_RDWR)) == -1)
  942.          return;
  943.  
  944.      /*
  945. --- login.1
  946. +++ login.1    1994/01/10 21:28:41
  947. @@ -79,7 +79,7 @@
  948.  .SH Files
  949.  /etc/utmp \- list of current login sessions
  950.  .br
  951. -/etc/wtmp \- list of previous login sessions
  952. +/var/adm/wtmp \- list of previous login sessions
  953.  .br
  954.  /etc/passwd \- user account information
  955.  .br
  956. --- login.defs
  957. +++ login.defs    1994/01/10 21:28:41
  958. @@ -1,8 +1,6 @@
  959.  #
  960.  # /etc/login.defs - Configuration control definitions for the login package.
  961.  #
  962. -#    @(#)login.defs    3.7    09:32:02    30 Apr 1993
  963. -#
  964.  # Three items must be defined:  MAIL_DIR, ENV_SUPATH, and ENV_PATH.
  965.  # If unspecified, some arbitrary (and possibly incorrect) value will
  966.  # be assumed.  All other items are optional - if not specified then
  967. @@ -14,25 +12,25 @@
  968.  #
  969.  # Delay in seconds before being allowed another attempt after a login failure
  970.  #
  971. -FAIL_DELAY        5
  972. +FAIL_DELAY        1
  973.  
  974.  #
  975.  # Enable additional passwords upon dialup lines specified in /etc/dialups.
  976.  #
  977. -DIALUPS_CHECK_ENAB    yes
  978. +DIALUPS_CHECK_ENAB    no
  979.  
  980.  #
  981. -# Enable logging and display of /usr/adm/faillog login failure info.
  982. +# Enable logging and display of /var/adm/faillog login failure info.
  983.  #
  984.  FAILLOG_ENAB        yes
  985.  
  986.  #
  987.  # Enable display of unknown usernames when login failures are recorded.
  988.  #
  989. -LOG_UNKFAIL_ENAB    yes
  990. +LOG_UNKFAIL_ENAB    no
  991.  
  992.  #
  993. -# Enable logging and display of /usr/adm/lastlog login time info.
  994. +# Enable logging and display of /var/adm/lastlog login time info.
  995.  #
  996.  LASTLOG_ENAB        yes
  997.  
  998. @@ -44,12 +42,12 @@
  999.  #
  1000.  # Enable additional checks upon password changes.
  1001.  #
  1002. -OBSCURE_CHECKS_ENAB    yes
  1003. +OBSCURE_CHECKS_ENAB    no
  1004.  
  1005.  #
  1006.  # Enable checking of time restrictions specified in /etc/porttime.
  1007.  #
  1008. -PORTTIME_CHECKS_ENAB    yes
  1009. +PORTTIME_CHECKS_ENAB    no
  1010.  
  1011.  #
  1012.  # Enable setting of ulimit, umask, and niceness from passwd gecos field.
  1013. @@ -60,32 +58,26 @@
  1014.  # Enable "syslog" logging of su activity - in addition to sulog file logging.
  1015.  # SYSLOG_SG_ENAB does the same for newgrp and sg.
  1016.  #
  1017. -SYSLOG_SU_ENAB        no
  1018. -SYSLOG_SG_ENAB        no
  1019. +SYSLOG_SU_ENAB        yes
  1020. +SYSLOG_SG_ENAB        yes
  1021.  
  1022.  #
  1023.  # If defined, either full pathname of a file containing device names or
  1024.  # a ":" delimited list of device names.  Root logins will be allowed only
  1025.  # upon these devices.
  1026.  #
  1027. -CONSOLE        /etc/consoles
  1028. -#CONSOLE    console:tty01:tty02:tty03:tty04
  1029. +CONSOLE    tty1:tty2:tty3:tty4:tty5:tty6
  1030.  
  1031.  #
  1032.  # If defined, all su activity is logged to this file.
  1033.  #
  1034. -SULOG_FILE    /usr/adm/sulog
  1035. +SULOG_FILE    /var/adm/sulog
  1036.  
  1037.  #
  1038.  # If defined, ":" delimited list of "message of the day" files to
  1039.  # be displayed upon login.
  1040.  #
  1041.  MOTD_FILE    /etc/motd
  1042. -#MOTD_FILE    /etc/motd:/usr/lib/news/news-motd
  1043. -
  1044. -#
  1045. -# If set to "yes" /etc/issue will be output before each login prompt
  1046. -ISSUE_FILE_ENAB    yes
  1047.  
  1048.  #
  1049.  # If defined, file which maps tty line to TERM environment parameter.
  1050. @@ -96,14 +88,14 @@
  1051.  #
  1052.  # If defined, login failures will be logged here in a utmp format.
  1053.  #
  1054. -FTMP_FILE    /etc/ftmp
  1055. +#FTMP_FILE    /etc/ftmp
  1056.  
  1057.  #
  1058.  # If defined, name of file whose presence which will inhibit non-root
  1059.  # logins.  The contents of this file should be a message indicating
  1060.  # why logins are inhibited.
  1061.  #
  1062. -NOLOGINS_FILE    /etc/nologins
  1063. +NOLOGINS_FILE    /etc/nologin
  1064.  
  1065.  #
  1066.  # If defined, the command name to display when running "su -".  For
  1067. @@ -118,8 +110,8 @@
  1068.  #   Directory where mailboxes reside, _or_ name of file, relative to the
  1069.  #   home directory.  If you _do_ define both, MAIL_DIR takes precedence.
  1070.  #
  1071. -MAIL_DIR    /usr/spool/mail
  1072. -#MAIL_FILE    .mail
  1073. +#MAIL_DIR    /var/spool/mail
  1074. +MAIL_FILE    .mail
  1075.  
  1076.  #
  1077.  # If defined, file which inhibits all the usual chatter during the login
  1078. @@ -133,6 +125,7 @@
  1079.  #
  1080.  # If defined, the presence of this value in an /etc/passwd "shell" field will
  1081.  # disable logins for that user, although "su" will still be allowed.
  1082. +# This option is not implemented right now...
  1083.  #
  1084.  NOLOGIN_STR    NOLOGIN
  1085.  
  1086. @@ -140,19 +133,19 @@
  1087.  # If defined, either a TZ environment parameter spec or the
  1088.  # fully-rooted pathname of a file containing such a spec.
  1089.  #
  1090. -ENV_TZ        TZ=CST6CDT
  1091. -#ENV_TZ        /etc/tzname
  1092. +#ENV_TZ        TZ=CST6CDT
  1093. +ENV_TZ        /usr/lib/zoneinfo/localtime
  1094.  
  1095.  #
  1096.  # If defined, an HZ environment parameter spec.
  1097.  #
  1098. -ENV_HZ        HZ=50
  1099. +ENV_HZ        HZ=100
  1100.  
  1101.  #
  1102.  # *REQUIRED*  The default PATH settings, for superuser and normal users.
  1103.  #
  1104. -ENV_SUPATH    PATH=/etc/local:/etc:/local/bin:/usr/bin:/bin
  1105. -ENV_PATH    PATH=/local/bin:/usr/bin:/bin
  1106. +ENV_SUPATH    PATH=/sbin:/usr/sbin:/etc:/usr/bin:/bin:/usr/X386/bin:/usr/TeX/bin
  1107. +ENV_PATH    PATH=/usr/bin:/bin:/usr/X386/bin:/usr/TeX/bin
  1108.  
  1109.  #
  1110.  # Terminal permissions
  1111. @@ -182,7 +175,7 @@
  1112.  #
  1113.  # Prefix these values with "0" to get octal, "0x" to get hexadecimal.
  1114.  #
  1115. -ERASECHAR    010
  1116. +ERASECHAR    127
  1117.  KILLCHAR    025
  1118.  UMASK        022
  1119.  ULIMIT        2097152
  1120. @@ -198,5 +191,5 @@
  1121.  PASS_MAX_DAYS    99999
  1122.  PASS_MIN_DAYS    0
  1123.  PASS_MIN_LEN    5
  1124. -PASS_WARN_AGE    7
  1125. +PASS_WARN_AGE    14
  1126.  
  1127. --- newgrp.c
  1128. +++ newgrp.c    1994/01/10 21:28:41
  1129. @@ -12,6 +12,7 @@
  1130.   * no warrantee of any kind.
  1131.   */
  1132.  
  1133. +#include "ngroups.h"
  1134.  #include <sys/types.h>
  1135.  #ifndef    BSD
  1136.  #include <string.h>
  1137. @@ -35,9 +36,9 @@
  1138.  static    char    sccsid[] = "@(#)newgrp.c    3.11    07:34:23    08 Apr 1993";
  1139.  #endif
  1140.  
  1141. -#ifdef    NGROUPS
  1142. +#ifdef    NGROUPS_MAX
  1143.  int    ngroups;
  1144. -gid_t    groups[NGROUPS];
  1145. +gid_t    groups[NGROUPS_MAX];
  1146.  #endif
  1147.  
  1148.  char    *getpass();
  1149. @@ -60,7 +61,9 @@
  1150.  #ifdef    USE_SYSLOG
  1151.  #include <syslog.h>
  1152.  
  1153. +#ifndef __linux__
  1154.  /*VARARGS*/ int syslog();
  1155. +#endif
  1156.  
  1157.  #ifndef    LOG_WARN
  1158.  #define    LOG_WARN LOG_WARNING
  1159. @@ -248,7 +251,6 @@
  1160.              }
  1161.          }
  1162.      }
  1163. -#ifdef    NGROUPS
  1164.  
  1165.      /*
  1166.       * get the current users groupset.  the new group will be
  1167. @@ -257,10 +259,11 @@
  1168.       * group id's are set.
  1169.       */
  1170.  
  1171. -    ngroups = getgroups (0, 0);
  1172. -    if (ngroups > 0)
  1173. +    if (NGROUPS_MAX > 1) {
  1174. +      ngroups = getgroups (0, 0);
  1175. +      if (ngroups > 0)
  1176.          getgroups (ngroups, groups);
  1177. -#endif
  1178. +    }
  1179.  
  1180.      /*
  1181.       * now we put her in the new group.  the password file entry for
  1182. @@ -425,7 +428,7 @@
  1183.          syslog (LOG_INFO, "user `%s' switched to group `%s'\n", name, group);
  1184.  #endif
  1185.      gid = grp->gr_gid;
  1186. -#ifdef    NGROUPS
  1187. +#ifdef    NGROUPS_MAX
  1188.  
  1189.      /*
  1190.       * i am going to try to add her new group id to her concurrent
  1191. @@ -439,7 +442,7 @@
  1192.              break;
  1193.      }
  1194.      if (i == ngroups) {
  1195. -        if (ngroups == NGROUPS) {
  1196. +        if (ngroups == NGROUPS_MAX) {
  1197.              fprintf (stderr, "too many groups\n");
  1198.          } else {
  1199.              groups[ngroups++] = gid;
  1200. --- newusers.8
  1201. +++ newusers.8    1994/01/10 21:28:41
  1202. @@ -33,15 +33,13 @@
  1203.  group is given, a new group will be created having this number.
  1204.  .IP "pw_dir"
  1205.  This field will be checked for existence as a directory and a new
  1206. -directory will the same name created if it does not already exist.
  1207. +directory with the same name will be created if it does not already exist.
  1208.  The ownership of the directory will be set to be that of the user
  1209.  being created or updated.
  1210.  .PP
  1211.  This command is intended to be used in a large system environment where
  1212.  many accounts are updated at a single time.
  1213.  .SH CAVEATS
  1214. -The \fImkpasswd\fR command must be executed afterwards to update the
  1215. -DBM password files.
  1216.  The input file must be protected since it contains unencrypted passwords.
  1217.  .SH SEE ALSO
  1218. -mkpasswd(8), passwd(1), useradd(1)
  1219. +passwd(1), useradd(1)
  1220. --- ngroups.h
  1221. +++ ngroups.h    1994/01/10 21:28:41
  1222. @@ -0,0 +1,15 @@
  1223. +#include <unistd.h>
  1224. +
  1225. +#ifdef _POSIX_VERSION
  1226. +#include <limits.h>
  1227. +#if !defined(NGROUPS_MAX) || NGROUPS_MAX < 1
  1228. +#undef NGROUPS_MAX
  1229. +#define NGROUPS_MAX sysconf (_SC_NGROUPS_MAX)
  1230. +#endif /* !NGROUPS_MAX */
  1231. +
  1232. +#else /* not _POSIX_VERSION */
  1233. +#include <sys/param.h>
  1234. +#if !defined(NGROUPS_MAX) && defined(NGROUPS)
  1235. +#define NGROUPS_MAX NGROUPS
  1236. +#endif /* not NGROUPS_MAX and NGROUPS */
  1237. +#endif /* not _POSIX_VERSION */
  1238. --- obscure.c
  1239. +++ obscure.c    1994/01/10 21:28:41
  1240. @@ -80,8 +80,10 @@
  1241.      char    *FascistCheck();
  1242.  #endif
  1243.  
  1244. +#if 0
  1245.      if (old[0] == '\0')
  1246.          return (1);
  1247. +#endif
  1248.  
  1249.      if ( strlen(new) < getdef_num("PASS_MIN_LEN", 0) ) {
  1250.          printf ("Too short.  ");
  1251. @@ -114,7 +116,7 @@
  1252.      if (similiar (newmono, oldmono))    /* jumbled version */
  1253.          return (0);
  1254.  
  1255. -    if (simple (old, new))            /* keyspace size */
  1256. +    if (simple (new, old))            /* keyspace size */
  1257.          return (0);
  1258.  
  1259.      strcpy (wrapped, oldmono);
  1260. @@ -143,7 +145,7 @@
  1261.   */
  1262.  
  1263.  /*ARGSUSED*/
  1264. -int    palindrome (old, new)
  1265. +int    palindrome (new, old)
  1266.  char    *old;
  1267.  char    *new;
  1268.  {
  1269. @@ -164,7 +166,7 @@
  1270.   */
  1271.  
  1272.  /*ARGSUSED*/
  1273. -int    similiar (old, new)
  1274. +int    similiar (new, old)
  1275.  char    *old;
  1276.  char    *new;
  1277.  {
  1278. @@ -187,7 +189,7 @@
  1279.   */
  1280.  
  1281.  /*ARGSUSED*/
  1282. -int    simple (old, new)
  1283. +int    simple (new, old)
  1284.  char    *old;
  1285.  char    *new;
  1286.  {
  1287. --- passwd.1
  1288. +++ passwd.1    1994/01/10 21:28:41
  1289. @@ -70,15 +70,15 @@
  1290.  Both entries are require to match in order for the password
  1291.  to be changed.
  1292.  .SS Group passwords
  1293. -When the \fB-g\f option is used, the password for the named
  1294. +When the \fB-g\fR option is used, the password for the named
  1295.  group is changed.
  1296.  The user must either be the super user, or a group administrator
  1297.  for the named group.
  1298.  The current group password is not prompted for.
  1299. -The \fB-r\f option is used with the \fB-g\f option to remove
  1300. +The \fB-r\fR option is used with the \fB-g\fR option to remove
  1301.  the current password from the named group.
  1302.  This allows group access to all members.
  1303. -The \fB-R\f option is used with the \fB-g\f option to restrict
  1304. +The \fB-R\fR option is used with the \fB-g\fR option to restrict
  1305.  the named group for all users.
  1306.  .SS Password expiry information
  1307.  The password aging information may be changed by the super
  1308. --- passwd.c
  1309. +++ passwd.c    1994/01/10 21:28:41
  1310. @@ -295,6 +295,10 @@
  1311.  char    *passwd;
  1312.  char    *result;
  1313.  {
  1314. +    if (! string || ! *string) {
  1315. +        while (*passwd)
  1316. +            *result++ = *passwd++;
  1317. +    } else {
  1318.      while (*string) {
  1319.          if (string[0] == ';') {
  1320.              *result++ = *string++;
  1321. @@ -309,6 +313,7 @@
  1322.                  string++;
  1323.          }
  1324.      }
  1325. +    }
  1326.      *result = '\0';
  1327.  }
  1328.  
  1329. @@ -361,6 +366,8 @@
  1330.          strcpy (orig, clear);
  1331.          bzero (cipher, strlen (cipher));
  1332.          bzero (clear, strlen (clear));
  1333. +    } else {
  1334. +      orig[0] = '\0';
  1335.      }
  1336.  
  1337.      /*
  1338. @@ -371,7 +378,7 @@
  1339.       */
  1340.  
  1341.      printf (NEWPASSMSG, getdef_num ("PASS_MIN_LEN", 5));
  1342. -    for (i = 0;i < 3;i++) {
  1343. +    for (i = 0;i < 5;i++) {
  1344.          if (! (cp = getpass (NEWPASS))) {
  1345.              bzero (orig, sizeof orig);
  1346.              return -1;
  1347. @@ -395,7 +402,7 @@
  1348.      }
  1349.      bzero (orig, sizeof orig);
  1350.  
  1351. -    if (i == 3) {
  1352. +    if (i == 5) {
  1353.          bzero (pass, sizeof pass);
  1354.          return -1;
  1355.      }
  1356. --- pwauth.c
  1357. +++ pwauth.c    1994/01/10 21:28:41
  1358. @@ -38,6 +38,9 @@
  1359.   *    compared.
  1360.   */
  1361.  
  1362. +char    *getpass ();
  1363. +char    *pw_encrypt ();
  1364. +
  1365.  int
  1366.  _old_auth (cipher, user, reason, input)
  1367.  char    *cipher;
  1368. --- pwauth.h
  1369. +++ pwauth.h    1994/01/10 21:28:41
  1370. @@ -14,11 +14,7 @@
  1371.   *    @(#)pwauth.h    3.2    17:40:49    01 May 1993
  1372.   */
  1373.  
  1374. -#if    __STDC__
  1375. -int    pw_auth (char * program, char * user, int flag, char * input);
  1376. -#else
  1377.  int    pw_auth ();
  1378. -#endif
  1379.  
  1380.  /*
  1381.   * Local access
  1382. --- pwck.c
  1383. +++ pwck.c    1994/01/10 21:28:41
  1384. @@ -75,7 +75,7 @@
  1385.  char    *CANTUPDATE = "%s: cannot update file %s\n";
  1386.  char    *CHANGES = "%s: the files have been updated; run mkpasswd\n";
  1387.  char    *NOCHANGES = "%s: no changes\n";
  1388. -char    *NOGROUP = "user %s: no group %d\n";
  1389. +char    *_NOGROUP = "user %s: no group %d\n";    /* NOGROUP is a macro in linux */
  1390.  char    *NOHOME = "user %s: directory %s does not exist\n";
  1391.  char    *NOSHELL = "user %s: program %s does not exist\n";
  1392.  char    *BADENTRY = "invalid password file entry\n";
  1393. @@ -401,7 +401,7 @@
  1394.               * No primary group, just give a warning
  1395.               */
  1396.  
  1397. -            printf (NOGROUP, pwd->pw_name, pwd->pw_gid);
  1398. +            printf (_NOGROUP, pwd->pw_name, pwd->pw_gid);
  1399.              errors++;
  1400.          }
  1401.  
  1402. --- setup.c
  1403. +++ setup.c    1994/01/10 21:28:41
  1404. @@ -12,6 +12,7 @@
  1405.   * no warrantee of any kind.
  1406.   */
  1407.  
  1408. +#include "ngroups.h"
  1409.  #include <sys/types.h>
  1410.  #include <utmp.h>
  1411.  
  1412. @@ -151,7 +152,7 @@
  1413.  
  1414.      /*
  1415.       * See if the GECOS field contains values for NICE, UMASK or ULIMIT.
  1416. -     * If this feature is enabled in /etc/login.defs, we makes those
  1417. +     * If this feature is enabled in /etc/login.defs, we make those
  1418.       * values the defaults for this login session.
  1419.       */
  1420.  
  1421. @@ -198,14 +199,13 @@
  1422.  #endif
  1423.          exit (errno);
  1424.      }
  1425. -#if NGROUPS > 1
  1426.  
  1427.      /*
  1428.       * For systems which support multiple concurrent groups, go get
  1429.       * the group set from the /etc/group file.
  1430.       */
  1431.  
  1432. -    if (initgroups (info->pw_name, info->pw_gid) == -1) {
  1433. +    if (NGROUPS_MAX > 1 && initgroups (info->pw_name, info->pw_gid) == -1) {
  1434.          puts ("initgroups failure");
  1435.  #ifdef    USE_SYSLOG
  1436.          syslog (LOG_WARN, "initgroups failed for user `%s'\n",
  1437. @@ -214,7 +214,6 @@
  1438.  #endif
  1439.          exit (errno);
  1440.      }
  1441. -#endif /* NGROUPS > 1 */
  1442.  
  1443.      /*
  1444.       * Set the real UID to the UID value in the password file.
  1445. --- shadow.4
  1446. +++ shadow.4    1994/01/10 21:28:41
  1447. @@ -71,6 +71,4 @@
  1448.  su(1),
  1449.  sulogin(1M),
  1450.  shadow(3),
  1451. -passwd(4),
  1452. -pwconv(8),
  1453. -pwunconv(8)
  1454. +passwd(4)
  1455. --- shadow.c
  1456. +++ shadow.c    1994/01/10 21:28:41
  1457. @@ -9,9 +9,9 @@
  1458.   * distribution media.
  1459.   */
  1460.  
  1461. -#include "shadow.h"
  1462.  #include "config.h"
  1463.  #include <stdio.h>
  1464. +#include "shadow.h"
  1465.  
  1466.  #ifdef    STDLIB_H
  1467.  #include <stdlib.h>
  1468. @@ -201,9 +201,6 @@
  1469.  
  1470.  struct spwd
  1471.  *getspnam (name)
  1472. -#if    __STDC__
  1473. -const
  1474. -#endif
  1475.  char    *name;
  1476.  {
  1477.      struct    spwd    *sp;
  1478. --- smain.c
  1479. +++ smain.c    1994/01/10 21:28:41
  1480. @@ -48,7 +48,9 @@
  1481.  #ifdef    USE_SYSLOG
  1482.  #include <syslog.h>
  1483.  
  1484. +#ifndef __linux__
  1485.  /*VARARGS*/ int syslog();
  1486. +#endif
  1487.  
  1488.  #ifndef    LOG_WARN
  1489.  #define    LOG_WARN LOG_WARNING
  1490. @@ -115,9 +117,11 @@
  1491.  extern    char    *tz ();
  1492.  extern    char    *pw_encrypt();
  1493.  extern    int    pw_auth();
  1494. +#ifndef __linux__
  1495.  extern    struct    passwd    *getpwuid ();
  1496.  extern    struct    passwd    *getpwnam ();
  1497.  extern    struct    spwd    *getspnam ();
  1498. +#endif
  1499.  extern    char    *getdef_str();
  1500.  extern    int    getdef_bool();
  1501.  extern    char    **environ;
  1502. --- sppwd.c
  1503. +++ sppwd.c    1994/01/10 21:28:41
  1504. @@ -0,0 +1,58 @@
  1505. +#undef SHADOW_PWD
  1506. +#include <stdio.h>
  1507. +#include <sys/types.h>
  1508. +#include <shadow.h>
  1509. +#include <pwd.h>
  1510. +#include <grp.h>
  1511. +#include <unistd.h>
  1512. +
  1513. +struct passwd *_spsubspwd(struct passwd *pw)
  1514. +{
  1515. +    struct spwd *spw; 
  1516. +    if (pw)
  1517. +    {    spw = getspnam(pw->pw_name);
  1518. +        if (spw)
  1519. +            pw->pw_passwd = spw->sp_pwdp;
  1520. +    }
  1521. +    return(pw);
  1522. +}
  1523. +
  1524. +struct group *_spsubsgrp(struct group *gr)
  1525. +{
  1526. +    struct sgrp *sgr; 
  1527. +    if (gr)
  1528. +    {    sgr = getsgnam(gr->gr_name);
  1529. +        if (sgr)
  1530. +            gr->gr_passwd = sgr->sg_passwd;
  1531. +    }
  1532. +    return(gr);
  1533. +}
  1534. +
  1535. +struct passwd *_spgetpwuid(uid_t  uid) { return(_spsubspwd(getpwuid(uid))); }
  1536. +
  1537. +struct passwd *_spgetpwnam(char  *name) { return(_spsubspwd(getpwnam(name))); }
  1538. +
  1539. +struct passwd *_spgetpwent(void) { return(_spsubspwd(getpwent())); }
  1540. +
  1541. +struct passwd *_spfgetpwent(FILE *F) { return(_spsubspwd(fgetpwent(F))); }
  1542. +
  1543. +struct group *_spgetgrgid(gid_t  gid) { return(_spsubsgrp(getgrgid(gid))); }
  1544. +
  1545. +struct group *_spgetgrnam(char  *name) { return(_spsubsgrp(getgrnam(name))); }
  1546. +
  1547. +struct group *_spgetgrent(void) { return(_spsubsgrp(getgrent())); }
  1548. +
  1549. +struct group *_spfgetgrent(FILE *F) { return(_spsubsgrp(fgetgrent(F))); }
  1550. +
  1551. +char *_spcrypt(char clear[], char salt[] )
  1552. +{
  1553. +    static char buffer[30];
  1554. +    char *cp = crypt (clear, salt);
  1555. +    strcpy (buffer, cp);
  1556. +    if (strlen (clear) > 8) {
  1557. +        cp = crypt (clear + 8, salt);
  1558. +        strcat (buffer, cp + 2);
  1559. +    }
  1560. +    return(buffer);
  1561. +}
  1562. +
  1563. --- sulogin.c
  1564. +++ sulogin.c    1994/01/10 21:28:42
  1565. @@ -102,6 +102,7 @@
  1566.  #define    RETRIES    3
  1567.  #endif
  1568.  
  1569. +SIGTYPE
  1570.  catch (sig)
  1571.  int    sig;
  1572.  {
  1573. @@ -232,7 +233,7 @@
  1574.              strcpy (pass, cp);
  1575.  
  1576.          if (pwent.pw_name && pwent.pw_passwd[0] == '@') {
  1577. -            if (pw_auth (pwent.pw_passwd + 1, name, PW_LOGIN)) {
  1578. +            if (pw_auth (pwent.pw_passwd + 1, name, PW_LOGIN, "")) {
  1579.  #ifdef    USE_SYSLOG
  1580.                  syslog (LOG_WARN,
  1581.                      "Incorrect root authentication");
  1582. --- tz.c
  1583. +++ tz.c    1994/01/10 21:28:42
  1584. @@ -27,7 +27,7 @@
  1585.  char    *fname;
  1586.  {
  1587.      FILE *fp;
  1588. -    static char tzbuf[64];
  1589. +    static char tzbuf[1024];
  1590.  
  1591.      if ((fp = fopen(fname,"r")) == NULL)
  1592.          return "TZ=CST6CDT";
  1593. --- useradd.c
  1594. +++ useradd.c    1994/01/10 21:28:42
  1595. @@ -16,6 +16,7 @@
  1596.  static    char    sccsid[] = "@(#)useradd.c    3.14    08:20:53    23 Aug 1993";
  1597.  #endif
  1598.  
  1599. +#include "ngroups.h"
  1600.  #include "config.h"
  1601.  #include <sys/types.h>
  1602.  #include <sys/stat.h>
  1603. @@ -59,10 +60,6 @@
  1604.  char    def_file[] = "/usr/sadm/defadduser";
  1605.  #else
  1606.  char    def_file[] = "/etc/default/useradd";
  1607. -#endif
  1608. -
  1609. -#ifndef    NGROUPS_MAX
  1610. -#define    NGROUPS_MAX    64
  1611.  #endif
  1612.  
  1613.  #if !defined(MDY_DATE) && !defined(DMY_DATE) && !defined(YMD_DATE)
  1614. --- userdel.c
  1615. +++ userdel.c    1994/01/10 21:28:42
  1616. @@ -47,10 +47,6 @@
  1617.  #endif
  1618.  #endif
  1619.  
  1620. -#ifndef    NGROUPS_MAX
  1621. -#define    NGROUPS_MAX    64
  1622. -#endif
  1623. -
  1624.  #if defined(DIR_XENIX) || defined(DIR_BSD) || defined(DIR_SYSV)
  1625.  #define    DIR_ANY
  1626.  #endif
  1627. @@ -377,7 +373,7 @@
  1628.      struct    spwd    *spwd;
  1629.  
  1630.      if ((spwd = spw_locate (user_name)) && spwd->sp_pwdp[0] == '@') {
  1631. -        if (pw_auth (spwd->sp_pwdp + 1, user_name, PW_DELETE)) {
  1632. +        if (pw_auth (spwd->sp_pwdp + 1, user_name, PW_DELETE, "")) {
  1633.  #ifdef    USE_SYSLOG
  1634.              syslog (LOG_ERR,
  1635.                  "failed deleting auth `%s' for user `%s'\n",
  1636. @@ -397,7 +393,7 @@
  1637.      }
  1638.  #endif    /* SHADOWPWD */
  1639.      if ((pwd = pw_locate (user_name)) && pwd->pw_passwd[0] == '@') {
  1640. -        if (pw_auth (pwd->pw_passwd + 1, user_name, PW_DELETE)) {
  1641. +        if (pw_auth (pwd->pw_passwd + 1, user_name, PW_DELETE, "")) {
  1642.  #ifdef    USE_SYSLOG
  1643.              syslog (LOG_ERR,
  1644.                  "failed deleting auth `%s' for user `%s'\n",
  1645. @@ -520,22 +516,22 @@
  1646.  {
  1647.      char    buf[BUFSIZ];
  1648.  
  1649. -#ifdef    HAS_CRONTAB
  1650. +#ifdef    CRONTAB_REM
  1651.  
  1652.      /* 
  1653.       * Remove the crontab if there is one.
  1654.       */
  1655.  
  1656. -    sprintf (buf, "/bin/crontab -r -u %s", user);
  1657. +    sprintf (buf, CRONTAB_REM, user);
  1658.      system (buf);
  1659.  #endif
  1660. -#ifdef    HAS_ATRM
  1661. +#ifdef    ATRUN_REM
  1662.  
  1663.      /*
  1664.       * Remove any at jobs as well.
  1665.       */
  1666.  
  1667. -    sprintf (buf, "/bin/atrm -f %s", user);
  1668. +    sprintf (buf, ATRUN_REM, user);
  1669.      system (buf);
  1670.  #endif
  1671.  }
  1672. --- usermod.c
  1673. +++ usermod.c    1994/01/10 21:28:42
  1674. @@ -16,6 +16,7 @@
  1675.  static    char    sccsid[] = "@(#)usermod.c    3.16    08:11:52    07 May 1993";
  1676.  #endif
  1677.  
  1678. +#include "ngroups.h"
  1679.  #include <sys/types.h>
  1680.  #include <sys/stat.h>
  1681.  #include <stdio.h>
  1682. @@ -48,10 +49,6 @@
  1683.  #endif
  1684.  #endif
  1685.  
  1686. -#ifndef    NGROUPS_MAX
  1687. -#define    NGROUPS_MAX    64
  1688. -#endif
  1689. -
  1690.  #if defined(DIR_XENIX) || defined(DIR_BSD) || defined(DIR_SYSV)
  1691.  #define    DIR_ANY
  1692.  #endif
  1693. @@ -1619,7 +1616,7 @@
  1694.       * anything to just leave it be.
  1695.       */
  1696.  
  1697. -    if ((fd = open ("/usr/adm/lastlog", O_RDWR)) != -1) {
  1698. +    if ((fd = open (LASTFILE, O_RDWR)) != -1) {
  1699.          lseek (fd, (long) user_id * sizeof ll, 0);
  1700.          if (read (fd, &ll, sizeof ll) == sizeof ll) {
  1701.              lseek (fd, (long) user_newid * sizeof ll, 0);
  1702.