Page MenuHomeFreeBSD

D45229.1775458728.diff
No OneTemporary

Size
786 B
Referenced Files
None
Subscribers
None

D45229.1775458728.diff

diff --git a/usr.sbin/adduser/adduser.sh b/usr.sbin/adduser/adduser.sh
--- a/usr.sbin/adduser/adduser.sh
+++ b/usr.sbin/adduser/adduser.sh
@@ -474,7 +474,7 @@
# so, enable ZFS home dataset creation.
#
get_zfs_home() {
- local _prefix=
+ local _prefix= _tmp=
# check if zfs kernel module is loaded before attempting to run zfs to
# prevent loading the kernel module on systems that don't use ZFS
@@ -487,6 +487,13 @@
Zcreate="no"
return
fi
+ # Make sure that _prefix is not a subdirectory within a dataset. If it
+ # is, the containing dataset will be the same for it and its parent.
+ _tmp=$(${ZFSCMD} list -Ho name "$(dirname "${homeprefix}")" 2>/dev/null)
+ if [ "${_tmp}" = "${_prefix}" ]; then
+ Zcreate="no"
+ return
+ fi
zhome="${_prefix}/${username}"
}

File Metadata

Mime Type
text/plain
Expires
Mon, Apr 6, 6:58 AM (3 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28271627
Default Alt Text
D45229.1775458728.diff (786 B)

Event Timeline