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