diff options
author | Sean Bruno <sbruno@FreeBSD.org> | 2012-01-04 02:01:27 +0000 |
---|---|---|
committer | Sean Bruno <sbruno@FreeBSD.org> | 2012-01-04 02:01:27 +0000 |
commit | fe07f20cf88bdc2031c18e58a3525f7abce95292 (patch) | |
tree | a58a9c3529153d8743590ead7421d1b3b5a5fd43 | |
parent | ac98092cd6993e76fa328027a99881fac1e9828d (diff) | |
parent | af07fd95ed13319f60efea3bc5c3cae1f58a18b8 (diff) | |
download | pw-darwin-fe07f20cf88bdc2031c18e58a3525f7abce95292.tar.gz pw-darwin-fe07f20cf88bdc2031c18e58a3525f7abce95292.tar.zst pw-darwin-fe07f20cf88bdc2031c18e58a3525f7abce95292.zip |
IFC to head to catch up the bhyve branch
Approved by: grehan@
-rw-r--r-- | adduser/adduser.sh | 4 | ||||
-rw-r--r-- | pw/cpdir.c | 8 | ||||
-rw-r--r-- | pw/pw.8 | 13 | ||||
-rw-r--r-- | pw/pw_user.c | 2 |
4 files changed, 19 insertions, 8 deletions
diff --git a/adduser/adduser.sh b/adduser/adduser.sh index 8e05f33..f645f59 100644 --- a/adduser/adduser.sh +++ b/adduser/adduser.sh @@ -894,7 +894,7 @@ if [ "$procowner" != "0" ]; then exit 1 fi -# Overide from our conf file +# Override from our conf file # Quickly go through the commandline line to see if we should read # from our configuration file. The actual parsing of the commandline # arguments happens after we read in our configuration file (commandline @@ -914,7 +914,7 @@ if [ -n "$readconfig" ]; then fi fi -# Proccess command-line options +# Process command-line options # for _switch ; do case $_switch in @@ -83,14 +83,14 @@ copymkdir(char const * dir, char const * skel, mode_t mode, uid_t uid, gid_t gid if (S_ISDIR(st.st_mode)) { /* Recurse for this */ if (strcmp(e->d_name, ".") != 0 && strcmp(e->d_name, "..") != 0) copymkdir(dst, src, st.st_mode & _DEF_DIRMODE, uid, gid); - chflags(dst, st.st_flags); /* propogate flags */ + chflags(dst, st.st_flags); /* propagate flags */ } else if (S_ISLNK(st.st_mode) && (len = readlink(src, lnk, sizeof(lnk))) != -1) { lnk[len] = '\0'; symlink(lnk, dst); lchown(dst, uid, gid); /* - * Note: don't propogate special attributes - * but do propogate file flags + * Note: don't propagate special attributes + * but do propagate file flags */ } else if (S_ISREG(st.st_mode) && (outfd = open(dst, O_RDWR | O_CREAT | O_EXCL, st.st_mode)) != -1) { if ((infd = open(src, O_RDONLY)) == -1) { @@ -108,7 +108,7 @@ copymkdir(char const * dir, char const * skel, mode_t mode, uid_t uid, gid_t gid write(outfd, copybuf, b); close(infd); /* - * Propogate special filesystem flags + * Propagate special filesystem flags */ fchown(outfd, uid, gid); fchflags(outfd, st.st_flags); @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 30, 2007 +.Dd December 21, 2011 .Dt PW 8 .Os .Sh NAME @@ -714,6 +714,17 @@ are also removed if the user's uid is unique and not also used by another accoun system. .Pp The +.Ar usermod +command adds one additional option: +.Bl -tag -width "-G grouplist" +.It Fl l Ar name +This option allows changing of an existing account name to +.Ql \&name . +The new name must not already exist, and any attempt to duplicate an +existing account name will be rejected. +.El +.Pp +The .Ar usershow command allows viewing of an account in one of two formats. By default, the format is identical to the format used in diff --git a/pw/pw_user.c b/pw/pw_user.c index db33746..0001a41 100644 --- a/pw/pw_user.c +++ b/pw/pw_user.c @@ -1208,7 +1208,7 @@ pw_checkname(u_char *name, int gecos) if (reject) { snprintf(showch, sizeof(showch), (*ch >= ' ' && *ch < 127) ? "`%c'" : "0x%02x", *ch); - errx(EX_DATAERR, "invalid character %s at position %d in %s", + errx(EX_DATAERR, "invalid character %s at position %td in %s", showch, (ch - name), showtype); } if (!gecos && (ch - name) > LOGNAMESIZE) |