From ff24e26e33ed88923ffc1b3d722223befea28276 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 17 Dec 2011 23:46:47 +0000 Subject: In usr.sbin/pw/pw_user.c, use the correct printf length modifier for a ptrdiff_t. MFC after: 1 week --- pw/pw_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3-56-ge451 From d49f0518f34bab2eb0f3f131f3ddbdbdb5c70059 Mon Sep 17 00:00:00 2001 From: Eitan Adler Date: Thu, 22 Dec 2011 03:36:54 +0000 Subject: - document the -l option to usermod PR: docs/161588 Submitted by: "Luchesar V. ILIEV" Approved by: gjb MFC after: 1 week --- pw/pw.8 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pw/pw.8 b/pw/pw.8 index 6e79d56..8b21107 100644 --- a/pw/pw.8 +++ b/pw/pw.8 @@ -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 -- cgit v1.2.3-56-ge451 From af07fd95ed13319f60efea3bc5c3cae1f58a18b8 Mon Sep 17 00:00:00 2001 From: Ulrich Spörlein Date: Fri, 30 Dec 2011 10:58:14 +0000 Subject: Spelling fixes for usr.sbin/ --- adduser/adduser.sh | 4 ++-- pw/cpdir.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 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 diff --git a/pw/cpdir.c b/pw/cpdir.c index 017c200..c5534e5 100644 --- a/pw/cpdir.c +++ b/pw/cpdir.c @@ -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); -- cgit v1.2.3-56-ge451