Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144558188
D45229.1775458728.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
786 B
Referenced Files
None
Subscribers
None
D45229.1775458728.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D45229: adduser: create dataset only if home is directly within dataset
Attached
Detach File
Event Timeline
Log In to Comment