1 |
flameeyes 09/06/23 22:51:11 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: sudo-1.7.2_beta3.ebuild |
5 |
Log: |
6 |
Add the beta version for 1.7.2. |
7 |
(Portage version: 2.2_rc33/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.180 app-admin/sudo/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/sudo/ChangeLog?rev=1.180&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/sudo/ChangeLog?rev=1.180&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/sudo/ChangeLog?r1=1.179&r2=1.180 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/app-admin/sudo/ChangeLog,v |
19 |
retrieving revision 1.179 |
20 |
retrieving revision 1.180 |
21 |
diff -u -r1.179 -r1.180 |
22 |
--- ChangeLog 19 Jun 2009 21:06:45 -0000 1.179 |
23 |
+++ ChangeLog 23 Jun 2009 22:51:11 -0000 1.180 |
24 |
@@ -1,6 +1,12 @@ |
25 |
# ChangeLog for app-admin/sudo |
26 |
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/app-admin/sudo/ChangeLog,v 1.179 2009/06/19 21:06:45 ranger Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/app-admin/sudo/ChangeLog,v 1.180 2009/06/23 22:51:11 flameeyes Exp $ |
29 |
+ |
30 |
+*sudo-1.7.2_beta3 (23 Jun 2009) |
31 |
+ |
32 |
+ 23 Jun 2009; Diego E. Pettenò <flameeyes@g.o> |
33 |
+ +sudo-1.7.2_beta3.ebuild: |
34 |
+ Add the beta version for 1.7.2. |
35 |
|
36 |
19 Jun 2009; Brent Baude <ranger@g.o> sudo-1.7.1-r1.ebuild: |
37 |
stable ppc64, bug 272819 |
38 |
|
39 |
|
40 |
|
41 |
1.1 app-admin/sudo/sudo-1.7.2_beta3.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/sudo/sudo-1.7.2_beta3.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/sudo/sudo-1.7.2_beta3.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: sudo-1.7.2_beta3.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2009 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/app-admin/sudo/sudo-1.7.2_beta3.ebuild,v 1.1 2009/06/23 22:51:11 flameeyes Exp $ |
51 |
|
52 |
inherit eutils pam confutils |
53 |
|
54 |
MY_P=${P/_/} |
55 |
MY_P=${MY_P/beta/b} |
56 |
|
57 |
case "${P}" in |
58 |
*_beta* | *_rc*) |
59 |
uri_prefix=beta/ |
60 |
;; |
61 |
*) |
62 |
uri_prefix="" |
63 |
;; |
64 |
esac |
65 |
|
66 |
DESCRIPTION="Allows users or groups to run commands as other users" |
67 |
HOMEPAGE="http://www.sudo.ws/" |
68 |
SRC_URI="ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz" |
69 |
# Basic license is ISC-style as-is, some files are released under |
70 |
# 3-clause BSD license |
71 |
LICENSE="as-is BSD" |
72 |
SLOT="0" |
73 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" |
74 |
IUSE="pam skey offensive ldap selinux" |
75 |
|
76 |
DEPEND="pam? ( virtual/pam ) |
77 |
ldap? ( |
78 |
>=net-nds/openldap-2.1.30-r1 |
79 |
dev-libs/cyrus-sasl |
80 |
) |
81 |
skey? ( >=sys-auth/skey-1.1.5-r1 ) |
82 |
virtual/editor |
83 |
virtual/mta" |
84 |
RDEPEND="selinux? ( sec-policy/selinux-sudo ) |
85 |
ldap? ( dev-lang/perl ) |
86 |
pam? ( sys-auth/pambase ) |
87 |
${DEPEND}" |
88 |
DEPEND="${DEPEND} sys-devel/bison" |
89 |
|
90 |
S=${WORKDIR}/${MY_P} |
91 |
|
92 |
pkg_setup() { |
93 |
confutils_use_conflict skey pam |
94 |
} |
95 |
|
96 |
src_unpack() { |
97 |
unpack ${A}; cd "${S}" |
98 |
|
99 |
# compatability fix. |
100 |
epatch "${FILESDIR}"/${PN}-skeychallengeargs.diff |
101 |
|
102 |
# additional variables to disallow, should user disable env_reset. |
103 |
|
104 |
# NOTE: this is not a supported mode of operation, these variables |
105 |
# are added to the blacklist as a convenience to administrators |
106 |
# who fail to heed the warnings of allowing untrusted users |
107 |
# to access sudo. |
108 |
# |
109 |
# there is *no possible way* to foresee all attack vectors in |
110 |
# all possible applications that could potentially be used via |
111 |
# sudo, these settings will just delay the inevitable. |
112 |
# |
113 |
# that said, I will accept suggestions for variables that can |
114 |
# be misused in _common_ interpreters or libraries, such as |
115 |
# perl, bash, python, ruby, etc., in the hope of dissuading |
116 |
# a casual attacker. |
117 |
|
118 |
# XXX: perl should be using suid_perl. |
119 |
# XXX: users can remove/add more via env_delete and env_check. |
120 |
# XXX: <?> = probably safe enough for most circumstances. |
121 |
|
122 |
einfo "Blacklisting common variables (env_delete)..." |
123 |
sudo_bad_var() { |
124 |
local target='env.c' marker='\*initial_badenv_table\[\]' |
125 |
|
126 |
ebegin " $1" |
127 |
sed -i 's#\(^.*'${marker}'.*$\)#\1\n\t"'${1}'",#' "${S}"/${target} |
128 |
eend $? |
129 |
} |
130 |
|
131 |
sudo_bad_var 'PERLIO_DEBUG' # perl, write debug to file. |
132 |
sudo_bad_var 'FPATH' # ksh, search path for functions. |
133 |
sudo_bad_var 'NULLCMD' # zsh, command on null-redir. <?> |
134 |
sudo_bad_var 'READNULLCMD' # zsh, command on null-redir. <?> |
135 |
sudo_bad_var 'GLOBIGNORE' # bash, glob paterns to ignore. <?> |
136 |
sudo_bad_var 'PYTHONHOME' # python, module search path. |
137 |
sudo_bad_var 'PYTHONPATH' # python, search path. |
138 |
sudo_bad_var 'PYTHONINSPECT' # python, allow inspection. |
139 |
sudo_bad_var 'RUBYLIB' # ruby, lib load path. |
140 |
sudo_bad_var 'RUBYOPT' # ruby, cl options. |
141 |
sudo_bad_var 'ZDOTDIR' # zsh, path to search for dotfiles. |
142 |
einfo "...done." |
143 |
|
144 |
# prevent binaries from being stripped. |
145 |
sed -i 's/\($(INSTALL).*\) -s \(.*[(sudo|visudo)]\)/\1 \2/g' Makefile.in |
146 |
|
147 |
# remove useless c++ checks |
148 |
epunt_cxx |
149 |
} |
150 |
|
151 |
src_compile() { |
152 |
local line ROOTPATH |
153 |
|
154 |
# FIXME: secure_path is a compile time setting. using ROOTPATH |
155 |
# is not perfect, env-update may invalidate this, but until it |
156 |
# is available as a sudoers setting this will have to do. |
157 |
einfo "Setting secure_path..." |
158 |
|
159 |
# why not use grep? variable might be expanded from other variables |
160 |
# declared in that file. cannot just source the file, would override |
161 |
# any variables already set. |
162 |
eval `PS4= bash -x /etc/profile.env 2>&1 | \ |
163 |
while read line; do |
164 |
case $line in |
165 |
ROOTPATH=*) echo $line; break;; |
166 |
*) continue;; |
167 |
esac |
168 |
done` && einfo " Found ROOTPATH..." || \ |
169 |
ewarn " Failed to find ROOTPATH, please report this." |
170 |
|
171 |
# remove duplicate path entries from $1 |
172 |
cleanpath() { |
173 |
local i=1 x n IFS=: |
174 |
local -a paths; paths=($1) |
175 |
|
176 |
for ((n=${#paths[*]}-1;i<=n;i++)); do |
177 |
for ((x=0;x<i;x++)); do |
178 |
test "${paths[i]}" == "${paths[x]}" && { |
179 |
einfo " Duplicate entry ${paths[i]} removed..." 1>&2 |
180 |
unset paths[i]; continue 2; } |
181 |
done; # einfo " Adding ${paths[i]}..." 1>&2 |
182 |
done; echo "${paths[*]}" |
183 |
} |
184 |
|
185 |
ROOTPATH=$(cleanpath /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin${ROOTPATH:+:${ROOTPATH}}) |
186 |
|
187 |
# strip gcc path (bug #136027) |
188 |
rmpath() { |
189 |
declare e newpath oldpath=${!1} PATHvar=$1 thisp IFS=: |
190 |
shift |
191 |
for thisp in $oldpath; do |
192 |
for e; do [[ $thisp == $e ]] && continue 2; done |
193 |
newpath=$newpath:$thisp |
194 |
done |
195 |
eval $PATHvar='${newpath#:}' |
196 |
} |
197 |
|
198 |
rmpath ROOTPATH '*/gcc-bin/*' |
199 |
|
200 |
einfo "...done." |
201 |
|
202 |
# XXX: --disable-path-info closes an info leak, but may be confusing. |
203 |
# XXX: /bin/vi may not be available, make nano visudo's default. |
204 |
econf --with-secure-path="${ROOTPATH}" \ |
205 |
--with-editor=/bin/nano \ |
206 |
--with-env-editor \ |
207 |
$(use_with offensive insults) \ |
208 |
$(use_with offensive all-insults) \ |
209 |
$(use_with pam) \ |
210 |
$(use_with skey) \ |
211 |
$(use_with ldap ldap_conf_file /etc/ldap.conf.sudo) \ |
212 |
$(use_with ldap) || die |
213 |
|
214 |
emake || die |
215 |
} |
216 |
|
217 |
src_install() { |
218 |
emake DESTDIR="${D}" install || die |
219 |
dodoc ChangeLog HISTORY PORTING README TROUBLESHOOTING \ |
220 |
UPGRADE WHATSNEW sample.sudoers sample.syslog.conf |
221 |
|
222 |
if use ldap; then |
223 |
dodoc README.LDAP schema.OpenLDAP |
224 |
dosbin sudoers2ldif |
225 |
|
226 |
cat - > "${T}"/ldap.conf.sudo <<EOF |
227 |
# See ldap.conf(5) and README.LDAP for details\n" |
228 |
# This file should only be readable by root\n\n" |
229 |
# supported directives: host, port, ssl, ldap_version\n" |
230 |
# uri, binddn, bindpw, sudoers_base, sudoers_debug\n" |
231 |
# tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key |
232 |
EOF |
233 |
|
234 |
insinto /etc |
235 |
doins "${T}"/ldap.conf.sudo |
236 |
fperms 0440 /etc/ldap.conf.sudo |
237 |
fi |
238 |
|
239 |
pamd_mimic system-auth sudo auth account password session |
240 |
|
241 |
insinto /etc |
242 |
doins "${S}"/sudoers |
243 |
fperms 0440 /etc/sudoers |
244 |
} |
245 |
|
246 |
pkg_postinst() { |
247 |
if use ldap; then |
248 |
ewarn |
249 |
ewarn "sudo uses the /etc/ldap.conf.sudo file for ldap configuration." |
250 |
ewarn |
251 |
if egrep -q '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf; then |
252 |
ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly" |
253 |
ewarn "configured in /etc/nsswitch.conf." |
254 |
ewarn |
255 |
ewarn "To make use of LDAP, add this line to your /etc/nsswitch.conf:" |
256 |
ewarn " sudoers: ldap files" |
257 |
ewarn |
258 |
fi |
259 |
fi |
260 |
} |