X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=shell%2Faliases.in;h=69270ccfc261dd4704bda7a20153ff08f6941935;hb=17e1c02c53c9083cf2201c6e4c8ac5d493738f42;hp=2848f737b02f8249c6cffd9e75723a11339d39ab;hpb=33826e397bdecbdcef6d8d04b944733676b794e1;p=config%2Fdotfiles.git diff --git a/shell/aliases.in b/shell/aliases.in index 2848f73..69270cc 100644 --- a/shell/aliases.in +++ b/shell/aliases.in @@ -37,14 +37,15 @@ alias gri='grep -i' alias grr='grep -r' alias grri='grep -ri' alias mc='make clean' -alias mj='make -j' +alias mj='make -j$(nproc)' alias mu=mutt alias rs=reset # like git's reset alias alias sa='ssh-add -t 1h' alias te=tree -# systemd ... (sc is provided as shell script for better completoin) +# systemd ... (sc is provided as shell script for better completion) alias jc=journalctl alias lc=loginctl +alias mc=machinectl unalias mv cp 2>/dev/null @@ -120,4 +121,14 @@ info() { command info "$@" 2>/dev/null | less } +# Using su (or sudo) as root to a less privileged user might allow the other +# user to run arbitrary commands as root. See also Debian bugs #628843 and +# #657784. +if test "`id -u`" -eq 0; then + su() { + echo 'never su as root' >&2 + return 1 + } +fi + # vim: ft=sh