sudo-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. Summary: Allows command execution as root for specified users
  2. Summary(ja): スーパーユーザ権限でのコマンドの実行
  3. Name: sudo
  4. Version: 1.9.14p3
  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. * Thu Sep 28 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.14p3-1
  172. - updated to 1.9.14p3.
  173. * Wed Mar 15 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.13p3-1
  174. - updated to 1.9.13p3.
  175. * Sat Jan 28 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.12p2-1
  176. - updated to 1.9.12p2.
  177. * Fri Nov 11 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.12p1-1
  178. - updated to 1.9.12p1.
  179. * Thu Nov 03 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.12-1
  180. - updated to 1.9.12.
  181. - added sudo-devel.
  182. * Sat Oct 09 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.8p2-1
  183. - updated to 1.9.8p2.
  184. - built with openssl-3.0.0.
  185. * Tue Jun 08 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.7-1
  186. - updated to 1.9.7.
  187. - updated Patch1.
  188. * Sat Jan 30 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.5p2-1
  189. - updated to 1.9.5p2.
  190. * Fri Jan 15 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.5p1-1
  191. - updated to 1.9.5p1.
  192. * Tue Feb 11 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.31-1
  193. - updated to 1.8.31.
  194. * Wed Jan 08 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.30-1
  195. - updated to 1.8.30.
  196. * Tue Oct 15 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.28-1
  197. - updated to 1.8.28.
  198. - dropped Patch2.
  199. * Sat Jul 23 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.17p1-1
  200. - updated to 1.8.17p1.
  201. - added Patch2.
  202. - dropped Patch4.
  203. * Mon Feb 3 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.8.6p8-1
  204. - update to 1.8.6p8
  205. * Mon Mar 04 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.6p7-3
  206. - fix permission of sudoreplay
  207. * Mon Mar 04 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.6p7-2
  208. - add /var/log/sudo-io
  209. - add some comments to default sudoers
  210. * Mon Mar 04 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.6p7-1
  211. - update to 1.8.6p7
  212. - drop unneeded patches.
  213. * Sat May 19 2012 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p7-5
  214. - add patch120 for fix CVE-2012-2337 (netmask match)
  215. * Fri Jun 03 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.7.2p7-4
  216. - update sudoers
  217. - enable "%wheel ALL=(ALL) ALL" by default.
  218. * Thu Feb 10 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p7-3
  219. - add patch110,111 for fix CVE-2011-0010 ("-g" option)
  220. * Wed Sep 8 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p7-2
  221. - add Patch100 for fix CVE-2010-2956 (sudo Runas)
  222. - add _smp_mflags flag into make section
  223. - fix doc filelist (no longer exist BUGS, CHANGSE)
  224. * Sun Jun 20 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p7-1
  225. - new upstream release with security fix (CVE-2010-1646)
  226. - change specfile name (-vl)
  227. * Sun Apr 25 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p6-1
  228. - new upstream release with security fix (CVE-2010-1163)
  229. - add sudoers.ldap.5 into files section
  230. * Wed Feb 24 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p4-1
  231. - new upstream release with security fix (CVE-2010-0426)
  232. - update Patch3
  233. * Wed Jul 15 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.7.2-1
  234. - new upstream release
  235. * Wed Jun 17 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.7.1-1
  236. - new upstream release
  237. - update patches
  238. - disable "Defaults requiretty"
  239. * Fri Feb 13 2009 NAKAMURA Kenta <kenta@vinelinux.org> 1.6.9p20-2
  240. - rebuilt with openldap-2.4.11
  241. * Thu Feb 12 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.6.9p20-1
  242. - new upstream release with security fix (CVE 2009-0034)
  243. * Sat Aug 16 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.9p17-1
  244. - new upstream release
  245. - merge some changes from fedoraproject
  246. - include [sudo] in password prompt
  247. - compiled with secure path
  248. - also use getgrouplist() to determine group membership
  249. - add sudoers file
  250. - add command aliases, default environment config
  251. - build with openldap
  252. * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 1.6.8p12-1vl5
  253. - applied new versioning policy, spec in utf-8
  254. * Fri May 19 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.8p12-0vl2
  255. - change PAM configuration to use system-auth
  256. - add --with-ignore-dot, --with-editor and --with-env-editor to
  257. configure option.
  258. * Mon Jan 23 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.6.8p12-0vl1
  259. - new upstream release (included security fix)
  260. - add patch1 for fix CVE-2006-0151
  261. * Mon May 09 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.8p8-0vl1
  262. - new upstream release
  263. - use macros
  264. - build with pam
  265. * Wed Jan 19 2005 IWAI, Masaharu <iwai@alib.jp> 1.6.8p6-0vl1
  266. - new upstream release
  267. * Sun Oct 10 2004 IWAI, Masaharu <iwai@alib.jp> 1.6.8p1-0vl1
  268. - SECURITY FIX: new upstream release
  269. - update rpmnonroot.patch ( Patch0 )
  270. - add new man page: sudoedit(8)
  271. * Wed Sep 1 2004 IWAI, Masaharu <iwai@alib.jp> 1.6.8-0vl1
  272. - new upstream release
  273. - update rpmnonroot.patch ( Patch0 )
  274. - change Copyrigh tag to License tag
  275. - update License
  276. - update URL and Source0: official web site moved.
  277. - new files: %%{_bindir}/sudoedit and %%{_libexecdir}/sudo_noexec.*
  278. * Mon Apr 14 2003 IWAI Masaharu <iwai@alib.jp> 1.6.7p3-0vl1
  279. - upstream release
  280. * Wed May 08 2002 Satoshi MACHINO <machino@vinelinux.org> 1.6.6-0vl3
  281. - fixed changelog
  282. -- don't expand macros in changelog ;P
  283. * Wed May 01 2002 Satoshi MACHINO <machino@vinelinux.org> 1.6.6-0vl2
  284. - changed to use configure in build section
  285. (can't build on sparc)
  286. * Fri Apr 26 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.6-0vl1
  287. - upstream release
  288. - fix security hole : buffer over flow
  289. * Thu Jan 24 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.5p2-0vl1
  290. - upstream release
  291. - updated sudo.rpmnonroot.diff
  292. * Fri Jan 18 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.5p1-0vl1
  293. - upstream release
  294. - added configure script option '--disable-root-mailer'
  295. * Tue Jan 15 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.4p1-0vl1
  296. - upstream release
  297. - eliminated FAQ from %doc
  298. * Mon Jan 14 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.4-0vl1
  299. - upstream release
  300. - added noreplace flag (%{_sysconfdir}/sudoers file is not replaced)
  301. - updated sudo.rpmnonroot.diff
  302. * Wed May 09 2001 <sagami@vinelinux.org>
  303. - 1.6.3p7-0vl2: follow up 1.6.2p6-0.6vl1
  304. * Fri Mar 02 2001 sagami@vinelinux.org
  305. - 1.6.3p7-0vl1
  306. - use better macros
  307. * Thu Mar 1 2001 Kunio Murasawa <murasawa@marineroad.com>
  308. - 1.6.3p6-0vl1
  309. - changed sudo.rpmnonroot.diff for 1.6.3p6
  310. * Tue Sep 19 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  311. - 1.6.1-2vl5
  312. - patch -p1 -> patch -p0
  313. * Mon Sep 18 2000 MATSUMOTO Shoji <shom@vinelinux.org>
  314. - 1.6.1-2vl4
  315. - fix uid/gid to root.root
  316. - add sudo.rpmnonroot.diff to built by non-root users
  317. * Tue Sep 12 2000 Jun Nishii <jun@vinelinux.org>
  318. - 1.6.1-2vl3
  319. - fix attr
  320. * Sun Sep 10 2000 Jun Nishii <jun@vinelinux.org>
  321. - 1.6.1-2vl2
  322. - enable to build by non-root useres
  323. * Fri Sep 08 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  324. - 1.6.1-2vl1
  325. - modified %files section to handle compressed man page(s)
  326. * Fri Jan 7 2000 Jun Nishii <jun@vinelinux.org>
  327. - change group
  328. * Thu Dec 30 1999 Jun Nishii <jun@vinelinux.org>
  329. - version 1.6.1
  330. - build for Vine Linux 2.0
  331. * Fri May 14 1999 Takeda Eiji <keda@flatout.org>
  332. - sudo reads $BuildRoot%{_sysconfdir}/sudoers. Make change to read /etc/sudoers.
  333. * Wed Apr 21 1999 Hiroto Watanabe <watanabe@cij.co.jp>
  334. - Initial Release