diff options
author | agc <agc> | 2000-01-03 22:08:56 +0000 |
---|---|---|
committer | agc <agc> | 2000-01-03 22:08:56 +0000 |
commit | bd41099b4e85faf70cc19a1a83efaeef29a28b3f (patch) | |
tree | 37e1cb7d5032a402daf8d4b2f95303693acacaf1 /sysutils | |
parent | ce7999828c172a0710dc2530da3c85f1ed170bef (diff) | |
download | pkgsrc-bd41099b4e85faf70cc19a1a83efaeef29a28b3f.tar.gz |
Update this package to mirror the 1999/12/31 sources.
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]
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.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/user/Makefile | 4 | ||||
-rw-r--r-- | sysutils/user/files/md5 | 4 | ||||
-rw-r--r-- | sysutils/user/files/patch-sum | 7 | ||||
-rw-r--r-- | sysutils/user/patches/patch-aa | 55 | ||||
-rw-r--r-- | sysutils/user/pkg/PLIST | 8 |
5 files changed, 16 insertions, 62 deletions
diff --git a/sysutils/user/Makefile b/sysutils/user/Makefile index af63ad7f807..bc5a78485d4 100644 --- a/sysutils/user/Makefile +++ b/sysutils/user/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.2 1999/12/17 10:48:25 agc Exp $ +# $NetBSD: Makefile,v 1.3 2000/01/03 22:08:56 agc Exp $ # -DISTNAME= user-19991216 +DISTNAME= user-19991231 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_LOCAL} diff --git a/sysutils/user/files/md5 b/sysutils/user/files/md5 index 51dd9ba22d5..f698b122cff 100644 --- a/sysutils/user/files/md5 +++ b/sysutils/user/files/md5 @@ -1,3 +1,3 @@ -$NetBSD: md5,v 1.2 1999/12/17 10:48:26 agc Exp $ +$NetBSD: md5,v 1.3 2000/01/03 22:08:58 agc Exp $ -MD5 (user-19991216.tar.gz) = ee983841c5c7ad503f1a648e311fc4f2 +MD5 (user-19991231.tar.gz) = cfe53b11f4c62a011ac968704f1550e5 diff --git a/sysutils/user/files/patch-sum b/sysutils/user/files/patch-sum index a4c8e6b012f..e72cdbb77a3 100644 --- a/sysutils/user/files/patch-sum +++ b/sysutils/user/files/patch-sum @@ -1,3 +1,6 @@ -$NetBSD: patch-sum,v 1.1.1.1 1999/12/16 16:28:31 agc Exp $ +$NetBSD: patch-sum,v 1.2 2000/01/03 22:08:58 agc Exp $ -MD5 (patch-aa) = bda6cb8de5cd4c6f48c5012aa5c28460 +This placeholder file is generated by the ``makepatchsum'' target +whenever the patches directory is empty or missing. Its purpose +is to ensure that the presence of any obsolete patches will cause +the proper error to be emitted at build time. diff --git a/sysutils/user/patches/patch-aa b/sysutils/user/patches/patch-aa deleted file mode 100644 index 1fd09c98717..00000000000 --- a/sysutils/user/patches/patch-aa +++ /dev/null @@ -1,55 +0,0 @@ -$NetBSD: patch-aa,v 1.1.1.1 1999/12/16 16:28:31 agc Exp $ - -Bring in strlcpy(3) from -current for those versions of NetBSD which -don't have it. - ---- user.c Thu Dec 16 15:46:16 1999 -+++ user.c Thu Dec 16 16:17:17 1999 -@@ -92,6 +92,47 @@ - return ret; - } - -+#if __NetBSD_Version__ < 104110000 -+#undef _DIAGASSERT -+#define _DIAGASSERT(x) -+/* -+ * Copy src to string dst of size siz. At most siz-1 characters -+ * will be copied. Always NUL terminates (unless siz == 0). -+ * Returns strlen(src); if retval >= siz, truncation occurred. -+ */ -+size_t -+strlcpy(dst, src, siz) -+ char *dst; -+ const char *src; -+ size_t siz; -+{ -+ register char *d = dst; -+ register const char *s = src; -+ register size_t n = siz; -+ -+ _DIAGASSERT(dst != NULL); -+ _DIAGASSERT(src != NULL); -+ -+ /* Copy as many bytes as will fit */ -+ if (n != 0 && --n != 0) { -+ do { -+ if ((*d++ = *s++) == 0) -+ break; -+ } while (--n != 0); -+ } -+ -+ /* Not enough room in dst, add NUL and traverse rest of src */ -+ if (n == 0) { -+ if (siz != 0) -+ *d = '\0'; /* NUL-terminate dst */ -+ while (*s++) -+ ; -+ } -+ -+ return(s - src - 1); /* count does not include NUL */ -+} -+#endif -+ - /* copy any dot files into the user's home directory */ - static int - copydotfiles(char *skeldir, int uid, int gid, char *dir) diff --git a/sysutils/user/pkg/PLIST b/sysutils/user/pkg/PLIST index 1f85c05e942..e31efcead01 100644 --- a/sysutils/user/pkg/PLIST +++ b/sysutils/user/pkg/PLIST @@ -1,27 +1,33 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 1999/12/16 16:28:31 agc Exp $ +@comment $NetBSD: PLIST,v 1.2 2000/01/03 22:08:59 agc Exp $ sbin/user sbin/useradd sbin/userdel +sbin/userinfo sbin/usermod sbin/group sbin/groupadd sbin/groupdel +sbin/groupinfo sbin/groupmod man/cat8/user.0 man/cat8/useradd.0 man/cat8/userdel.0 +man/cat8/userinfo.0 man/cat8/usermod.0 man/cat8/group.0 man/cat8/groupadd.0 man/cat8/groupdel.0 +man/cat8/groupinfo.0 man/cat8/groupmod.0 man/man8/user.8 man/man8/useradd.8 man/man8/userdel.8 +man/man8/userinfo.8 man/man8/usermod.8 man/man8/group.8 man/man8/groupadd.8 man/man8/groupdel.8 +man/man8/groupinfo.8 man/man8/groupmod.8 share/examples/usermgmt/.cshrc share/examples/usermgmt/.login |