mustberoot.subr (251274) | mustberoot.subr (252795) |
---|---|
1if [ ! "$_MUSTBEROOT_SUBR" ]; then _MUSTBEROOT_SUBR=1 2# 3# Copyright (c) 2006-2013 Devin Teske 4# All Rights Reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# | 1if [ ! "$_MUSTBEROOT_SUBR" ]; then _MUSTBEROOT_SUBR=1 2# 3# Copyright (c) 2006-2013 Devin Teske 4# All Rights Reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# |
27# $FreeBSD: head/usr.sbin/bsdconfig/share/mustberoot.subr 251274 2013-06-02 23:15:12Z dteske $ | 27# $FreeBSD: head/usr.sbin/bsdconfig/share/mustberoot.subr 252795 2013-07-05 16:00:01Z dteske $ |
28# 29############################################################ INCLUDES 30 31BSDCFG_SHARE="/usr/share/bsdconfig" 32. $BSDCFG_SHARE/common.subr || exit 1 33f_dprintf "%s: loading includes..." mustberoot.subr 34f_include $BSDCFG_SHARE/dialog.subr 35 --- 289 unchanged lines hidden (view full) --- 325 # Make sure the user exists and is non-root 326 # 327 local user password 328 user="${user_pass%%/*}" 329 password="${user_pass#*/}" 330 unset user_pass # scrub memory 331 if [ ! "$user" ]; then 332 nfailures=$(( $nfailures + 1 )) | 28# 29############################################################ INCLUDES 30 31BSDCFG_SHARE="/usr/share/bsdconfig" 32. $BSDCFG_SHARE/common.subr || exit 1 33f_dprintf "%s: loading includes..." mustberoot.subr 34f_include $BSDCFG_SHARE/dialog.subr 35 --- 289 unchanged lines hidden (view full) --- 325 # Make sure the user exists and is non-root 326 # 327 local user password 328 user="${user_pass%%/*}" 329 password="${user_pass#*/}" 330 unset user_pass # scrub memory 331 if [ ! "$user" ]; then 332 nfailures=$(( $nfailures + 1 )) |
333 f_dialog_msgbox "$msg_no_username" | 333 f_show_msg "$msg_no_username" |
334 continue 335 fi 336 if [ ! "$SECURE_ALLOW_ROOT" ]; then 337 case "$user" in 338 root|toor) 339 nfailures=$(( $nfailures + 1 )) 340 f_show_msg "$msg_user_disallowed" "$user" 341 continue --- 84 unchanged lines hidden --- | 334 continue 335 fi 336 if [ ! "$SECURE_ALLOW_ROOT" ]; then 337 case "$user" in 338 root|toor) 339 nfailures=$(( $nfailures + 1 )) 340 f_show_msg "$msg_user_disallowed" "$user" 341 continue --- 84 unchanged lines hidden --- |