summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Grehan <grehan@FreeBSD.org>2012-04-26 07:52:28 +0000
committerPeter Grehan <grehan@FreeBSD.org>2012-04-26 07:52:28 +0000
commitf97bcb4e460722f7004427d2020e6b6d94fbc609 (patch)
tree5035f1ccf54c0bebd56667338e0c4dcc9cab8257
parentfe07f20cf88bdc2031c18e58a3525f7abce95292 (diff)
parentd9bb96a8cb71e217e189e71c0b3444b5751143f4 (diff)
downloadpw-darwin-f97bcb4e460722f7004427d2020e6b6d94fbc609.tar.gz
pw-darwin-f97bcb4e460722f7004427d2020e6b6d94fbc609.tar.zst
pw-darwin-f97bcb4e460722f7004427d2020e6b6d94fbc609.zip
IFC @ r234692
sys/amd64/include/cpufunc.h sys/amd64/include/fpu.h sys/amd64/amd64/fpu.c sys/amd64/vmm/vmm.c - Add API to allow vmm FPU state init/save/restore. FP stuff discussed with: kib
-rw-r--r--adduser/adduser.conf.52
-rw-r--r--adduser/adduser.sh1
-rw-r--r--pw/cpdir.c2
-rw-r--r--pw/pw_user.c6
4 files changed, 8 insertions, 3 deletions
diff --git a/adduser/adduser.conf.5 b/adduser/adduser.conf.5
index d5fcf77..c7c4f5d 100644
--- a/adduser/adduser.conf.5
+++ b/adduser/adduser.conf.5
@@ -34,7 +34,7 @@
.Xr adduser 8
configuration file
.Sh DESCRIPTION
-The
+The
.Pa /etc/adduser.conf
file is automatically generated by the
.Xr adduser 8
diff --git a/adduser/adduser.sh b/adduser/adduser.sh
index f645f59..4b0a6f6 100644
--- a/adduser/adduser.sh
+++ b/adduser/adduser.sh
@@ -488,6 +488,7 @@ get_uid() {
_prompt=
if [ -n "$uuid" ]; then
+ uuid=`get_nextuid $uuid`
_prompt="Uid [$uuid]: "
else
_prompt="Uid (Leave empty for default): "
diff --git a/pw/cpdir.c b/pw/cpdir.c
index c5534e5..0fd671b 100644
--- a/pw/cpdir.c
+++ b/pw/cpdir.c
@@ -84,7 +84,7 @@ copymkdir(char const * dir, char const * skel, mode_t mode, uid_t uid, gid_t gid
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); /* propagate flags */
- } else if (S_ISLNK(st.st_mode) && (len = readlink(src, lnk, sizeof(lnk))) != -1) {
+ } else if (S_ISLNK(st.st_mode) && (len = readlink(src, lnk, sizeof(lnk) - 1)) != -1) {
lnk[len] = '\0';
symlink(lnk, dst);
lchown(dst, uid, gid);
diff --git a/pw/pw_user.c b/pw/pw_user.c
index 0001a41..b59789c 100644
--- a/pw/pw_user.c
+++ b/pw/pw_user.c
@@ -1028,6 +1028,7 @@ pw_pwcrypt(char *password)
{
int i;
char salt[SALTSIZE + 1];
+ char *cryptpw;
static char buf[256];
@@ -1038,7 +1039,10 @@ pw_pwcrypt(char *password)
salt[i] = chars[arc4random_uniform(sizeof(chars) - 1)];
salt[SALTSIZE] = '\0';
- return strcpy(buf, crypt(password, salt));
+ cryptpw = crypt(password, salt);
+ if (cryptpw == NULL)
+ errx(EX_CONFIG, "crypt(3) failure");
+ return strcpy(buf, cryptpw);
}