sudo-vl.spec 12 KB

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