head 1.4; access; symbols pkgsrc-2013Q2:1.4.0.8 pkgsrc-2013Q2-base:1.4 pkgsrc-2012Q4:1.4.0.6 pkgsrc-2012Q4-base:1.4 pkgsrc-2011Q4:1.4.0.4 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q2:1.4.0.2 pkgsrc-2011Q2-base:1.4 pkgsrc-2010Q1:1.3.0.64 pkgsrc-2010Q1-base:1.3 pkgsrc-2009Q4:1.3.0.62 pkgsrc-2009Q4-base:1.3 pkgsrc-2009Q3:1.3.0.60 pkgsrc-2009Q3-base:1.3 pkgsrc-2009Q2:1.3.0.58 pkgsrc-2009Q2-base:1.3 pkgsrc-2009Q1:1.3.0.56 pkgsrc-2009Q1-base:1.3 pkgsrc-2008Q4:1.3.0.54 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.52 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.50 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.48 pkgsrc-2008Q2-base:1.3 cwrapper:1.3.0.46 pkgsrc-2008Q1:1.3.0.44 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.3.0.42 pkgsrc-2007Q4-base:1.3 pkgsrc-2007Q3:1.3.0.40 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.3.0.38 pkgsrc-2007Q2-base:1.3 pkgsrc-2007Q1:1.3.0.36 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.34 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.32 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.30 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.28 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.26 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.24 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.3.0.22 pkgsrc-2005Q2-base:1.3 pkgsrc-2005Q1:1.3.0.20 pkgsrc-2005Q1-base:1.3 pkgsrc-2004Q4:1.3.0.18 pkgsrc-2004Q4-base:1.3 pkgsrc-2004Q3:1.3.0.16 pkgsrc-2004Q3-base:1.3 pkgsrc-2004Q2:1.3.0.14 pkgsrc-2004Q2-base:1.3 pkgsrc-2004Q1:1.3.0.12 pkgsrc-2004Q1-base:1.3 pkgsrc-2003Q4:1.3.0.10 pkgsrc-2003Q4-base:1.3 netbsd-1-6-1:1.3.0.6 netbsd-1-6-1-base:1.3 netbsd-1-6:1.3.0.8 netbsd-1-6-RELEASE-base:1.3 pkgviews:1.3.0.4 pkgviews-base:1.3 buildlink2:1.3.0.2 buildlink2-base:1.3 netbsd-1-5-PATCH003:1.3 netbsd-1-5-PATCH001:1.3 netbsd-1-5-RELEASE:1.3 netbsd-1-4-PATCH003:1.3 netbsd-1-4-PATCH002:1.3 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.4 date 2010.04.18.01.37.22; author agc; state dead; branches; next 1.3; 1.3 date 2000.01.13.17.31.16; author hubertf; state Exp; branches; next 1.2; 1.2 date 2000.01.03.22.08.58; author agc; state dead; branches; next 1.1; 1.1 date 99.12.16.16.28.31; author agc; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 99.12.16.16.28.31; author agc; state Exp; branches; next ; desc @@ 1.4 log @Remove the sysutils/user package which is now not needed - if we find a platform without the necessary tools to manage users, we can resurrect this from the NetBSD-current sources. @ text @$NetBSD: patch-aa,v 1.3 2000/01/13 17:31:16 hubertf Exp $ --- Makefile.BAK Thu Jan 13 18:05:29 2000 +++ Makefile Thu Jan 13 18:05:54 2000 @@@@ -30,7 +30,7 @@@@ FILESNAME_dot.cshrc= .cshrc FILESNAME_dot.login= .login FILESNAME_dot.profile= .profile -FILESDIR= /usr/share/examples/usermgmt +FILESDIR?= /usr/share/examples/usermgmt .endif # this target checks the built-in default group, and, if it doesn't exist, @ 1.3 log @Make this pkg behave like any other (real) package: allow building of a binary package and deinstallation (as advertized :) @ text @d1 1 a1 1 $NetBSD$ @ 1.2 log @Update this package to mirror the 1999/12/31 sources. Enhancements from Hubert Feyrer: + copy all files and directories in to new user's home directory, not just if they begin with a '.' + use pax to copy files from , as this will allow 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. @ text @d1 1 a1 1 $NetBSD: patch-aa,v 1.1 1999/12/16 16:28:31 agc Exp $ d3 9 a11 8 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; } d13 1 a13 44 +#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) @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD$ @ 1.1.1.1 log @Import NetBSD-current's user(8) user/group management suite of programs into the NetBSD packages collection. @ text @@