Revisión | f43160f3674e83f04d092fade8799263b5d2679f (tree) |
---|---|
Tiempo | 2012-03-18 12:49:04 |
Autor | matsuand <matsuand@user...> |
Commiter | matsuand |
[BLFS] Modified sudo.
@@ -8,16 +8,17 @@ TARGETBALL=$TARGET.tar.gz | ||
8 | 8 | TARGETDIR=$TARGET |
9 | 9 | |
10 | 10 | echo Check Required... |
11 | -./_checkRequired.sh || exit 1 | |
11 | +./_checkRequired.sh Linux-PAM || exit 1 | |
12 | 12 | |
13 | 13 | echo Check Options... |
14 | -. ./_checkOptions.sh Linux-PAM shadow sendmail | |
14 | +. ./_checkOptions.sh shadow sendmail | |
15 | 15 | |
16 | -if [ ${OPTION_LinuxPAM} -eq "1" ]; then | |
17 | - export WITHPAM="" | |
18 | -else | |
19 | - export WITHPAM="--without-pam " | |
20 | -fi | |
16 | +#if [ ${OPTION_LinuxPAM} -eq "1" ]; then | |
17 | +# export WITHPAM="" | |
18 | +#else | |
19 | +# export WITHPAM="--without-pam " | |
20 | +#fi | |
21 | +export WITHPAM="" | |
21 | 22 | |
22 | 23 | if [ ${OPTION_sendmail} -eq "1" ]; then |
23 | 24 | export WITHSENDMAIL="" |
@@ -38,12 +39,9 @@ cd $TARGETDIR | ||
38 | 39 | |
39 | 40 | echo \ \ Configuring... |
40 | 41 | ./configure --prefix=/usr \ |
41 | - --libexecdir=/usr/lib \ | |
42 | - --with-ignore-dot \ | |
42 | + --libexecdir=/usr/lib/sudo \ | |
43 | 43 | --with-all-insults \ |
44 | - --enable-shell-sets-home \ | |
45 | - --disable-root-sudo \ | |
46 | - --with-logfac=auth \ | |
44 | + --with-env-editor \ | |
47 | 45 | $WITHPAM $WITHSENDMAIL \ |
48 | 46 | 1> $LOG/$TARGET.1_conf.log 2>&1 || exit 1 |
49 | 47 |
@@ -55,9 +53,29 @@ echo \ \ Installing... | ||
55 | 53 | paco -p $TARGET "make install" \ |
56 | 54 | 1> $LOG/$TARGET.3_install.log 2>&1 || exit 1 |
57 | 55 | |
58 | -paco -p+ $TARGET "\ | |
59 | -sed -e 's@/su@/sudo@' -e '/pam_rootok/d' \ | |
60 | - /etc/pam.d/su > /etc/pam.d/sudo" | |
56 | +#paco -p+ $TARGET "\ | |
57 | +#sed -e 's@/su@/sudo@' -e '/pam_rootok/d' \ | |
58 | +# /etc/pam.d/su > /etc/pam.d/sudo" | |
59 | + | |
60 | +cat > /etc/pam.d/sudo << "EOF" | |
61 | +# Begin /etc/pam.d/sudo | |
62 | + | |
63 | +# include the default auth settings | |
64 | +auth include system-auth | |
65 | + | |
66 | +# include the default account settings | |
67 | +account include system-account | |
68 | + | |
69 | +# Set default environment variables for the service user | |
70 | +session required pam_env.so | |
71 | + | |
72 | +# include system session defaults | |
73 | +session include system-session | |
74 | + | |
75 | +# End /etc/pam.d/sudo | |
76 | +EOF | |
77 | +chmod 644 /etc/pam.d/sudo | |
78 | +paco -p+ $TARGET "touch /etc/pam.d/sudo" | |
61 | 79 | |
62 | 80 | echo -n \ \ Pacoing:\ && paco -a1 | grep $TARGET || echo none |
63 | 81 |