CVS log for src/usr.sbin/user/user.c
Up to [cvs.NetBSD.org] / src / usr.sbin / user
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.135.4.1: download - view: text, markup, annotated - select for diffs
Wed Nov 4 23:29:03 2026 UTC (11 days, 13 hours ago) by perseant
Branches: perseant-exfatfs
Diff to: previous 1.135: preferred, colored; next MAIN 1.136: preferred, colored
Changes since revision 1.135: +13 -9
lines
Sync with HEAD
Revision 1.136: download - view: text, markup, annotated - select for diffs
Tue Mar 17 17:37:50 2026 UTC (8 months ago) by christos
Branches: MAIN
CVS tags: perseant-exfatfs-base-20261102,
HEAD
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +13 -9
lines
PR/59415: ssszcmawo: group(8) can rename a group to an existing group name
Revision 1.135: download - view: text, markup, annotated - select for diffs
Sun Dec 12 14:33:13 2021 UTC (4 years, 11 months ago) by nia
Branches: MAIN
CVS tags: perseant-exfatfs-base-20250801,
perseant-exfatfs-base-20240630,
perseant-exfatfs-base,
netbsd-11-base,
netbsd-11-1-RELEASE,
netbsd-11-0-RELEASE,
netbsd-11-0-RC7,
netbsd-11-0-RC6,
netbsd-11-0-RC5,
netbsd-11-0-RC4,
netbsd-11-0-RC3,
netbsd-11-0-RC2,
netbsd-11-0-RC1,
netbsd-11,
netbsd-10-base,
netbsd-10-2-RELEASE,
netbsd-10-1-RELEASE,
netbsd-10-0-RELEASE,
netbsd-10-0-RC6,
netbsd-10-0-RC5,
netbsd-10-0-RC4,
netbsd-10-0-RC3,
netbsd-10-0-RC2,
netbsd-10-0-RC1,
netbsd-10
Branch point for: perseant-exfatfs
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +3 -3
lines
Fix copypasto in comment.
Revision 1.134: download - view: text, markup, annotated - select for diffs
Fri Dec 10 20:06:29 2021 UTC (4 years, 11 months ago) by nia
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +11 -6
lines
useradd(8): Recognize Argon2 passwords as "valid" when they are given
on the command line.
Reported by Robert Nestor on current-users@.
Revision 1.132.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:06:07 2020 UTC (6 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.132: preferred, colored; next MAIN 1.133: preferred, colored
Changes since revision 1.132: +3 -3
lines
Mostly merge changes from HEAD upto 20200411
Revision 1.133: download - view: text, markup, annotated - select for diffs
Mon Jul 29 09:33:21 2019 UTC (7 years, 3 months ago) by wiz
Branches: MAIN
CVS tags: phil-wifi-20200421,
phil-wifi-20200411,
phil-wifi-20200406,
phil-wifi-20191119,
netbsd-9-base,
netbsd-9-5-RELEASE,
netbsd-9-4-RELEASE,
netbsd-9-3-RELEASE,
netbsd-9-2-RELEASE,
netbsd-9-1-RELEASE,
netbsd-9-0-RELEASE,
netbsd-9-0-RC2,
netbsd-9-0-RC1,
netbsd-9,
is-mlppp-base,
is-mlppp,
cjep_sun2x-base1,
cjep_sun2x-base,
cjep_sun2x,
cjep_staticlib_x-base1,
cjep_staticlib_x-base,
cjep_staticlib_x
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +3 -3
lines
Fix warning in userdel -r.
If the 'rm -rf' works, then the home directory does not exist any more,
and rmdir() on it will return an error (ENOENT). Catch and ignore it.
Avoids:
# useradd -m foo
# userdel -r foo
userdel: Unable to remove all files in `/home/foo': No such file or directory
Revision 1.131.28.1: download - view: text, markup, annotated - select for diffs
Mon Jun 25 07:26:13 2018 UTC (8 years, 4 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.131: preferred, colored; next MAIN 1.132: preferred, colored
Changes since revision 1.131: +3 -3
lines
Sync with HEAD
Revision 1.131.22.1: download - view: text, markup, annotated - select for diffs
Thu Jun 14 19:54:40 2018 UTC (8 years, 5 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE,
netbsd-8-2-RELEASE,
netbsd-8-1-RELEASE,
netbsd-8-1-RC1,
netbsd-8-0-RELEASE,
netbsd-8-0-RC2
Diff to: previous 1.131: preferred, colored; next MAIN 1.132: preferred, colored
Changes since revision 1.131: +3 -3
lines
Pull up following revision(s) (requested by zafer in ticket #877):
usr.sbin/user/user.c: revision 1.132
Set default homeperm values before writing usermgmt.conf file and
honor values in it instead of ignoring it.
Fixes PR bin/40324 by Guy Yur
Revision 1.132: download - view: text, markup, annotated - select for diffs
Sun Jun 10 07:52:05 2018 UTC (8 years, 5 months ago) by zafer
Branches: MAIN
CVS tags: phil-wifi-base,
phil-wifi-20190609,
pgoyette-compat-20190127,
pgoyette-compat-20190118,
pgoyette-compat-1226,
pgoyette-compat-1126,
pgoyette-compat-1020,
pgoyette-compat-0930,
pgoyette-compat-0906,
pgoyette-compat-0728,
pgoyette-compat-0625
Branch point for: phil-wifi
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +3 -3
lines
Set default homeperm values before writing usermgmt.conf file and honor values in it instead of ignoring it.
Fixes PR bin/40324 by Guy Yur
Revision 1.129.6.1: download - view: text, markup, annotated - select for diffs
Mon Feb 25 00:30:49 2013 UTC (13 years, 8 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.129: preferred, colored; next MAIN 1.130: preferred, colored
Changes since revision 1.129: +9 -3
lines
resync with head
Revision 1.126.6.2: download - view: text, markup, annotated - select for diffs
Wed Jan 16 05:34:13 2013 UTC (13 years, 10 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.126.6.1: preferred, colored; branchpoint 1.126: preferred, colored; next MAIN 1.127: preferred, colored
Changes since revision 1.126.6.1: +9 -3
lines
sync with (a bit old) head
Revision 1.131: download - view: text, markup, annotated - select for diffs
Wed Nov 28 11:31:27 2012 UTC (13 years, 11 months ago) by blymn
Branches: MAIN
CVS tags: yamt-pagecache-base9,
yamt-pagecache-base8,
yamt-pagecache-base7,
tls-maxphys-base,
tls-earlyentropy-base,
tls-earlyentropy,
riastradh-xf86-video-intel-2-7-1-pre-2-21-15,
riastradh-drm2-base3,
riastradh-drm2-base2,
riastradh-drm2-base1,
riastradh-drm2-base,
riastradh-drm2,
prg-localcount2-base3,
prg-localcount2-base2,
prg-localcount2-base1,
prg-localcount2-base,
prg-localcount2,
pgoyette-localcount-base,
pgoyette-localcount-20170426,
pgoyette-localcount-20170320,
pgoyette-localcount-20170107,
pgoyette-localcount-20161104,
pgoyette-localcount-20160806,
pgoyette-localcount-20160726,
pgoyette-localcount,
pgoyette-compat-base,
pgoyette-compat-0521,
pgoyette-compat-0502,
pgoyette-compat-0422,
pgoyette-compat-0415,
pgoyette-compat-0407,
pgoyette-compat-0330,
pgoyette-compat-0322,
pgoyette-compat-0315,
perseant-stdc-iso10646-base,
perseant-stdc-iso10646,
netbsd-8-base,
netbsd-8-0-RC1,
netbsd-7-nhusb-base-20170116,
netbsd-7-nhusb-base,
netbsd-7-nhusb,
netbsd-7-base,
netbsd-7-2-RELEASE,
netbsd-7-1-RELEASE,
netbsd-7-1-RC2,
netbsd-7-1-RC1,
netbsd-7-1-2-RELEASE,
netbsd-7-1-1-RELEASE,
netbsd-7-1,
netbsd-7-0-RELEASE,
netbsd-7-0-RC3,
netbsd-7-0-RC2,
netbsd-7-0-RC1,
netbsd-7-0-2-RELEASE,
netbsd-7-0-1-RELEASE,
netbsd-7-0,
netbsd-7,
matt-nb8-mediatek-base,
matt-nb8-mediatek,
localcount-20160914,
bouyer-socketcan-base1,
bouyer-socketcan-base,
bouyer-socketcan,
agc-symver-base,
agc-symver
Branch point for: pgoyette-compat,
netbsd-8
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +3 -3
lines
Fix error message when trying to add a group using -g =uid that
that already exists, the old version printed the wrong GID.
Revision 1.130: download - view: text, markup, annotated - select for diffs
Wed Nov 28 11:20:58 2012 UTC (13 years, 11 months ago) by blymn
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +8 -2
lines
Google Code In bug fix by Philip Hayes, fixes bin/41049
Revision 1.126.6.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:09:54 2012 UTC (14 years, 7 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +24 -28
lines
sync with head
Revision 1.129: download - view: text, markup, annotated - select for diffs
Thu Dec 1 00:34:05 2011 UTC (14 years, 11 months ago) by dholland
Branches: MAIN
CVS tags: yamt-pagecache-base6,
yamt-pagecache-base5,
yamt-pagecache-base4,
netbsd-6-base,
netbsd-6-1-RELEASE,
netbsd-6-1-RC4,
netbsd-6-1-RC3,
netbsd-6-1-RC2,
netbsd-6-1-RC1,
netbsd-6-1-5-RELEASE,
netbsd-6-1-4-RELEASE,
netbsd-6-1-3-RELEASE,
netbsd-6-1-2-RELEASE,
netbsd-6-1-1-RELEASE,
netbsd-6-1,
netbsd-6-0-RELEASE,
netbsd-6-0-RC2,
netbsd-6-0-RC1,
netbsd-6-0-6-RELEASE,
netbsd-6-0-5-RELEASE,
netbsd-6-0-4-RELEASE,
netbsd-6-0-3-RELEASE,
netbsd-6-0-2-RELEASE,
netbsd-6-0-1-RELEASE,
netbsd-6-0,
netbsd-6,
matt-nb6-plus-nbase,
matt-nb6-plus-base,
matt-nb6-plus
Branch point for: tls-maxphys
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +16 -25
lines
Move path names to pathnames.h per conventions
Revision 1.128: download - view: text, markup, annotated - select for diffs
Thu Dec 1 00:26:45 2011 UTC (14 years, 11 months ago) by dholland
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +9 -3
lines
Handle return value from system() properly.
PR 45672 from River Tarnell.
Revision 1.127: download - view: text, markup, annotated - select for diffs
Thu Dec 1 00:15:32 2011 UTC (14 years, 11 months ago) by dholland
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +3 -4
lines
attribute format printf -> __printflike
Revision 1.126: download - view: text, markup, annotated - select for diffs
Tue Jan 4 10:30:21 2011 UTC (15 years, 10 months ago) by wiz
Branches: MAIN
CVS tags: yamt-pagecache-base3,
yamt-pagecache-base2,
yamt-pagecache-base,
cherry-xenmp-base,
cherry-xenmp,
bouyer-quota2-nbase,
bouyer-quota2-base,
bouyer-quota2
Branch point for: yamt-pagecache
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +3 -2
lines
Close masterfd after reading from it. Found by cppcheck.
Revision 1.120.4.1.4.1: download - view: text, markup, annotated - select for diffs
Wed Apr 21 05:27:22 2010 UTC (16 years, 7 months ago) by matt
Branches: matt-nb5-mips64
CVS tags: matt-nb5-mips64-premerge-20101231,
matt-nb5-mips64-k15
Diff to: previous 1.120.4.1: preferred, colored; next MAIN 1.120.4.2: preferred, colored
Changes since revision 1.120.4.1: +4 -4
lines
sync to netbsd-5
Revision 1.125: download - view: text, markup, annotated - select for diffs
Thu Dec 31 19:59:31 2009 UTC (16 years, 10 months ago) by mlelstv
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +189 -133
lines
Add new keyword gid_range to usermgmt.conf which specifies a default
GID range for groupadd(8).
Revision 1.120.4.2: download - view: text, markup, annotated - select for diffs
Fri Oct 16 14:50:41 2009 UTC (17 years, 1 month ago) by sborrill
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE,
netbsd-5-2-RC1,
netbsd-5-2-3-RELEASE,
netbsd-5-2-2-RELEASE,
netbsd-5-2-1-RELEASE,
netbsd-5-2,
netbsd-5-1-RELEASE,
netbsd-5-1-RC4,
netbsd-5-1-RC3,
netbsd-5-1-RC2,
netbsd-5-1-RC1,
netbsd-5-1-5-RELEASE,
netbsd-5-1-4-RELEASE,
netbsd-5-1-3-RELEASE,
netbsd-5-1-2-RELEASE,
netbsd-5-1-1-RELEASE,
netbsd-5-1,
matt-nb5-pq3-base,
matt-nb5-pq3
Diff to: previous 1.120.4.1: preferred, colored; branchpoint 1.120: preferred, colored; next MAIN 1.121: preferred, colored
Changes since revision 1.120.4.1: +4 -4
lines
Pull up the following revisions(s) (requested by hubertf in ticket #1096):
usr.sbin/user/user.c: revision 1.124
Fix -p flag.
- rm_eo is the first character *after* the match, so no need for a +1.
- Blowfish hashes are only 53 chars long, not 54.
Revision 1.124: download - view: text, markup, annotated - select for diffs
Thu Oct 15 23:03:02 2009 UTC (17 years, 1 month ago) by hubertf
Branches: MAIN
CVS tags: matt-premerge-20091211
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +4 -4
lines
Fix -p:
* rm_eo is the first character *after* the match, so no need for a +1
* Blowfish hashes are only 53 chars long, not 54
Revision 1.120.6.1: download - view: text, markup, annotated - select for diffs
Wed May 13 19:20:43 2009 UTC (17 years, 6 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.120: preferred, colored; next MAIN 1.121: preferred, colored
Changes since revision 1.120: +12 -6
lines
Sync with HEAD.
Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
Revision 1.77.2.4: download - view: text, markup, annotated - select for diffs
Thu Mar 26 20:24:27 2009 UTC (17 years, 7 months ago) by bouyer
Branches: netbsd-3
Diff to: previous 1.77.2.3: preferred, colored; branchpoint 1.77: preferred, colored; next MAIN 1.78: preferred, colored
Changes since revision 1.77.2.3: +6 -4
lines
Pull up following revision(s) (requested by mlelstv in ticket #1998):
usr.sbin/user/user.c: revision 1.121 via patch
bin/40994: Michael van Elst: usermod -l change password so user is unable to
login. User getpwnam_r to avoid trashing result of previous call to getpwnam().
Revision 1.123: download - view: text, markup, annotated - select for diffs
Fri Mar 20 02:53:47 2009 UTC (17 years, 8 months ago) by mike
Branches: MAIN
CVS tags: jym-xensuspend-nbase,
jym-xensuspend-base
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +4 -4
lines
Fix check for duplicate gid when '-g =uid' is specified to usermod.
Closes PR bin/40391
Revision 1.122: download - view: text, markup, annotated - select for diffs
Wed Mar 18 04:59:45 2009 UTC (17 years, 8 months ago) by mike
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +6 -2
lines
Do not allow duplicate group id in groupmod unless -o is specified.
Closes PR bin/40393
Revision 1.117.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 16 06:17:05 2009 UTC (17 years, 8 months ago) by snj
Branches: netbsd-4
Diff to: previous 1.117: preferred, colored; next MAIN 1.118: preferred, colored
Changes since revision 1.117: +6 -4
lines
Pull up following revision(s) (requested by mlelstv in ticket #1286):
usr.sbin/user/user.c: revision 1.121
bin/40994: Michael van Elst: usermod -l change password so user is unable to
login. User getpwnam_r to avoid trashing result of previous call to getpwnam().
Revision 1.120.4.1: download - view: text, markup, annotated - select for diffs
Sun Mar 15 20:03:49 2009 UTC (17 years, 8 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-0-RELEASE,
netbsd-5-0-RC4,
netbsd-5-0-RC3,
netbsd-5-0-2-RELEASE,
netbsd-5-0-1-RELEASE,
netbsd-5-0,
matt-nb5-mips64-u2-k2-k4-k7-k8-k9,
matt-nb5-mips64-u1-k1-k5,
matt-nb5-mips64-premerge-20091211,
matt-nb4-mips64-k7-u2a-k9b
Branch point for: matt-nb5-mips64
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +6 -4
lines
Pull up following revision(s) (requested by mlelstv in ticket #562):
usr.sbin/user/user.c: revision 1.121
bin/40994: Michael van Elst: usermod -l change password so user is unable to
login. User getpwnam_r to avoid trashing result of previous call to getpwnam().
Revision 1.121: download - view: text, markup, annotated - select for diffs
Wed Mar 11 14:18:03 2009 UTC (17 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +6 -4
lines
bin/40994: Michael van Elst: usermod -l change password so user is unable to
login. User getpwnam_r to avoid trashing result of previous call to getpwnam().
Revision 1.119.4.1: download - view: text, markup, annotated - select for diffs
Thu Sep 18 04:30:16 2008 UTC (18 years, 2 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.119: preferred, colored; next MAIN 1.120: preferred, colored
Changes since revision 1.119: +4 -4
lines
Sync with wrstuden-revivesa-base-2.
Revision 1.120: download - view: text, markup, annotated - select for diffs
Mon Jul 21 13:37:00 2008 UTC (18 years, 4 months ago) by lukem
Branches: MAIN
CVS tags: wrstuden-revivesa-base-3,
wrstuden-revivesa-base-2,
netbsd-5-base,
netbsd-5-0-RC2,
netbsd-5-0-RC1,
matt-mips64-base2
Branch point for: netbsd-5,
jym-xensuspend
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +4 -4
lines
Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
Revision 1.118.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 24 07:16:36 2008 UTC (18 years, 7 months ago) by keiichi
Branches: keiichi-mipv6
Diff to: previous 1.118: preferred, colored; next MAIN 1.119: preferred, colored
Changes since revision 1.118: +4 -7
lines
sync with head.
Revision 1.117.8.1: download - view: text, markup, annotated - select for diffs
Sun Mar 23 00:50:08 2008 UTC (18 years, 7 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.117: preferred, colored; next MAIN 1.118: preferred, colored
Changes since revision 1.117: +4 -8
lines
sync with HEAD
Revision 1.119: download - view: text, markup, annotated - select for diffs
Wed Feb 27 19:12:56 2008 UTC (18 years, 8 months ago) by reed
Branches: MAIN
CVS tags: yamt-pf42-baseX,
yamt-pf42-base4,
yamt-pf42-base3,
yamt-pf42-base2,
yamt-pf42-base,
yamt-pf42,
wrstuden-revivesa-base-1,
wrstuden-revivesa-base,
matt-armv6-nbase,
keiichi-mipv6-nbase,
keiichi-mipv6-base,
hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +4 -7
lines
Remove the -v verbose switch from userinfo. It was not used.
Also remove reference to usermgmt.conf from userinfo manpage.
Discussed on tech-userlevel.
Revision 1.118: download - view: text, markup, annotated - select for diffs
Mon Feb 4 01:28:20 2008 UTC (18 years, 9 months ago) by hubertf
Branches: MAIN
CVS tags: hpcarm-cleanup-base
Branch point for: keiichi-mipv6
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +2 -3
lines
disclaim copyright
Revision 1.117: download - view: text, markup, annotated - select for diffs
Thu Nov 2 21:42:08 2006 UTC (20 years ago) by pavel
Branches: MAIN
CVS tags: wrstuden-fixsa-newbase,
wrstuden-fixsa-base-1,
wrstuden-fixsa-base,
wrstuden-fixsa,
netbsd-4-base,
netbsd-4-0-RELEASE,
netbsd-4-0-RC5,
netbsd-4-0-RC4,
netbsd-4-0-RC3,
netbsd-4-0-RC2,
netbsd-4-0-RC1,
netbsd-4-0-1-RELEASE,
netbsd-4-0,
matt-mips64-base,
matt-mips64,
matt-armv6-prevmlocking,
matt-armv6-base,
hpcarm-cleanup,
cube-autoconf-base,
cube-autoconf
Branch point for: netbsd-4,
matt-armv6
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +3 -3
lines
Change the default shell to /bin/sh. It has most of the usability
advantages of our ksh (emacs line editing). There were objections against
using ksh, because our (pd)ksh is not the real ksh. See also the
discussion on tech-userlevel.
Motivation for changing the default from csh is better interactive
usability and desire to use a standard shell, which is already used for
all the system shell scripts.
Approved by core.
Revision 1.77.2.3.2.1: download - view: text, markup, annotated - select for diffs
Mon Oct 16 21:46:06 2006 UTC (20 years, 1 month ago) by ghen
Branches: netbsd-3-0
CVS tags: netbsd-3-0-3-RELEASE,
netbsd-3-0-2-RELEASE
Diff to: previous 1.77.2.3: preferred, colored; next MAIN 1.77.2.4: preferred, colored
Changes since revision 1.77.2.3: +1 -0
lines
Pull up following revision(s) (requested by pavel in ticket #1554):
usr.sbin/user/user.c: revision 1.112
in userinfo, initialize buf (the buffer which will hold group names)
to be a null-terminated string. Otherwise, if the user is not a member
of any secondary groups, buf is completely uninitialized and userinfo
adds garbage to the list of groups printed.
Revision 1.75.4.1.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 15 15:54:10 2006 UTC (20 years, 1 month ago) by bouyer
Branches: netbsd-2-1
Diff to: previous 1.75.4.1: preferred, colored; next MAIN 1.75.4.2: preferred, colored
Changes since revision 1.75.4.1: +3 -2
lines
Pull up following revision(s) (requested by pavel in ticket #10718):
usr.sbin/user/user.c: revision 1.112
in userinfo, initialize buf (the buffer which will hold group names)
to be a null-terminated string. Otherwise, if the user is not a member
of any secondary groups, buf is completely uninitialized and userinfo
adds garbage to the list of groups printed.
Revision 1.75.2.2: download - view: text, markup, annotated - select for diffs
Sun Oct 15 15:53:31 2006 UTC (20 years, 1 month ago) by bouyer
Branches: netbsd-2-0
Diff to: previous 1.75.2.1: preferred, colored; branchpoint 1.75: preferred, colored; next MAIN 1.76: preferred, colored
Changes since revision 1.75.2.1: +3 -2
lines
Pull up following revision(s) (requested by pavel in ticket #10718):
usr.sbin/user/user.c: revision 1.112
in userinfo, initialize buf (the buffer which will hold group names)
to be a null-terminated string. Otherwise, if the user is not a member
of any secondary groups, buf is completely uninitialized and userinfo
adds garbage to the list of groups printed.
Revision 1.75.4.2: download - view: text, markup, annotated - select for diffs
Sun Oct 15 15:52:26 2006 UTC (20 years, 1 month ago) by bouyer
Branches: netbsd-2
Diff to: previous 1.75.4.1: preferred, colored; branchpoint 1.75: preferred, colored; next MAIN 1.76: preferred, colored
Changes since revision 1.75.4.1: +3 -2
lines
Pull up following revision(s) (requested by pavel in ticket #10718):
usr.sbin/user/user.c: revision 1.112
in userinfo, initialize buf (the buffer which will hold group names)
to be a null-terminated string. Otherwise, if the user is not a member
of any secondary groups, buf is completely uninitialized and userinfo
adds garbage to the list of groups printed.
Revision 1.116: download - view: text, markup, annotated - select for diffs
Fri Oct 13 20:43:31 2006 UTC (20 years, 1 month ago) by wiz
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +7 -7
lines
Sort options in usage.
Revision 1.115: download - view: text, markup, annotated - select for diffs
Sat Oct 7 09:20:07 2006 UTC (20 years, 1 month ago) by elad
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +33 -7
lines
PR/30351: Hubert Feyrer: useradd(8) doesn't allow setting permissions of
new home [patch]
Adapted to current code and some nits from myself. Thanks for the patch!
Revision 1.114: download - view: text, markup, annotated - select for diffs
Sat Sep 30 11:47:00 2006 UTC (20 years, 1 month ago) by pavel
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +3 -3
lines
revert change of default shell, reguested by agc@.
Revision 1.113: download - view: text, markup, annotated - select for diffs
Sat Sep 30 10:50:32 2006 UTC (20 years, 1 month ago) by pavel
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +3 -3
lines
Change the default shell to /bin/ksh, which is our best interactive
shell at the moment. Proposed on tech-userlevel and approved by hubertf@.
Revision 1.112: download - view: text, markup, annotated - select for diffs
Sat Sep 30 10:44:55 2006 UTC (20 years, 1 month ago) by pavel
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +3 -2
lines
in userinfo, initialize buf (the buffer which will hold group names)
to be a null-terminated string. Otherwise, if the user is not a member
of any secondary groups, buf is completely uninitialized and userinfo
adds garbage to the list of groups printed.
Revision 1.111: download - view: text, markup, annotated - select for diffs
Tue Jun 27 12:39:23 2006 UTC (20 years, 4 months ago) by christos
Branches: MAIN
CVS tags: abandoned-netbsd-4-base,
abandoned-netbsd-4
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +4 -8
lines
use realloc instead of free+calloc
Revision 1.110: download - view: text, markup, annotated - select for diffs
Fri Jun 2 21:44:37 2006 UTC (20 years, 5 months ago) by jnemeth
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +3 -3
lines
try again with the Coverity annotation
Revision 1.109: download - view: text, markup, annotated - select for diffs
Sat May 27 03:41:48 2006 UTC (20 years, 5 months ago) by jnemeth
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +6 -2
lines
Coverity annotation -- although memsave free()s its first argument, it
will allocate memory and assign it to its first argument, so it is neutral
Coverity CID 3229: memory leak -- failed to fclose() master in moduser()
Coverity CID 3228: memory leak -- failed to free() newname in groupmod()
Revision 1.108: download - view: text, markup, annotated - select for diffs
Wed Mar 22 18:02:46 2006 UTC (20 years, 8 months ago) by joerg
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +3 -4
lines
Garbage collect cc in moduser, it is only set once, but never read as
noticed by lint.
Revision 1.107: download - view: text, markup, annotated - select for diffs
Wed Mar 22 18:01:11 2006 UTC (20 years, 8 months ago) by joerg
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +6 -2
lines
Don't leak FILEs when flock fails. Found by Coverity (CID 1776, 1777 and
1778). Patch by Liam J. Foy, which handles one more case.
Revision 1.106: download - view: text, markup, annotated - select for diffs
Fri Mar 17 14:20:10 2006 UTC (20 years, 8 months ago) by dmcmahill
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +5 -5
lines
put the array bounds check _before_ accessing the array.
Coverity CID: 1479
Revision 1.105: download - view: text, markup, annotated - select for diffs
Fri Mar 17 14:14:45 2006 UTC (20 years, 8 months ago) by dmcmahill
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +4 -4
lines
put the array bounds check _before_ accessing the array.
Coverity CID: 1480
Revision 1.104: download - view: text, markup, annotated - select for diffs
Thu Feb 23 22:45:25 2006 UTC (20 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +16 -11
lines
By popular demand don't bail out if a user's shell is not in /etc/shells.
Issue a warning instead.
Revision 1.103: download - view: text, markup, annotated - select for diffs
Thu Jan 26 17:24:52 2006 UTC (20 years, 9 months ago) by jmmv
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +3 -3
lines
Add a missing space in the usage message.
Revision 1.102: download - view: text, markup, annotated - select for diffs
Sat Jan 14 22:00:52 2006 UTC (20 years, 10 months ago) by agc
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +12 -6
lines
Use a CPP definition for "/sbin/nologin" - it's at the top of the
file.
Modify the logic in the previous but one commit - /sbin/nologin should
be considered a valid user shell, since otherwise, with the addition
of the checks for a valid user shell, useradd with a shell of
/sbin/nologin will fail.
Modify some of the code here to conform to the standards in the rest
of this file.
Revision 1.101: download - view: text, markup, annotated - select for diffs
Fri Jan 13 16:36:33 2006 UTC (20 years, 10 months ago) by elad
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +3 -3
lines
Add forgotten ')'.
Revision 1.100: download - view: text, markup, annotated - select for diffs
Fri Jan 13 13:43:23 2006 UTC (20 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +5 -2
lines
treat /sbin/nologin specially.
Revision 1.99: download - view: text, markup, annotated - select for diffs
Fri Jan 6 18:11:00 2006 UTC (20 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +44 -3
lines
Add checks for valid shell. From Liam Foy.
Revision 1.98: download - view: text, markup, annotated - select for diffs
Fri Nov 25 08:00:18 2005 UTC (20 years, 11 months ago) by agc
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +3 -6
lines
Be pragmatic - move user(8) to a 3-clause BSD licence.
Revision 1.97: download - view: text, markup, annotated - select for diffs
Mon Nov 7 21:58:12 2005 UTC (21 years ago) by christos
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +2 -88
lines
remove asprintf and strlcpy. We don't support NetBSD1.3 and NetBSD1.4.
GC Todd's copyright, since it is not needed anymore.
Revision 1.96: download - view: text, markup, annotated - select for diffs
Mon Nov 7 21:46:50 2005 UTC (21 years ago) by christos
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +203 -156
lines
More cleanups from Liam Foy:
- Fix error messages, some are completely incorrect
- Asystem prints the error message so don't bother saving errno
- Don't continue if a lock can't be obtained on /etc/group
- Just pass struct passwd * to removehomedir, not its members
Some copyright maintenance:
- Add Liam Foy.
- Move Todd's copyright higher up.
XXX: We should remove clause 3 and merge the two copyright groups.
Revision 1.95: download - view: text, markup, annotated - select for diffs
Wed Oct 5 21:17:53 2005 UTC (21 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +6 -2
lines
call pw_abort() on failure (from Liam Foy)
Revision 1.94: download - view: text, markup, annotated - select for diffs
Mon Sep 19 00:43:17 2005 UTC (21 years, 2 months ago) by rpaulo
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +15 -14
lines
PR 22469: user.c should use "pwd.h" include file for
_PATH_USERMGMT_CONF. By rpixley@vm-netbsd-161.nominum.com.
Revision 1.93: download - view: text, markup, annotated - select for diffs
Sun Sep 18 21:41:26 2005 UTC (21 years, 2 months ago) by agc
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +43 -33
lines
Ensure that a consistent coding style is used.
s/1/EXIT_FAILURE/
Revision 1.92: download - view: text, markup, annotated - select for diffs
Sun Sep 18 14:15:53 2005 UTC (21 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +10 -10
lines
From Liam Foy:
- Correct lenght for the username
- First character in the login name cannot be '-' (OpenBSD)
- Remove some #ifdef EXTENSIONS. find_group_info is always needed
- When printing change, if it's -1, place a correct string.
Revision 1.91: download - view: text, markup, annotated - select for diffs
Mon Sep 12 15:45:03 2005 UTC (21 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +30 -7
lines
Warn if the group being removed is still the primary group of an existing
user. From Liam Foy.
Revision 1.90: download - view: text, markup, annotated - select for diffs
Fri Sep 9 22:04:09 2005 UTC (21 years, 2 months ago) by wiz
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +6 -6
lines
Sync group* usages with man pages.
Revision 1.89: download - view: text, markup, annotated - select for diffs
Fri Sep 9 21:48:10 2005 UTC (21 years, 2 months ago) by wiz
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +24 -17
lines
Sync user* usage with man pages. Bonus grammar fix in comment.
Revision 1.88: download - view: text, markup, annotated - select for diffs
Fri Aug 12 21:40:35 2005 UTC (21 years, 3 months ago) by he
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +12 -4
lines
Check the return value from mktime() and pass any error up.
*tp > LONG_MAX is never true, so replace that check with a test
for strtol() setting errno == ERANGE (oddly, some ports' build
swallowed this without warning).
There's no guarantee that a time_t stores the same number of bits
as a long, so check for an overflow there as well, and pass any
error up.
Discussed with christos, martin and mrg.
Revision 1.87: download - view: text, markup, annotated - select for diffs
Fri Aug 12 16:22:05 2005 UTC (21 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +35 -14
lines
patch from Liam Foy to add a -F option to force a user to change her's/his
password at the next login.
Revision 1.86: download - view: text, markup, annotated - select for diffs
Sat Jul 30 15:06:43 2005 UTC (21 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +7 -6
lines
The language lawyers claim that it is invalid to test a freed pointer, so
don't!
Revision 1.85: download - view: text, markup, annotated - select for diffs
Sat Jul 30 14:35:23 2005 UTC (21 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +5 -3
lines
If the class was not specified, don't print a warning.
Revision 1.84: download - view: text, markup, annotated - select for diffs
Fri Jul 29 18:16:21 2005 UTC (21 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +7 -4
lines
Don't make it fatal if the login class doe not exist. From Jukka Salmi.
Revision 1.83: download - view: text, markup, annotated - select for diffs
Wed Jul 27 23:32:02 2005 UTC (21 years, 3 months ago) by peter
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +5 -5
lines
Minor tweaks to the usage message:
- better layout for useradd.
- fix a small mistake in -u and wrap long line.
Revision 1.82: download - view: text, markup, annotated - select for diffs
Wed Jul 27 19:08:42 2005 UTC (21 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +568 -394
lines
Patches from Liam Foy:
- Add new -C option to 'usermod'. This allows a quick way to temporary
lock a users account. This is similar to how FreeBSD do it using
'adduser'. This function can be very handy to administrators!
- Import a function to check if the inputted class actually exists. It
contains my modifications to test whether /etc/login.conf exists
in the first place. -OpenBSD
While I am there:
- KNF (long wrapped lines, and spaces after void casts).
- Factor out some common code.
- Fix error messages.
1. Consistently capitalize them.
2. Fix err->errx and warn->warnx inappropriate uses.
3. Use regerror where appropriate.
4. Don't call warn()/err() to report errors after you trashed errno
by calling other syscalls. Save and restore the errno instead,
or in the warn() case, call warn() first.
- Fix size_t - int, uid_t - int confusion.
- Pass lint
Revision 1.81: download - view: text, markup, annotated - select for diffs
Wed Jul 20 21:42:58 2005 UTC (21 years, 4 months ago) by agc
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +18 -16
lines
Commit changes from Liam J. Foy:
- system(), rmdir() sets errno, use it
- Use warnx() if strchr failed, not warn()
- Constify some arguments
- Fix cases when errx()/warnx() should be used instead of err()/warn()
due to errno not being set.
Group code:
------------
- List members in a neat fashion, separated by commas
- groupmod(): Use find_group_info - consistency
Revision 1.75.2.1: download - view: text, markup, annotated - select for diffs
Tue Jul 5 19:06:57 2005 UTC (21 years, 4 months ago) by riz
Branches: netbsd-2-0
CVS tags: netbsd-2-0-3-RELEASE
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +6 -3
lines
Pull up revision 1.80 (requested by agc in ticket #2024):
Be consistent when deleting a non-existent group - tell if the group is
non-existent.
Problem noted by Geert Hendrickx, fix from Liam J. Foy.
Revision 1.75.4.1: download - view: text, markup, annotated - select for diffs
Tue Jul 5 19:03:56 2005 UTC (21 years, 4 months ago) by riz
Branches: netbsd-2
CVS tags: netbsd-2-1-RELEASE,
netbsd-2-1-RC6,
netbsd-2-1-RC5,
netbsd-2-1-RC4,
netbsd-2-1-RC3,
netbsd-2-1-RC2,
netbsd-2-1-RC1
Branch point for: netbsd-2-1
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +6 -3
lines
Pull up revision 1.80 (requested by agc in ticket #2024):
Be consistent when deleting a non-existent group - tell if the group is
non-existent.
Problem noted by Geert Hendrickx, fix from Liam J. Foy.
Revision 1.77.2.3: download - view: text, markup, annotated - select for diffs
Wed Jun 29 12:18:49 2005 UTC (21 years, 4 months ago) by tron
Branches: netbsd-3
CVS tags: netbsd-3-1-RELEASE,
netbsd-3-1-RC4,
netbsd-3-1-RC3,
netbsd-3-1-RC2,
netbsd-3-1-RC1,
netbsd-3-1-1-RELEASE,
netbsd-3-1,
netbsd-3-0-RELEASE,
netbsd-3-0-RC6,
netbsd-3-0-RC5,
netbsd-3-0-RC4,
netbsd-3-0-RC3,
netbsd-3-0-RC2,
netbsd-3-0-RC1,
netbsd-3-0-1-RELEASE
Branch point for: netbsd-3-0
Diff to: previous 1.77.2.2: preferred, colored; branchpoint 1.77: preferred, colored
Changes since revision 1.77.2.2: +6 -3
lines
Pull up revision 1.80 (requested by agc in ticket #492):
Be consistent when deleting a non-existent group - tell if the group is
non-existent.
Problem noted by Geert Hendrickx, fix from Liam J. Foy.
Revision 1.80: download - view: text, markup, annotated - select for diffs
Tue Jun 14 18:29:58 2005 UTC (21 years, 5 months ago) by agc
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +6 -3
lines
Be consistent when deleting a non-existent group - tell if the group is
non-existent.
Problem noted by Geert Hendrickx, fix from Liam J. Foy.
Revision 1.77.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 13 15:59:37 2005 UTC (21 years, 7 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.77.2.1: preferred, colored; branchpoint 1.77: preferred, colored
Changes since revision 1.77.2.1: +7 -4
lines
Pull up revision 1.79 (requested by peter in ticket #136):
Do some Common Subexpression Elimination when testing for valid characters
in login and group names.
Revision 1.77.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 13 15:58:51 2005 UTC (21 years, 7 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +3 -3
lines
Pull up revision 1.78 (requested by peter in ticket #136):
Allow '_', '.' and '-' in group names, like in login names.
Fixes problem with groupadd(8) for _pflogd; pointed out by Jukka Salmi.
Approved by christos.
Revision 1.79: download - view: text, markup, annotated - select for diffs
Tue Apr 5 22:54:26 2005 UTC (21 years, 7 months ago) by agc
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +7 -4
lines
Do some Common Subexpression Elimination when testing for valid characters
in login and group names.
Revision 1.78: download - view: text, markup, annotated - select for diffs
Tue Apr 5 22:03:57 2005 UTC (21 years, 7 months ago) by peter
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +3 -3
lines
Allow '_', '.' and '-' in group names, like in login names.
Fixes problem with groupadd(8) for _pflogd; pointed out by Jukka Salmi.
Approved by christos.
Revision 1.77: download - view: text, markup, annotated - select for diffs
Sat Feb 5 10:43:14 2005 UTC (21 years, 9 months ago) by jmmv
Branches: MAIN
CVS tags: netbsd-3-base
Branch point for: netbsd-3
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +15 -6
lines
Add the -r flag to groupadd; it can be used to specify a gid range in which
new groups should be created. This is similar to useradd's -r flag.
Closes my own PR bin/22791. Patch by URA Hiroshi with some minor changes
by me.
No objections in tech-userlevel@ for multiple days.
Revision 1.76: download - view: text, markup, annotated - select for diffs
Fri Jul 2 12:01:00 2004 UTC (22 years, 4 months ago) by agc
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +3 -2
lines
Now that we have SHA1 passwords, modify useradd(8) so that it will accept
an encrypted SHA1 password on the command line.
Revision 1.75: download - view: text, markup, annotated - select for diffs
Wed Jan 14 09:35:33 2004 UTC (22 years, 10 months ago) by agc
Branches: MAIN
CVS tags: netbsd-2-base,
netbsd-2-0-base,
netbsd-2-0-RELEASE,
netbsd-2-0-RC5,
netbsd-2-0-RC4,
netbsd-2-0-RC3,
netbsd-2-0-RC2,
netbsd-2-0-RC1,
netbsd-2-0-2-RELEASE,
netbsd-2-0-1-RELEASE
Branch point for: netbsd-2-0,
netbsd-2
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +38 -22
lines
Add -S argument to useradd, usermod and userdel, which allows the use of
a trailing '$' character in user names.
Requested in PR 23922 by Takahiro Kambe.
Also, fix a bug in the previous fix to usermod.
Revision 1.74: download - view: text, markup, annotated - select for diffs
Wed Jan 14 08:25:30 2004 UTC (22 years, 10 months ago) by agc
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +18 -16
lines
Fixes from Todd Miller in PR 24070.
Revert fgetln/asprintf changes from rev 1.26 - fgetln(3) does not return
a NUL-terminated string, so using strchr(3) is inappropriate. As the entry
from the password file is a known size, there's no need to use fgetln(3),
just use fgets(3) for consistency. This also means that an inappropriate
cast to int from asprintf(3) is unneeded, which was apparently causing
problems on OpenBSD's sparc64 port - just be consistent and use snprintf(3).
Revision 1.73: download - view: text, markup, annotated - select for diffs
Mon Jan 5 23:23:39 2004 UTC (22 years, 10 months ago) by jmmv
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +13 -13
lines
Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
Revision 1.72: download - view: text, markup, annotated - select for diffs
Tue Oct 21 06:34:26 2003 UTC (23 years, 1 month ago) by agc
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +3 -3
lines
Tidy up the previous isdigit(3) boolean check.
Revision 1.71: download - view: text, markup, annotated - select for diffs
Tue Oct 21 02:58:50 2003 UTC (23 years, 1 month ago) by fvdl
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +3 -3
lines
Don't compare an int to NULL.
Revision 1.51.2.5: download - view: text, markup, annotated - select for diffs
Mon Oct 20 07:30:49 2003 UTC (23 years, 1 month ago) by jmc
Branches: netbsd-1-6
CVS tags: netbsd-1-6-PATCH002-RELEASE,
netbsd-1-6-PATCH002-RC4,
netbsd-1-6-PATCH002-RC3,
netbsd-1-6-PATCH002-RC2,
netbsd-1-6-PATCH002-RC1,
netbsd-1-6-PATCH002
Diff to: previous 1.51.2.4: preferred, colored; branchpoint 1.51: preferred, colored; next MAIN 1.52: preferred, colored
Changes since revision 1.51.2.4: +185 -104
lines
Pullup diffs between revision: 1.51.2.4 and 1.70.
Numerous bug fixes, blowfish password support.
(requested by agc in ticket #1147)
Revision 1.70: download - view: text, markup, annotated - select for diffs
Thu Jun 12 17:00:53 2003 UTC (23 years, 5 months ago) by agc
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +11 -10
lines
Some patches from Todd C. Miller:
1. Use REG_NEWLINE, rather than matching "\n".
2. Fix a bug where rm_user_from_groups would mangle group entries in
/etc/group when the user to be removed is the only member of the group,
by using substring matches.
Revision 1.69: download - view: text, markup, annotated - select for diffs
Mon Apr 14 17:40:07 2003 UTC (23 years, 7 months ago) by agc
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +26 -18
lines
The "default" case usually occurs at the end of all other options, so change
it to follow convention.
Add /* NOTREACHED */ comments, per share/misc/style.
Revision 1.68: download - view: text, markup, annotated - select for diffs
Mon Apr 14 09:49:15 2003 UTC (23 years, 7 months ago) by dsl
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +18 -2
lines
Report usage() if getopt() returns '?'
Partial fix for bin/21146
Revision 1.67: download - view: text, markup, annotated - select for diffs
Fri Mar 14 16:56:39 2003 UTC (23 years, 8 months ago) by jrf
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +8 -8
lines
This addresses PR 20156. isalnum(), isdigit() and isspace() are used with
char as a parameter. On platforms with char signed by default, those are wrong.
Thanks to Christian Biere christianbiere@gmx.de for the patch he supplied.
I tested the patch and agc approved it for commit.
Revision 1.66: download - view: text, markup, annotated - select for diffs
Mon Feb 3 12:20:46 2003 UTC (23 years, 9 months ago) by agc
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +5 -2
lines
Add a check for the length of the login name given by the user.
Provided by Ben Collver in PR 20154
Revision 1.51.2.4: download - view: text, markup, annotated - select for diffs
Thu Dec 26 07:37:50 2002 UTC (23 years, 10 months ago) by tron
Branches: netbsd-1-6
CVS tags: netbsd-1-6-PATCH001-RELEASE,
netbsd-1-6-PATCH001-RC3,
netbsd-1-6-PATCH001-RC2,
netbsd-1-6-PATCH001-RC1,
netbsd-1-6-PATCH001
Diff to: previous 1.51.2.3: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.3: +110 -28
lines
Pull up revision 1.53 (requested by he in ticket #1041):
Remove user from supplementary groups when deleting a user and not
preserving information.
Remove BUGS section from userdel(8) accordingly.
Make this utility compile with WARNS=3 - add const-poisoning and
shadow variable name resolution.
Revision 1.51.2.3: download - view: text, markup, annotated - select for diffs
Thu Dec 26 07:28:50 2002 UTC (23 years, 10 months ago) by tron
Branches: netbsd-1-6
Diff to: previous 1.51.2.2: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.2: +50 -10
lines
Pull up revision 1.61-1.62 (requested by he in ticket #1041):
Handle PR 18474 in a more safe and scalable fashion - keep a table of
password types, and their associated lengths, and check in useradd or
usermod whether the given encrypted password has the correct length.
This removes the (duplicated) hardcoded lengths which had crept in
with the last commit, and also checks the length of the given password
against the expected length.
Revision 1.51.2.2: download - view: text, markup, annotated - select for diffs
Fri Dec 6 23:40:26 2002 UTC (23 years, 11 months ago) by he
Branches: netbsd-1-6
Diff to: previous 1.51.2.1: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.1: +18 -11
lines
Pull up revision 1.60 (via patch, requested by itojun in ticket #882):
Support MD5 and blowfish password encryption. Fixes
PR#18474.
Revision 1.65: download - view: text, markup, annotated - select for diffs
Fri Nov 8 11:53:20 2002 UTC (24 years ago) by agc
Branches: MAIN
CVS tags: fvdl_fs64_base
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +9 -7
lines
When deleting a user with preservation, use a password of
"*************" rather than a single asterisk - it's just as difficult
to hash to the longer password since the asterisk character itself is
not in its alphabet, and pwd_mkdb now thinks it's a valid DES password.
Revision 1.64: download - view: text, markup, annotated - select for diffs
Fri Nov 8 11:44:37 2002 UTC (24 years ago) by agc
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +41 -55
lines
Factor out some common code.
Revision 1.63: download - view: text, markup, annotated - select for diffs
Tue Oct 1 02:50:51 2002 UTC (24 years, 1 month ago) by itojun
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +3 -3
lines
valid_password_length() is a boolean function, so there's no point in
having "> 0" in if clause.
Revision 1.62: download - view: text, markup, annotated - select for diffs
Mon Sep 30 14:15:47 2002 UTC (24 years, 1 month ago) by agc
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +30 -20
lines
Update previous to reflect reality. For blowfish passwords, the salt
can be a variable length field, so check the (fixed length) password
length, rather then the length of the whole password+salt+cipher.
Use a cipher type of "$2a" for blowfish.
Revision 1.61: download - view: text, markup, annotated - select for diffs
Mon Sep 30 10:32:40 2002 UTC (24 years, 1 month ago) by agc
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +39 -9
lines
Handle PR 18474 in a more safe and scalable fashion - keep a table of
password types, and their associated lengths, and check in useradd or
usermod whether the given encrypted password has the correct length.
This removes the (duplicated) hardcoded lengths which had crept in
with the last commit, and also checks the length of the given password
against the expected length.
Revision 1.60: download - view: text, markup, annotated - select for diffs
Mon Sep 30 04:05:22 2002 UTC (24 years, 1 month ago) by itojun
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +16 -10
lines
support MD5/blowfish password. PR 18474.
Revision 1.59: download - view: text, markup, annotated - select for diffs
Tue Aug 27 12:38:02 2002 UTC (24 years, 2 months ago) by agc
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +27 -3
lines
Use syslog(3) to log new users and groups, deletions of users and groups,
and modification of user and group information.
Syslog priority is LOG_INFO, facility is LOG_USER (there is no need to
do this via LOG_AUTH, since the password and group files are world
readable).
Suggested by Hubert Feyrer, after a similar facility in Linux.
Revision 1.58: download - view: text, markup, annotated - select for diffs
Tue Aug 27 11:25:29 2002 UTC (24 years, 2 months ago) by agc
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +11 -8
lines
Generalise the function which checks if a user is local to work for groups
as well.
Use the new function when modifying a group's information.
Revision 1.57: download - view: text, markup, annotated - select for diffs
Wed Aug 7 14:24:52 2002 UTC (24 years, 3 months ago) by wiz
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +6 -5
lines
Set the default password (if not specified) to a single star instead
of PasswordLength stars.
Revision 1.56: download - view: text, markup, annotated - select for diffs
Tue Aug 6 11:56:26 2002 UTC (24 years, 3 months ago) by agc
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +67 -32
lines
Add a function is_local_user(), and use it in moduser(), to check that
the user is not found through NIS.
Completes fix of PR 17849, from Grant Beattie (grant@netbsd.org).
Also, don't cast return type of pw_abort(3) to void, as it already is void.
Revision 1.55: download - view: text, markup, annotated - select for diffs
Tue Aug 6 09:03:55 2002 UTC (24 years, 3 months ago) by agc
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +5 -2
lines
Remove the /etc/ptmp file via pw_abort(3) if the pw_mkdb(3) call fails.
Addresses part of PR 17849 from Grant Beattie, grant@netbsd.org.
Revision 1.54: download - view: text, markup, annotated - select for diffs
Sat Jul 20 08:40:21 2002 UTC (24 years, 4 months ago) by grant
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +2 -2
lines
sweep of errx/warnx, remove unnecessary trailing \n
Revision 1.53: download - view: text, markup, annotated - select for diffs
Mon Jul 8 22:17:47 2002 UTC (24 years, 4 months ago) by agc
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +112 -30
lines
Remove user from supplementary groups when deleting a user and not
preserving information.
Remove BUGS section from userdel(8) accordingly.
Make this utility compile with WARNS=3 - add const-poisoning and
shadow variable name resolution.
Revision 1.20.4.9: download - view: text, markup, annotated - select for diffs
Wed Jun 26 17:20:11 2002 UTC (24 years, 4 months ago) by he
Branches: netbsd-1-5
CVS tags: netbsd-1-5-PATCH003
Diff to: previous 1.20.4.8: preferred, colored; branchpoint 1.20: preferred, colored; next MAIN 1.21: preferred, colored
Changes since revision 1.20.4.8: +225 -72
lines
Pull up revisions 1.38-1.52 (requested by grant):
Synchronize with recent developments:
o add usermgmt.conf manual page
o accept "month day year" for -e and -f option arguments of ``user''
o support multiple uid ranges
o fix skeleton directory changes
o improve error handling
o fix varargs usage
Revision 1.51.2.1: download - view: text, markup, annotated - select for diffs
Tue Jun 4 12:10:18 2002 UTC (24 years, 5 months ago) by lukem
Branches: netbsd-1-6
CVS tags: netbsd-1-6-RELEASE,
netbsd-1-6-RC3,
netbsd-1-6-RC2,
netbsd-1-6-RC1
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +66 -21
lines
Pull up revision 1.52 (requested by grant in ticket #134):
add usermgmt.conf man page.
user -e and -f now accepts "month day year" (ala chpass(1)) and
seconds-since-epoch.
correct man pages accordingly.
Revision 1.52: download - view: text, markup, annotated - select for diffs
Sat Jun 1 06:28:06 2002 UTC (24 years, 5 months ago) by grant
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +66 -21
lines
add usermgmt.conf man page.
user -e and -f now accepts "month day year" (ala chpass(1)) and
seconds-since-epoch.
correct man pages accordingly.
Revision 1.51: download - view: text, markup, annotated - select for diffs
Fri May 3 10:31:14 2002 UTC (24 years, 6 months ago) by agc
Branches: MAIN
CVS tags: netbsd-1-6-base
Branch point for: netbsd-1-6
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +21 -9
lines
Handle multiple ranges on the command line and in the defaults file,
based on some code from Todd C. Miller, which in turn was based on a
patch from Brian Poole <raj@cerias.purdue.edu>.
Look first in any uid ranges specified on the command line, in the order
they were given on the command line, and then in any ranges specified in
the defaults file.
With thanks to Brian for nudging me a number of times to fix this.
Revision 1.50: download - view: text, markup, annotated - select for diffs
Fri May 3 10:11:16 2002 UTC (24 years, 6 months ago) by agc
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +3 -2
lines
Fix for skeleton directory changes to defaults file from Brian Poole
<raj@cerias.purdue.edu>
Previous behaviour as follows:
# useradd -D -k /foo/bar
group users
base_dir /home
skel_dir /foo/bar
shell /bin/csh
class
inactive 0
expire Null (unset)
range 10200..10300
range 10600..10700
# useradd -D
group users
base_dir /home
skel_dir /etc/skel
shell /bin/csh
class
inactive 0
expire Null (unset)
range 10200..10300
range 10600..10700
Revision 1.49: download - view: text, markup, annotated - select for diffs
Fri May 3 10:05:28 2002 UTC (24 years, 6 months ago) by agc
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +4 -3
lines
Fix from Brian Poole <raj@cerias.purdue.edu> for improper handling of
UID ranges. Previous behaviour is demonstrated below...
# useradd -D
group users
base_dir /home
skel_dir /etc/skel
shell /bin/csh
class
inactive 0
expire Null (unset)
range 10200..10300
# useradd -D -r 10200..10300 -r 10400..10500
# useradd -D
group users
base_dir /home
skel_dir /etc/skel
shell /bin/csh
class
inactive 0
expire Null (unset)
range 10400..10500
The second command should have put 2 ranges back into the config file,
but it really only put one because the first range on the command line
was marked as a duplicate (but when it got to writing the config file,
it only wrote command line ranges, so the 10200 got skipped). Fix
this by initializing defrc to 0 and then only looking after defrc for
duplicate ranges.
Revision 1.48: download - view: text, markup, annotated - select for diffs
Fri May 3 08:07:02 2002 UTC (24 years, 6 months ago) by agc
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +6 -3
lines
Modifications from Brian Poole <raj@cerias.purdue.edu>, via OpenBSD:
+ if the cd built-in fails, don't try to copy the directory hierarchy
with pax - s/;/&&/ in a shell command
+ clean up after ourselves if a rename fails - remove the newly-created
group file.
Revision 1.47: download - view: text, markup, annotated - select for diffs
Sun Mar 31 21:31:10 2002 UTC (24 years, 7 months ago) by agc
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +6 -5
lines
Do the previous differently. Run through the possible ranges for uids in
the command line order, then check the default range after that, if none
has yet been found.
Prompted by Brian Poole <raj@cerias.purdue.edu>.
Revision 1.46: download - view: text, markup, annotated - select for diffs
Tue Feb 5 19:18:29 2002 UTC (24 years, 9 months ago) by agc
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +4 -3
lines
Search uid ranges properly, using command line ranges if provided, and
using the default range last.
Problem reported by Cillian Sharkey <cns@redbrick.dcu.ie>
Revision 1.45: download - view: text, markup, annotated - select for diffs
Mon Oct 22 11:00:05 2001 UTC (25 years, 1 month ago) by agc
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +18 -6
lines
+ add backwards compatibility hook for old pw_mkdb() calls with no args
+ remove some unused code in a comment.
+ add F_SHELL flag in userdel
+ use a separate local declaration for a temporary variable, rather
than overloading a variable that's used for something else.
Revision 1.44: download - view: text, markup, annotated - select for diffs
Mon Sep 24 13:22:39 2001 UTC (25 years, 1 month ago) by wiz
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +4 -4
lines
va_{start,end} audit:
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
If the va_list is used multiple times, do multiple va_starts/va_ends.
If a function gets va_list as argument, don't let it use va_end (since
it's the callers responsibility).
Improved by comments from enami and christos -- thanks!
Heimdal/krb4/KAME changes already fed back, rest to follow.
Inspired by, but not not based on, OpenBSD.
Revision 1.43: download - view: text, markup, annotated - select for diffs
Sun Sep 16 18:08:37 2001 UTC (25 years, 2 months ago) by hubertf
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +4 -4
lines
if creategid() fails, don't try to print system error message (use errx()
instead of err()), as all error cases in creategid() are already commented
properly from inside creategid().
This prevents funny errors like:
miyu# groupadd test2
miyu# groupadd test2
groupadd: group `test2' already exists
groupadd: can't add group: problems with /etc/group file: Inappropriate ioctl for device
Revision 1.42: download - view: text, markup, annotated - select for diffs
Wed Sep 5 21:37:32 2001 UTC (25 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +64 -9
lines
PR/13874: Hubert Feyrer: Add -L class to useradd
Revision 1.41: download - view: text, markup, annotated - select for diffs
Sat Aug 18 19:35:33 2001 UTC (25 years, 3 months ago) by ad
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +11 -4
lines
Update for pw_mkdb() change: restrict updates to one user's records and/or
the secure database where appropriate.
Revision 1.40: download - view: text, markup, annotated - select for diffs
Fri Aug 17 08:29:00 2001 UTC (25 years, 3 months ago) by joda
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +3 -3
lines
(usermod): ~F_MKDIR is usually much better than !F_MKDIR in bit masks
Revision 1.39: download - view: text, markup, annotated - select for diffs
Sat Jun 23 02:42:32 2001 UTC (25 years, 5 months ago) by itojun
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +44 -29
lines
do not make "useradd foo -s bar" to ignore "-s bar" silently. require
exactly one username.
Revision 1.20.4.8: download - view: text, markup, annotated - select for diffs
Mon Feb 26 18:01:17 2001 UTC (25 years, 8 months ago) by he
Branches: netbsd-1-5
CVS tags: netbsd-1-5-PATCH002,
netbsd-1-5-PATCH001
Diff to: previous 1.20.4.7: preferred, colored; branchpoint 1.20: preferred, colored
Changes since revision 1.20.4.7: +1 -0
lines
Pull up revision 1.37 (requested by lukem):
Make sure that a modified group has a trailing newline.
Revision 1.20.4.7: download - view: text, markup, annotated - select for diffs
Mon Feb 26 15:15:51 2001 UTC (25 years, 8 months ago) by he
Branches: netbsd-1-5
Diff to: previous 1.20.4.6: preferred, colored; branchpoint 1.20: preferred, colored
Changes since revision 1.20.4.6: +14 -3
lines
Pull up revision 1.36 (requested by wiz):
Improve handling of ``-l'' with ``-m'', and update documentation.
Fixes PR#11707.
Revision 1.38: download - view: text, markup, annotated - select for diffs
Mon Feb 19 23:22:49 2001 UTC (25 years, 9 months ago) by cgd
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +3 -3
lines
convert to use getprogname()
Revision 1.37: download - view: text, markup, annotated - select for diffs
Tue Feb 13 21:27:03 2001 UTC (25 years, 9 months ago) by lukem
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +3 -2
lines
groupmod: ensure that the modified group has the trailing newline
Revision 1.20.4.6: download - view: text, markup, annotated - select for diffs
Thu Jan 25 14:30:23 2001 UTC (25 years, 9 months ago) by jhawk
Branches: netbsd-1-5
Diff to: previous 1.20.4.5: preferred, colored; branchpoint 1.20: preferred, colored
Changes since revision 1.20.4.5: +33 -25
lines
Pull up revision 1.35 (requested by wiz):
Make moving a user's homedirectory with -md work correctly,
and clarify the meaning of -d in the absence of -m. Fixing PR11707
Revision 1.36: download - view: text, markup, annotated - select for diffs
Sat Dec 23 17:19:48 2000 UTC (25 years, 10 months ago) by wiz
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +15 -4
lines
Improve handling of -l with -m, and update documentation.
Based on an idea by Alistair Crooks in bin/11707.
Revision 1.35: download - view: text, markup, annotated - select for diffs
Sat Dec 23 16:29:35 2000 UTC (25 years, 10 months ago) by wiz
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +33 -25
lines
Fix moving a user's home directory with 'useradd -md /new/home/dir user'.
Clarify code (newpwp was referencing the same struct as pwp).
Fixes first part of bin/11707.
Revision 1.20.4.5: download - view: text, markup, annotated - select for diffs
Thu Dec 14 22:43:35 2000 UTC (25 years, 11 months ago) by he
Branches: netbsd-1-5
Diff to: previous 1.20.4.4: preferred, colored; branchpoint 1.20: preferred, colored
Changes since revision 1.20.4.4: +4 -4
lines
Pull up revision 1.34 (requested by wiz):
Don't try to create or move directory if only ``-d'' option is
given; documentation claims ``-m'' is also required.
Revision 1.34: download - view: text, markup, annotated - select for diffs
Thu Dec 7 17:44:03 2000 UTC (25 years, 11 months ago) by wiz
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +4 -4
lines
Don't try to create or move directory if only '-d' is given (man page
says '-m' is needed for that). Problem reported by Johnny C. Lam.
Revision 1.20.4.4: download - view: text, markup, annotated - select for diffs
Sun Nov 5 01:18:41 2000 UTC (26 years ago) by tv
Branches: netbsd-1-5
CVS tags: netbsd-1-5-RELEASE,
netbsd-1-5-BETA2
Diff to: previous 1.20.4.3: preferred, colored; branchpoint 1.20: preferred, colored
Changes since revision 1.20.4.3: +13 -5
lines
Pullup 1.31 and 1.33 [simonb]:
Run a "chmod -R u+w <newhomedir>" after copying files from skeldir.
Problem noted by Hubert Feyrer in private mail.
Fix behaviour of 'useradd -m': it is now a fatal error if the target home
directory already exists. Previously new skel files from /etc/skel were
copied and permissions/ownerships changed even if the directory already
existed.
Revision 1.10.2.10: download - view: text, markup, annotated - select for diffs
Sat Nov 4 19:24:21 2000 UTC (26 years ago) by he
Branches: netbsd-1-4
CVS tags: netbsd-1-4-PATCH003
Diff to: previous 1.10.2.9: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10.2.9: +13 -5
lines
Pull up revisions 1.31 and 1.33 (requested by simonb):
Error out if instructed to create the home directory but it
already exists. Otherwise, recursively make files in new home
directory (i.e. newly copied skel files) writable by the owner.
Revision 1.10.2.9: download - view: text, markup, annotated - select for diffs
Sat Nov 4 18:43:11 2000 UTC (26 years ago) by he
Branches: netbsd-1-4
Diff to: previous 1.10.2.8: preferred, colored
Changes since revision 1.10.2.8: +2 -4
lines
Revert pullup of revision 1.31 (requested by simonb):
It's not necessarily the right thing to make home directory tree
writable.
Revision 1.10.2.8: download - view: text, markup, annotated - select for diffs
Sat Nov 4 18:38:29 2000 UTC (26 years ago) by he
Branches: netbsd-1-4
Diff to: previous 1.10.2.7: preferred, colored
Changes since revision 1.10.2.7: +18 -21
lines
Pull up revisions 1.30-1.32 (requested by simonb):
Make usage message fit in 80 columns. Recursively make new
home directory writable by the user after copying skel files.
Remove some debugging code in the removal of user home dirs.
Revision 1.33: download - view: text, markup, annotated - select for diffs
Sat Nov 4 04:31:43 2000 UTC (26 years ago) by simonb
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +11 -5
lines
Fix behaviour of 'useradd -m': it is now a fatal error if the target home
directory already exists. Previously new skel files from /etc/skel were
copied and permissions/ownerships changed even if the directory already
existed.
Revision 1.20.4.3: download - view: text, markup, annotated - select for diffs
Fri Nov 3 20:56:38 2000 UTC (26 years ago) by tv
Branches: netbsd-1-5
Diff to: previous 1.20.4.2: preferred, colored; branchpoint 1.20: preferred, colored
Changes since revision 1.20.4.2: +16 -21
lines
Pullup 1.30 and 1.32 [simonb]:
Don't let usage messages wrap around on an 80 column terminal.
Problem noted by Hubert Feyrer in private mail.
=====
Remove some debugging cruft in the removal of user home directories
accidently left in from revision 1.25.
Revision 1.32: download - view: text, markup, annotated - select for diffs
Wed Nov 1 22:35:30 2000 UTC (26 years ago) by simonb
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +2 -6
lines
Remove some debugging cruft in the removal of user home directories
accidently left in from revision 1.25.
Revision 1.31: download - view: text, markup, annotated - select for diffs
Wed Nov 1 22:29:10 2000 UTC (26 years ago) by simonb
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +4 -2
lines
Run a "chmod -R u+w <newhomedir>" after copying files from skeldir.
Noted by Hubert Feyrer in private mail.
Revision 1.30: download - view: text, markup, annotated - select for diffs
Wed Nov 1 22:18:22 2000 UTC (26 years ago) by simonb
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +16 -17
lines
Don't let usage messages wrap around on an 80 column terminal.
Problem noted by Hubert Feyrer in private mail.
Revision 1.10.2.7: download - view: text, markup, annotated - select for diffs
Wed Oct 25 17:08:01 2000 UTC (26 years ago) by he
Branches: netbsd-1-4
Diff to: previous 1.10.2.6: preferred, colored
Changes since revision 1.10.2.6: +476 -222
lines
Pull up revisions 1.12,1.14-1.24,1.26-1.29 (via patch, requested by simonb):
Synchronize to current versions of the user management tool.
Fixes PR#11100, PR#11103, PR#11123 and PR#10985.
Revision 1.20.4.2: download - view: text, markup, annotated - select for diffs
Fri Oct 20 20:00:18 2000 UTC (26 years, 1 month ago) by tv
Branches: netbsd-1-5
CVS tags: netbsd-1-5-BETA
Diff to: previous 1.20.4.1: preferred, colored; branchpoint 1.20: preferred, colored
Changes since revision 1.20.4.1: +388 -153
lines
Pullup through 1.29 [simonb]:
Numerous cosmetic fixes and bug fixes, already discussed to be part of 1.5.
Revision 1.10.2.6: download - view: text, markup, annotated - select for diffs
Thu Oct 19 17:05:56 2000 UTC (26 years, 1 month ago) by he
Branches: netbsd-1-4
Diff to: previous 1.10.2.5: preferred, colored
Changes since revision 1.10.2.5: +6 -3
lines
Pull up revision 1.25 (requested by he):
Format string cleanup.
Revision 1.29: download - view: text, markup, annotated - select for diffs
Wed Oct 18 01:45:12 2000 UTC (26 years, 1 month ago) by assar
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +4 -4
lines
cast pw_change (a time_t) into long and printf it as %ld
Revision 1.20.4.1: download - view: text, markup, annotated - select for diffs
Tue Oct 17 19:50:31 2000 UTC (26 years, 1 month ago) by tv
Branches: netbsd-1-5
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +6 -3
lines
Pullup usr.sbin string format fixes [is].
See "cvs log" for explicit revision numbers per file, from sommerfeld.
Revision 1.28: download - view: text, markup, annotated - select for diffs
Tue Oct 17 05:43:10 2000 UTC (26 years, 1 month ago) by simonb
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +4 -4
lines
For userinfo - if a password change or expiry time_t is 0, print "NEVER"
instead of some date around Jan 1, 1970.
Revision 1.27: download - view: text, markup, annotated - select for diffs
Tue Oct 17 05:31:50 2000 UTC (26 years, 1 month ago) by simonb
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +10 -3
lines
Handle -G for the useradd case (usermod was already correct). Also
show warning if a non-existant group is specified.
Patch from PR bin/11123 by David Edmondson.
Revision 1.26: download - view: text, markup, annotated - select for diffs
Tue Oct 17 04:53:27 2000 UTC (26 years, 1 month ago) by simonb
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +237 -119
lines
Use flags to set which parts of a passwd entry are to be changed.
Before removing the home directory of a user check that
+ the user does not have uid 0
+ the user is the owner of the directory.
and remove the files using the effective user-id of the user. Show
a warning if the directory is not removed.
Use asprintf and fgetln for some string work to remove arbitary string
length limitations.
Fixes for PRs bin/11100 and bin/11103.
Revision 1.25: download - view: text, markup, annotated - select for diffs
Wed Oct 11 20:23:58 2000 UTC (26 years, 1 month ago) by is
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +6 -3
lines
More format string cleanups by sommerfeld.
Revision 1.24: download - view: text, markup, annotated - select for diffs
Sun Oct 1 08:56:28 2000 UTC (26 years, 1 month ago) by simonb
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +52 -50
lines
Save the "preserve" value in the defaults file.
Use _PATH_CSHELL from <paths.h> instead of the string "/bin/csh".
Don't cast NULL to the pointer type being checked.
Revision 1.23: download - view: text, markup, annotated - select for diffs
Fri Sep 29 10:37:26 2000 UTC (26 years, 1 month ago) by agc
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +112 -9
lines
Add functionality for adding usernames to secondary groups via the
"usermod -G group user" command.
Fixes PR/11071.
Revision 1.22: download - view: text, markup, annotated - select for diffs
Tue Sep 26 11:35:48 2000 UTC (26 years, 1 month ago) by agc
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +3 -3
lines
Correct a pasto in moduser(), the effect of which was to replace the
contents of the GECOS comment field with the default shell name, when
a user's information was modified.
Fixes PR 11072.
Revision 1.21: download - view: text, markup, annotated - select for diffs
Wed Sep 20 19:28:40 2000 UTC (26 years, 2 months ago) by agc
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +7 -2
lines
If we're about to add a user whose specified home directory does
not exist, and the "-m" argument has not been specified, then output
a warning.
Revision 1.10.2.5: download - view: text, markup, annotated - select for diffs
Tue Sep 12 22:12:06 2000 UTC (26 years, 2 months ago) by he
Branches: netbsd-1-4
Diff to: previous 1.10.2.4: preferred, colored
Changes since revision 1.10.2.4: +6 -4
lines
Pull up revision 1.13 (requested by jlam):
Make the ``-d homedir'' option work. Fixes PR#10401.
Revision 1.10.2.4: download - view: text, markup, annotated - select for diffs
Wed Jul 5 21:08:32 2000 UTC (26 years, 4 months ago) by he
Branches: netbsd-1-4
Diff to: previous 1.10.2.3: preferred, colored
Changes since revision 1.10.2.3: +4 -4
lines
Apply patch (requested by he):
Make the ersatz strlcpy() conform to the official prototype.
Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue May 16 20:23:28 2000 UTC (26 years, 6 months ago) by agc
Branches: MAIN
CVS tags: netbsd-1-5-base,
netbsd-1-5-ALPHA2,
minoura-xpg4dl-base,
minoura-xpg4dl
Branch point for: netbsd-1-5
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +50 -43
lines
Pick up the changes that make sense from OpenBSD
+ Use _PATH_GROUP and _PATH_MASTERPASSWD (from OpenBSD)
+ Use -G group1,group2,group3 for multiple groups in useradd and usermod
(pointed out by Matt Green, and also changed in OpenBSD, but done more
efficiently here)
+ is_number should not be inside #ifdef EXTENSIONS (from OpenBSD)
+ clear up yet another usage message (for user(8) and group(8)) - noticed
in passing, unknown if fixed anywhere else
Revision 1.19: download - view: text, markup, annotated - select for diffs
Tue May 9 09:25:21 2000 UTC (26 years, 6 months ago) by agc
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +18 -0
lines
Revert previous change, since maintenance across -current, pkgsrc and the
1.4 branch requires one set of sources.
Revision 1.18: download - view: text, markup, annotated - select for diffs
Fri May 5 01:27:47 2000 UTC (26 years, 6 months ago) by hubertf
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +2 -20
lines
Remove code for 1.4 backward compatibility (to be put into the package,
where it really belongs)
Revision 1.17: download - view: text, markup, annotated - select for diffs
Fri Apr 14 06:26:55 2000 UTC (26 years, 7 months ago) by simonb
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +2 -5
lines
Don't declare 'extern opt*' getopt variables.
Revision 1.16: download - view: text, markup, annotated - select for diffs
Fri Mar 31 04:09:04 2000 UTC (26 years, 7 months ago) by soren
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +26 -16
lines
Consistently move checkeuid() call to after usage() call to allow non-root
to get help. Also remove a few duplicate geteuid() calls.
Revision 1.15: download - view: text, markup, annotated - select for diffs
Fri Mar 31 03:11:24 2000 UTC (26 years, 7 months ago) by soren
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +23 -23
lines
Remove a few unnecessary casts.
Revision 1.14: download - view: text, markup, annotated - select for diffs
Fri Mar 31 02:54:17 2000 UTC (26 years, 7 months ago) by soren
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +7 -7
lines
Use char NULs.
Revision 1.13: download - view: text, markup, annotated - select for diffs
Sun Mar 12 19:57:24 2000 UTC (26 years, 8 months ago) by jlam
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +6 -4
lines
Make "-d homedir" option work -- home directory wasn't being set in this
case.
Revision 1.12: download - view: text, markup, annotated - select for diffs
Tue Mar 7 20:56:45 2000 UTC (26 years, 8 months ago) by agc
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +8 -3
lines
When adding a group, check that it doesn't already exist.
Also fix a problem with reading entries when modifying a group.
Both problems found and analysed by Thomas Klausner.
Revision 1.10.2.3: download - view: text, markup, annotated - select for diffs
Fri Feb 4 22:57:21 2000 UTC (26 years, 9 months ago) by he
Branches: netbsd-1-4
CVS tags: netbsd-1-4-PATCH002
Diff to: previous 1.10.2.2: preferred, colored
Changes since revision 1.10.2.2: +10 -1
lines
Pull up revision 1.11 (requested by agc):
Add RCS IDs and copyright.
Revision 1.11: download - view: text, markup, annotated - select for diffs
Wed Feb 2 15:12:10 2000 UTC (26 years, 9 months ago) by agc
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +10 -1
lines
Add RCS Id and Copyright.
Revision 1.10.2.2: download - view: text, markup, annotated - select for diffs
Fri Jan 21 00:01:07 2000 UTC (26 years, 10 months ago) by he
Branches: netbsd-1-4
Diff to: previous 1.10.2.1: preferred, colored
Changes since revision 1.10.2.1: +1511 -0
lines
Pull up revisions 1.1-1.10 (new) (requested by agc):
Add tools to manage users and groups.
Revision 1.10.2.1
Fri Dec 31 21:58:14 1999 UTC (26 years, 10 months ago) by he
Branches: netbsd-1-4
FILE REMOVED
Changes since revision 1.10: +0 -1511
lines
file user.c was added on branch netbsd-1-4 on 2000-01-21 00:01:07 +0000
Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri Dec 31 21:58:14 1999 UTC (26 years, 10 months ago) by agc
Branches: MAIN
Branch point for: netbsd-1-4
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +12 -13
lines
Enhancements from Hubert Feyrer:
+ copy all files and directories in <skeldir> to new user's home
directory, not just if they begin with a '.'
+ use pax to copy files from <skeldir>, as this will allow <skeldir>
to contain directory trees as well as regular files
+ use -h arg to chown(1) in case any symlinks have been created in the
new user's home directory
+ getpwnam(3) does not set errno, so use errx(3) and warnx(3)
+ use nologin(8) in preference to false(1) when deleting users but
preserving information
+ in usage messages, specify [-r lowuid..highuid] rather than a simple
[-r range]
Revision 1.9.2.2: download - view: text, markup, annotated - select for diffs
Mon Dec 27 18:38:16 1999 UTC (26 years, 10 months ago) by wrstuden
Branches: wrstuden-devbsize
Diff to: previous 1.9.2.1: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9.2.1: +1261 -0
lines
Pull up to last week's -current.
Revision 1.9.2.1
Fri Dec 24 09:08:50 1999 UTC (26 years, 10 months ago) by wrstuden
Branches: wrstuden-devbsize
FILE REMOVED
Changes since revision 1.9: +0 -1512
lines
file user.c was added on branch wrstuden-devbsize on 1999-12-27 18:38:16 +0000
Revision 1.9: download - view: text, markup, annotated - select for diffs
Fri Dec 24 09:08:50 1999 UTC (26 years, 10 months ago) by agc
Branches: MAIN
Branch point for: wrstuden-devbsize
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +353 -102
lines
Add new functionality, and fix some bugs and oversights:
+ Moved all internal definitions from usermgmt.h to user.c
+ Added prototypes to usermgmt.h
+ Allow defaults to be set at build time
+ Check the effective uid is 0 if any data is to be modified
+ Check all numeric uids and gids really are numeric
+ Fix a bug (reported by lenb at sasquatch.com) where new ranges were
appended to old ranges, rather than replacing them
+ Add userinfo(8) and groupinfo(8) utilities (if EXTENSIONS is
defined), whereby user and group information can be displayed. Add
manual pages for new utilities. Add front-end calling from user(8)
and group(8) accordingly.
+ Make all functions visible outside the user.c file again. User and
group manipulation may be split out into a separate shared lib in the
future
+ Split off main function into a separate main.c
+ Changed default group to be "users"
+ Changed despatch table for commands to work in a more sane manner
+ Added "default-group" target to Makefile, so that the default group
can be made easily.
Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Dec 13 00:26:26 1999 UTC (26 years, 11 months ago) by hubertf
Branches: MAIN
CVS tags: wrstuden-devbsize-base,
wrstuden-devbsize-19991221
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +1 -26
lines
Remove code to make this compile on 1.4.1, as requested by Luke and
Frank. We'll need to move this to pkgsrc to get it for 1.4.1.
Revision 1.7: download - view: text, markup, annotated - select for diffs
Wed Dec 8 21:45:54 1999 UTC (26 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +41 -15
lines
* cleanup the usage messages:
- put `usage' at the start of each message
- put a space between the option and arg in [-x foo]
* fix command parsing for when a two word command is invoked without
args or with an invalid second arg so that a more appropriate error
message is printed.
Revision 1.6: download - view: text, markup, annotated - select for diffs
Wed Dec 8 18:12:16 1999 UTC (26 years, 11 months ago) by hubertf
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +31 -8
lines
- Only use strlcpy() on systems that have it, i.e. >=1.4K. This makes
this working again on 1.4 systems.
- Revert last change to argument passing which broke "user del",
"user mod", ...
Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Dec 7 10:42:12 1999 UTC (26 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +21 -25
lines
* don't dump core if run without args
* use strlcpy() instead of homegrown strnncpy()
* sort #includes
Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Dec 7 10:14:03 1999 UTC (26 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +2 -2
lines
use (c) instead of 8bit copyright symbol...
Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Dec 6 23:11:27 1999 UTC (26 years, 11 months ago) by simonb
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +3 -3
lines
Fix up a few calls to usage().
Revision 1.2: download - view: text, markup, annotated - select for diffs
Mon Dec 6 22:29:02 1999 UTC (26 years, 11 months ago) by simonb
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +17 -9
lines
Make this compile with WARNS=1.
Revision 1.1: download - view: text, markup, annotated - select for diffs
Mon Dec 6 21:31:47 1999 UTC (26 years, 11 months ago) by agc
Branches: MAIN
Add SVR4/Solaris-like useradd/usermod/userdel functionality, and
groupadd/groupmod/groupdel functionality, along with two front-end
utilities, user(8) and group(8).
Based on the addnerd package, but most of the interface has been
completely rewritten, and suggestions from simonb and mrg have been
incorporated.
CVSweb <webmaster@jp.NetBSD.org>