Re: systemd pulseaudio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



> The 2:nd will prompt for your password when it installs the package.

Aah, uses sudo and then su. I was wondering how pacman would gain the
permissions.

	# check for sudo if we will need it during makepkg execution
	if (( ! ( ASROOT || INFAKEROOT ) && ( DEP_BIN || RMDEPS ||
	INSTALL ) )); then if ! type -p sudo >/dev/null; then
			warning "$(gettext "Sudo can not be found. Will
	use su to acquire root privileges.")" fi
	fi

Does it or shouldn't it just try sudo or check it's allowed and fall
back to su as sudo may be there but not allow the particular command or
arguments.

/usr/bin/grep -C 5 -i sudo /usr/bin/makepkg
		printf -v cmd "%q " "$PACMAN" $PACMAN_OPTS "$@"
	else
		printf -v cmd "%q " "$PACMAN" "$@"
	fi
	if (( ! ASROOT )) && [[ ! $1 = -@(T|Qq) ]]; then
		if type -p sudo >/dev/null; then
			cmd="sudo $cmd"
		else
			cmd="su root -c '$cmd'"
		fi
	fi
	eval "$cmd"


-- 
_______________________________________________________________________

'Write programs that do one thing and do it well. Write programs to work
together. Write programs to handle text streams, because that is a
universal interface'

(Doug McIlroy)
_______________________________________________________________________


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux