sudo-vl.spec 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. Summary: Allows command execution as root for specified users
  2. Summary(ja): スーパーユーザ権限でのコマンドの実行
  3. Name: sudo
  4. Version: 1.9.12p1
  5. Release: 1%{?_dist_release}
  6. Group: system
  7. Vendor: Project Vine
  8. Distribution: Vine Linux
  9. License: ISC-style
  10. URL: https://www.sudo.ws/sudo/
  11. Source0: http://www.sudo.ws/sudo/dist/sudo-%{version}.tar.gz
  12. Source1: sudo-sudoers-vine
  13. # don't strip
  14. Patch1: sudo-1.9.7-strip.patch
  15. Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
  16. BuildRequires: pam-devel
  17. BuildRequires: groff
  18. BuildRequires: flex
  19. BuildRequires: bison
  20. BuildRequires: openldap-devel
  21. BuildRequires: automake autoconf libtool
  22. BuildRequires: libcap-devel
  23. BuildRequires: zlib-devel
  24. %description
  25. Sudo (superuser do) allows a system administrator to give certain users
  26. (or groups of users) the ability to run some (or all) commands as root while
  27. logging all commands and arguments. Sudo operates on a per-command basis,
  28. it is not a replacement for the shell.
  29. %description -l ja
  30. sudo は、特定のユーザや特定のグループに所属するユーザが、スーパーユーザ権限で
  31. いくつかのコマンド操作を行うことを許可するためのプログラムです。
  32. %package devel
  33. Summary: Development files for %{name}
  34. Group: programming
  35. Requires: %{name} = %{version}-%{release}
  36. %description devel
  37. The %{name}-devel package contains header files developing sudo
  38. plugins that use %{name}.
  39. %package logsrvd
  40. Summary: High-performance log server for %{name}
  41. Group: system,servers
  42. Requires: %{name} = %{version}-%{release}
  43. BuildRequires: openssl-devel
  44. %description logsrvd
  45. %{name}-logsrvd is a high-performance log server that accepts event and
  46. I/O logs from sudo.
  47. It can be used to implement centralized logging of sudo logs.
  48. %debug_package
  49. %prep
  50. %setup -q
  51. %autopatch -p1
  52. rm -rf zlib/
  53. %build
  54. autoreconf -I m4 -fv --install
  55. F_PIE=-fpie
  56. export CFLAGS="$RPM_OPT_FLAGS $F_PIE" LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now"
  57. %configure \
  58. --prefix=%{_prefix} \
  59. --sbindir=%{_sbindir} \
  60. --libdir=%{_libdir} \
  61. --sysconfdir=%{_sysconfdir} \
  62. --docdir=%{_datadir}/doc/%{name}-%{version} \
  63. --with-iologdir=/var/log/sudo-io \
  64. --with-pam \
  65. --with-pam-login \
  66. --with-logging=syslog \
  67. --with-logfac=authpriv \
  68. --with-tty-tickets \
  69. --with-ignore-dot \
  70. --with-editor=/bin/vi \
  71. --with-env-editor \
  72. --with-ldap \
  73. --with-passprompt="[sudo] password for %p: " \
  74. --with-secure-path="/sbin:/bin:/usr/sbin:/usr/bin" \
  75. --without-interfaces \
  76. --without-selinux
  77. make %{?_smp_mflags}
  78. %install
  79. rm -rf %{buildroot}
  80. mkdir %{buildroot}
  81. %make_install \
  82. install_uid=`id -u` install_gid=`id -g` \
  83. sudoers_uid=`id -u` sudoers_gid=`id -g`
  84. chmod 755 %{buildroot}%{_bindir}/* %{buildroot}%{_sbindir}/*
  85. install -p -d -m 700 %{buildroot}/var/run/sudo
  86. install -p -d -m 700 %{buildroot}/var/db/sudo/lectured
  87. install -p -d -m 700 %{buildroot}/var/log/sudo-io
  88. install -p -d -m 750 %{buildroot}/etc/sudoers.d
  89. install -p -c -m 0440 %{SOURCE1} %{buildroot}/etc/sudoers
  90. chmod +x %{buildroot}%{_libexecdir}/sudo/*.so # for stripping, reset in %%files
  91. mv -f %{buildroot}%{_docdir}/sudo-%{version} docdir
  92. mv -f %{buildroot}%{_sysconfdir}/sudoers.dist docdir/
  93. rm -f docdir/LICENSE*
  94. #Remove all .la files
  95. find %{buildroot} -name '*.la' -exec rm -f {} ';'
  96. %find_lang sudo
  97. %find_lang sudoers
  98. cat sudo.lang sudoers.lang > sudo_all.lang
  99. rm sudo.lang sudoers.lang
  100. mkdir -p %{buildroot}/etc/pam.d
  101. cat > %{buildroot}/etc/pam.d/sudo << EOF
  102. #%PAM-1.0
  103. auth include system-auth
  104. account include system-auth
  105. password include system-auth
  106. session optional pam_keyinit.so revoke
  107. session required pam_limits.so
  108. session include system-auth
  109. EOF
  110. cat > %{buildroot}/etc/pam.d/sudo-i << EOF
  111. #%PAM-1.0
  112. auth include sudo
  113. account include sudo
  114. password include sudo
  115. session optional pam_keyinit.so force revoke
  116. session include sudo
  117. EOF
  118. %clean
  119. rm -rf %{buildroot}
  120. %post
  121. /bin/chmod 0440 /etc/sudoers || :
  122. %files -f sudo_all.lang
  123. %defattr(-,root,root)
  124. %license LICENSE.md
  125. %doc docdir/*
  126. %attr(0640,root,root) %config(noreplace) /etc/sudo.conf
  127. %attr(0440,root,root) %config(noreplace) /etc/sudoers
  128. %attr(0750,root,root) %dir /etc/sudoers.d/
  129. %config(noreplace) /etc/pam.d/sudo
  130. %config(noreplace) /etc/pam.d/sudo-i
  131. %dir /var/run/sudo
  132. %dir /var/db/sudo
  133. %dir /var/db/sudo/lectured
  134. %attr(0750,root,root) %dir /var/log/sudo-io
  135. %{_bindir}/cvtsudoers
  136. %attr(4111,root,root) %{_bindir}/sudo
  137. %{_bindir}/sudoedit
  138. %attr(0111,root,root) %{_bindir}/sudoreplay
  139. %attr(0755,root,root) %{_sbindir}/visudo
  140. %dir %{_libexecdir}/sudo
  141. %attr(0644,root,root) %{_libexecdir}/sudo/audit_json.so
  142. %attr(0644,root,root) %{_libexecdir}/sudo/sudo_intercept.so
  143. %attr(0644,root,root) %{_libexecdir}/sudo/sudo_noexec.so
  144. %attr(0644,root,root) %{_libexecdir}/sudo/sudoers.so
  145. %attr(0644,root,root) %{_libexecdir}/sudo/group_file.so
  146. #%attr(0644,root,root) %{_libexecdir}/sudo/sample_approval.so
  147. %attr(0644,root,root) %{_libexecdir}/sudo/system_group.so
  148. %attr(0644,root,root) %{_libexecdir}/sudo/libsudo_util.so.?.?.?
  149. %{_libexecdir}/sudo/libsudo_util.so.?
  150. %{_libexecdir}/sudo/libsudo_util.so
  151. %{_mandir}/man1/cvtsudoers.1*
  152. %{_mandir}/man5/sudoers*.5*
  153. %{_mandir}/man5/sudo.conf.5*
  154. %{_mandir}/man8/sudo.8*
  155. %{_mandir}/man8/sudoedit.8*
  156. %{_mandir}/man8/sudoreplay.8*
  157. %{_mandir}/man8/visudo.8*
  158. %files devel
  159. %doc plugins/sample/sample_plugin.c
  160. %{_includedir}/sudo_plugin.h
  161. %{_mandir}/man5/sudo_plugin.5*
  162. %files logsrvd
  163. %attr(0640,root,root) %config(noreplace) /etc/sudo_logsrvd.conf
  164. %attr(0755,root,root) %{_sbindir}/sudo_logsrvd
  165. %attr(0755,root,root) %{_sbindir}/sudo_sendlog
  166. %{_mandir}/man5/sudo_logsrv.proto.5.gz
  167. %{_mandir}/man5/sudo_logsrvd.conf.5.gz
  168. %{_mandir}/man8/sudo_logsrvd.8.gz
  169. %{_mandir}/man8/sudo_sendlog.8.gz
  170. %changelog
  171. * Fri Nov 11 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.12p1-1
  172. - updated to 1.9.12p1.
  173. * Thu Nov 03 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.12-1
  174. - updated to 1.9.12.
  175. - added sudo-devel.
  176. * Sat Oct 09 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.8p2-1
  177. - updated to 1.9.8p2.
  178. - built with openssl-3.0.0.
  179. * Tue Jun 08 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.7-1
  180. - updated to 1.9.7.
  181. - updated Patch1.
  182. * Sat Jan 30 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.5p2-1
  183. - updated to 1.9.5p2.
  184. * Fri Jan 15 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.5p1-1
  185. - updated to 1.9.5p1.
  186. * Tue Feb 11 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.31-1
  187. - updated to 1.8.31.
  188. * Wed Jan 08 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.30-1
  189. - updated to 1.8.30.
  190. * Tue Oct 15 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.28-1
  191. - updated to 1.8.28.
  192. - dropped Patch2.
  193. * Sat Jul 23 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.17p1-1
  194. - updated to 1.8.17p1.
  195. - added Patch2.
  196. - dropped Patch4.
  197. * Mon Feb 3 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.8.6p8-1
  198. - update to 1.8.6p8
  199. * Mon Mar 04 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.6p7-3
  200. - fix permission of sudoreplay
  201. * Mon Mar 04 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.6p7-2
  202. - add /var/log/sudo-io
  203. - add some comments to default sudoers
  204. * Mon Mar 04 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.6p7-1
  205. - update to 1.8.6p7
  206. - drop unneeded patches.
  207. * Sat May 19 2012 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p7-5
  208. - add patch120 for fix CVE-2012-2337 (netmask match)
  209. * Fri Jun 03 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.7.2p7-4
  210. - update sudoers
  211. - enable "%wheel ALL=(ALL) ALL" by default.
  212. * Thu Feb 10 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p7-3
  213. - add patch110,111 for fix CVE-2011-0010 ("-g" option)
  214. * Wed Sep 8 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p7-2
  215. - add Patch100 for fix CVE-2010-2956 (sudo Runas)
  216. - add _smp_mflags flag into make section
  217. - fix doc filelist (no longer exist BUGS, CHANGSE)
  218. * Sun Jun 20 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p7-1
  219. - new upstream release with security fix (CVE-2010-1646)
  220. - change specfile name (-vl)
  221. * Sun Apr 25 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p6-1
  222. - new upstream release with security fix (CVE-2010-1163)
  223. - add sudoers.ldap.5 into files section
  224. * Wed Feb 24 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p4-1
  225. - new upstream release with security fix (CVE-2010-0426)
  226. - update Patch3
  227. * Wed Jul 15 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.7.2-1
  228. - new upstream release
  229. * Wed Jun 17 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.7.1-1
  230. - new upstream release
  231. - update patches
  232. - disable "Defaults requiretty"
  233. * Fri Feb 13 2009 NAKAMURA Kenta <kenta@vinelinux.org> 1.6.9p20-2
  234. - rebuilt with openldap-2.4.11
  235. * Thu Feb 12 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.6.9p20-1
  236. - new upstream release with security fix (CVE 2009-0034)
  237. * Sat Aug 16 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.9p17-1
  238. - new upstream release
  239. - merge some changes from fedoraproject
  240. - include [sudo] in password prompt
  241. - compiled with secure path
  242. - also use getgrouplist() to determine group membership
  243. - add sudoers file
  244. - add command aliases, default environment config
  245. - build with openldap
  246. * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 1.6.8p12-1vl5
  247. - applied new versioning policy, spec in utf-8
  248. * Fri May 19 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.8p12-0vl2
  249. - change PAM configuration to use system-auth
  250. - add --with-ignore-dot, --with-editor and --with-env-editor to
  251. configure option.
  252. * Mon Jan 23 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.6.8p12-0vl1
  253. - new upstream release (included security fix)
  254. - add patch1 for fix CVE-2006-0151
  255. * Mon May 09 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.8p8-0vl1
  256. - new upstream release
  257. - use macros
  258. - build with pam
  259. * Wed Jan 19 2005 IWAI, Masaharu <iwai@alib.jp> 1.6.8p6-0vl1
  260. - new upstream release
  261. * Sun Oct 10 2004 IWAI, Masaharu <iwai@alib.jp> 1.6.8p1-0vl1
  262. - SECURITY FIX: new upstream release
  263. - update rpmnonroot.patch ( Patch0 )
  264. - add new man page: sudoedit(8)
  265. * Wed Sep 1 2004 IWAI, Masaharu <iwai@alib.jp> 1.6.8-0vl1
  266. - new upstream release
  267. - update rpmnonroot.patch ( Patch0 )
  268. - change Copyrigh tag to License tag
  269. - update License
  270. - update URL and Source0: official web site moved.
  271. - new files: %%{_bindir}/sudoedit and %%{_libexecdir}/sudo_noexec.*
  272. * Mon Apr 14 2003 IWAI Masaharu <iwai@alib.jp> 1.6.7p3-0vl1
  273. - upstream release
  274. * Wed May 08 2002 Satoshi MACHINO <machino@vinelinux.org> 1.6.6-0vl3
  275. - fixed changelog
  276. -- don't expand macros in changelog ;P
  277. * Wed May 01 2002 Satoshi MACHINO <machino@vinelinux.org> 1.6.6-0vl2
  278. - changed to use configure in build section
  279. (can't build on sparc)
  280. * Fri Apr 26 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.6-0vl1
  281. - upstream release
  282. - fix security hole : buffer over flow
  283. * Thu Jan 24 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.5p2-0vl1
  284. - upstream release
  285. - updated sudo.rpmnonroot.diff
  286. * Fri Jan 18 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.5p1-0vl1
  287. - upstream release
  288. - added configure script option '--disable-root-mailer'
  289. * Tue Jan 15 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.4p1-0vl1
  290. - upstream release
  291. - eliminated FAQ from %doc
  292. * Mon Jan 14 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.4-0vl1
  293. - upstream release
  294. - added noreplace flag (%{_sysconfdir}/sudoers file is not replaced)
  295. - updated sudo.rpmnonroot.diff
  296. * Wed May 09 2001 <sagami@vinelinux.org>
  297. - 1.6.3p7-0vl2: follow up 1.6.2p6-0.6vl1
  298. * Fri Mar 02 2001 sagami@vinelinux.org
  299. - 1.6.3p7-0vl1
  300. - use better macros
  301. * Thu Mar 1 2001 Kunio Murasawa <murasawa@marineroad.com>
  302. - 1.6.3p6-0vl1
  303. - changed sudo.rpmnonroot.diff for 1.6.3p6
  304. * Tue Sep 19 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  305. - 1.6.1-2vl5
  306. - patch -p1 -> patch -p0
  307. * Mon Sep 18 2000 MATSUMOTO Shoji <shom@vinelinux.org>
  308. - 1.6.1-2vl4
  309. - fix uid/gid to root.root
  310. - add sudo.rpmnonroot.diff to built by non-root users
  311. * Tue Sep 12 2000 Jun Nishii <jun@vinelinux.org>
  312. - 1.6.1-2vl3
  313. - fix attr
  314. * Sun Sep 10 2000 Jun Nishii <jun@vinelinux.org>
  315. - 1.6.1-2vl2
  316. - enable to build by non-root useres
  317. * Fri Sep 08 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  318. - 1.6.1-2vl1
  319. - modified %files section to handle compressed man page(s)
  320. * Fri Jan 7 2000 Jun Nishii <jun@vinelinux.org>
  321. - change group
  322. * Thu Dec 30 1999 Jun Nishii <jun@vinelinux.org>
  323. - version 1.6.1
  324. - build for Vine Linux 2.0
  325. * Fri May 14 1999 Takeda Eiji <keda@flatout.org>
  326. - sudo reads $BuildRoot%{_sysconfdir}/sudoers. Make change to read /etc/sudoers.
  327. * Wed Apr 21 1999 Hiroto Watanabe <watanabe@cij.co.jp>
  328. - Initial Release