1 |
shlomif |
152774 |
Name: sudo |
2 |
joequant |
1474719 |
Version: 1.8.29 |
3 |
luigiwalser |
1345681 |
Release: %mkrel 1 |
4 |
shlomif |
152774 |
Epoch: 1 |
5 |
|
|
Summary: Allows command execution as root for specified users |
6 |
|
|
License: GPLv2+ |
7 |
|
|
Group: System/Base |
8 |
|
|
URL: http://www.sudo.ws/sudo |
9 |
luigiwalser |
400679 |
Source0: http://www.sudo.ws/sudo/dist/%{name}-%{version}%{?pre}.tar.gz |
10 |
|
|
Source1: http://www.sudo.ws/sudo/dist/%{name}-%{version}%{?pre}.tar.gz.sig |
11 |
shlomif |
152774 |
Source2: sudo.pamd |
12 |
tv |
1052891 |
Source3: sudoers |
13 |
shlomif |
152774 |
Patch1: sudo-1.6.7p5-strip.patch |
14 |
|
|
Patch2: sudo-1.7.2p1-envdebug.patch |
15 |
ovitters |
1146690 |
BuildRequires: pkgconfig(audit) |
16 |
shlomif |
152774 |
BuildRequires: bison |
17 |
|
|
BuildRequires: groff-for-man |
18 |
ovitters |
1146690 |
BuildRequires: pkgconfig(libcap) |
19 |
shlomif |
152774 |
BuildRequires: openldap-devel |
20 |
|
|
BuildRequires: pam-devel |
21 |
|
|
Requires(pre): openldap |
22 |
tmb |
1178156 |
# for create_ghostfile in post |
23 |
|
|
Requires(post): rpm-helper |
24 |
blino |
17466 |
|
25 |
|
|
%description |
26 |
luigiwalser |
275808 |
Sudo (superuser do) allows a system administrator to give certain users (or |
27 |
|
|
groups of users) the ability to run some (or all) commands as root while |
28 |
|
|
logging all commands and arguments. Sudo operates on a per-command basis. |
29 |
|
|
It is not a replacement for the shell. Features include: the ability to |
30 |
|
|
restrict what commands a user may run on a per-host basis, copious logging |
31 |
|
|
of each command (providing a clear audit trail of who did what), a |
32 |
|
|
configurable timeout of the sudo command, and the ability to use the same |
33 |
|
|
configuration file (sudoers) on many different machines. |
34 |
blino |
17466 |
|
35 |
boklm |
74479 |
%package devel |
36 |
shlomif |
152774 |
Summary: Development files for sudo plugins |
37 |
|
|
Group: Development/C |
38 |
luigiwalser |
275808 |
Requires: %{name} = %{epoch}:%{version}-%{release} |
39 |
boklm |
74479 |
|
40 |
shlomif |
152774 |
%description devel |
41 |
boklm |
74479 |
Development files for compiling sudo plugins. |
42 |
|
|
|
43 |
blino |
17466 |
%prep |
44 |
|
|
%setup -q -n %{name}-%{version}%{?pre} |
45 |
|
|
%patch1 -p1 -b .strip |
46 |
|
|
%patch2 -p1 -b .envdebug |
47 |
|
|
|
48 |
luigiwalser |
275808 |
# fix attribs |
49 |
|
|
find -name "Makefile.*" | xargs perl -pi -e "s|-m 0444|-m 0644|g" |
50 |
|
|
|
51 |
|
|
|
52 |
blino |
17466 |
%build |
53 |
|
|
# handle newer autoconf |
54 |
|
|
rm -f acsite.m4 |
55 |
|
|
mv aclocal.m4 acinclude.m4 |
56 |
|
|
autoreconf -fv --install |
57 |
|
|
|
58 |
|
|
%serverbuild |
59 |
|
|
export CFLAGS="%{optflags} -D_GNU_SOURCE" |
60 |
|
|
|
61 |
wally |
1481313 |
%configure \ |
62 |
shlomif |
152774 |
--without-rpath \ |
63 |
|
|
--with-logging=both \ |
64 |
blino |
17466 |
--with-logfac=authpriv \ |
65 |
shlomif |
152774 |
--with-logpath=%{_logdir}/sudo.log \ |
66 |
|
|
--with-editor=/bin/vi \ |
67 |
luigiwalser |
1058668 |
--disable-root-mailer \ |
68 |
shlomif |
152774 |
--enable-log-host \ |
69 |
|
|
--with-pam \ |
70 |
|
|
--with-pam-login \ |
71 |
|
|
--with-env-editor \ |
72 |
|
|
--with-noexec=no \ |
73 |
|
|
--with-linux-audit \ |
74 |
blino |
17466 |
--with-ignore-dot \ |
75 |
|
|
--with-tty-tickets \ |
76 |
shlomif |
152774 |
--with-ldap \ |
77 |
luigiwalser |
907732 |
--with-ldap-conf-file=%{_sysconfdir}/nslcd.conf \ |
78 |
|
|
--with-ldap-secret-file=%{_sysconfdir}/nslcd.conf \ |
79 |
shlomif |
152774 |
--with-secure-path="/sbin:%{_sbindir}:/bin:%{_bindir}:/usr/local/bin:/usr/local/sbin" \ |
80 |
pterjan |
340151 |
--with-passprompt="[sudo] password for %p: " \ |
81 |
|
|
--with-plugindir=%{_libdir}/sudo |
82 |
blino |
17466 |
|
83 |
kekepower |
1219835 |
%make_build |
84 |
blino |
17466 |
|
85 |
|
|
%install |
86 |
|
|
install -d %{buildroot}/usr |
87 |
|
|
install -d %{buildroot}%{_sysconfdir}/logrotate.d |
88 |
|
|
install -d %{buildroot}%{_sysconfdir}/sudoers.d |
89 |
|
|
install -d %{buildroot}%{_sysconfdir}/pam.d |
90 |
|
|
install -d %{buildroot}%{_var}/db/sudo |
91 |
luigiwalser |
1043127 |
install -d %{buildroot}%{_var}/db/sudo/lectured |
92 |
blino |
17466 |
install -d %{buildroot}%{_logdir}/sudo |
93 |
|
|
install -d %{buildroot}%{_logdir}/sudo-io |
94 |
|
|
|
95 |
kekepower |
1219835 |
%make_install install_uid=$UID install_gid=$(id -g) sudoers=uid=$UID sudoers_gid=$(id -g) |
96 |
blino |
17466 |
|
97 |
|
|
install -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/sudo |
98 |
|
|
install -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sudoers |
99 |
|
|
|
100 |
|
|
# Installing logrotated file |
101 |
|
|
cat <<END >%{buildroot}%{_sysconfdir}/logrotate.d/sudo |
102 |
|
|
%{_logdir}/sudo.log { |
103 |
|
|
missingok |
104 |
|
|
monthly |
105 |
|
|
compress |
106 |
|
|
} |
107 |
|
|
END |
108 |
|
|
|
109 |
|
|
cat > %{buildroot}%{_sysconfdir}/pam.d/sudo << EOF |
110 |
|
|
#%PAM-1.0 |
111 |
shlomif |
152774 |
auth include system-auth |
112 |
|
|
account include system-auth |
113 |
|
|
password include system-auth |
114 |
|
|
session optional pam_keyinit.so revoke |
115 |
|
|
session required pam_limits.so |
116 |
blino |
17466 |
EOF |
117 |
|
|
|
118 |
|
|
cat > %{buildroot}%{_sysconfdir}/pam.d/sudo-i << EOF |
119 |
|
|
#%PAM-1.0 |
120 |
shlomif |
152774 |
auth include sudo |
121 |
|
|
account include sudo |
122 |
|
|
password include sudo |
123 |
|
|
session optional pam_keyinit.so force revoke |
124 |
|
|
session required pam_limits.so |
125 |
blino |
17466 |
EOF |
126 |
|
|
|
127 |
|
|
# so that strip can touch it... |
128 |
|
|
chmod 755 %{buildroot}%{_bindir}/* |
129 |
|
|
chmod 755 %{buildroot}%{_sbindir}/* |
130 |
|
|
|
131 |
|
|
# (tpg) create the missing log file |
132 |
|
|
touch %{buildroot}%{_logdir}/sudo.log |
133 |
|
|
|
134 |
oden |
814841 |
# move the lib to a common place |
135 |
|
|
mv %{buildroot}%{_libexecdir}/sudo/* %{buildroot}%{_libdir}/ |
136 |
|
|
rm -rf %{buildroot}%{_libexecdir}/sudo |
137 |
|
|
|
138 |
|
|
# cleanup |
139 |
|
|
rm -rf %{buildroot}%{_datadir}/examples samples |
140 |
|
|
cp -rp examples samples |
141 |
|
|
rm -f samples/Makefile* |
142 |
blino |
882305 |
# too big |
143 |
|
|
rm -f %{buildroot}%{_docdir}/%{name}/ChangeLog |
144 |
oden |
814841 |
|
145 |
|
|
find %{buildroot} -type f -name "*.la" | xargs rm |
146 |
|
|
|
147 |
luigiwalser |
275808 |
%find_lang sudo |
148 |
|
|
%find_lang sudoers |
149 |
|
|
|
150 |
|
|
cat sudo.lang sudoers.lang > sudo_all.lang |
151 |
|
|
rm sudo.lang sudoers.lang |
152 |
|
|
|
153 |
fwang |
160282 |
%check |
154 |
kekepower |
1219835 |
%__make check |
155 |
fwang |
160282 |
|
156 |
blino |
17466 |
%post |
157 |
|
|
/bin/chmod 0440 %{_sysconfdir}/sudoers || : |
158 |
|
|
%create_ghostfile %{_logdir}/sudo.log root root 600 |
159 |
|
|
|
160 |
luigiwalser |
275808 |
%files -f sudo_all.lang |
161 |
blino |
882305 |
%doc samples |
162 |
|
|
%{_docdir}/%{name}/CONTRIBUTORS |
163 |
|
|
%{_docdir}/%{name}/LICENSE |
164 |
|
|
%{_docdir}/%{name}/NEWS |
165 |
|
|
%{_docdir}/%{name}/HISTORY |
166 |
|
|
%{_docdir}/%{name}/README |
167 |
|
|
%{_docdir}/%{name}/README.LDAP |
168 |
|
|
%{_docdir}/%{name}/TROUBLESHOOTING |
169 |
|
|
%{_docdir}/%{name}/UPGRADE |
170 |
|
|
%{_docdir}/%{name}/schema.ActiveDirectory |
171 |
|
|
%{_docdir}/%{name}/schema.OpenLDAP |
172 |
|
|
%{_docdir}/%{name}/schema.iPlanet |
173 |
luigiwalser |
1345690 |
%{_docdir}/%{name}/schema.olcSudo |
174 |
luigiwalser |
900136 |
%{_docdir}/%{name}/examples/*.conf |
175 |
|
|
%{_docdir}/%{name}/examples/sudoers |
176 |
blino |
17466 |
%attr(0440,root,root) %config(noreplace) %{_sysconfdir}/sudoers |
177 |
luigiwalser |
1102283 |
%attr(0440,root,root) %config(noreplace) %{_sysconfdir}/sudoers.dist |
178 |
blino |
17466 |
%attr(0750,root,root) %dir %{_sysconfdir}/sudoers.d/ |
179 |
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/sudo |
180 |
|
|
%config(noreplace) %{_sysconfdir}/pam.d/sudo |
181 |
|
|
%config(noreplace) %{_sysconfdir}/pam.d/sudo-i |
182 |
luigiwalser |
1241506 |
%attr(0755,root,root) %{_bindir}/cvtsudoers |
183 |
blino |
17466 |
%attr(4111,root,root) %{_bindir}/sudo |
184 |
luigiwalser |
900114 |
%{_bindir}/sudoedit |
185 |
blino |
17466 |
%attr(0111,root,root) %{_bindir}/sudoreplay |
186 |
|
|
%attr(0755,root,root) %{_sbindir}/visudo |
187 |
|
|
%ghost %{_logdir}/sudo.log |
188 |
|
|
%{_mandir}/*/* |
189 |
|
|
%attr(0700,root,root) %dir %{_var}/db/sudo |
190 |
luigiwalser |
1043126 |
%attr(0700,root,root) %dir %{_var}/db/sudo/lectured |
191 |
blino |
17466 |
%attr(0750,root,root) %dir %{_logdir}/sudo-io |
192 |
oden |
814841 |
%attr(0755,root,root) %{_libdir}/sudo/group_file.so |
193 |
|
|
%attr(0755,root,root) %{_libdir}/sudo/sudoers.so |
194 |
|
|
%attr(0755,root,root) %{_libdir}/sudo/system_group.so |
195 |
luigiwalser |
900114 |
%{_libdir}/libsudo_util.so.0 |
196 |
luigiwalser |
900117 |
%attr(0755,root,root) %{_libdir}/libsudo_util.so.*.* |
197 |
luigiwalser |
900113 |
%{_tmpfilesdir}/sudo.conf |
198 |
blino |
17466 |
|
199 |
luigiwalser |
275808 |
%files devel |
200 |
luigiwalser |
451036 |
%doc plugins/{group_file,sample} |
201 |
boklm |
74479 |
%{_includedir}/sudo_plugin.h |
202 |
luigiwalser |
275808 |
%{_mandir}/man8/sudo_plugin.8* |
203 |
oden |
814841 |
%{_libdir}/libsudo_util.so |