sudo-vl.spec 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. Summary: Allows command execution as root for specified users
  2. Summary(ja): スーパーユーザ権限でのコマンドの実行
  3. Name: sudo
  4. Version: 1.7.2p7
  5. Release: 5%{?_dist_release}
  6. License: ISC-style
  7. Group: Applications/System
  8. URL: http://www.sudo.ws/
  9. Source0: http://www.sudo.ws/sudo/dist/sudo-%{version}.tar.gz
  10. Source1: sudo-sudoers-vine
  11. Patch1: sudo-1.6.7p5-strip.patch
  12. Patch2: sudo-1.7.2-login.patch
  13. Patch3: sudo-1.7.2p4-getgrouplist.patch
  14. Patch4: sudo-1.7.1-envdebug.patch
  15. Patch5: sudo-1.7.1-libtool.patch
  16. # reset HOME when using the -i' option (#635250)
  17. Patch6: sudo-1.7.4p4-sudoi.patch
  18. # security
  19. Patch100: sudo-1.7.2p7_CVE-2010-2956.patch
  20. Patch110: sudo-1.7.2p7_CVE-2011-0010.patch
  21. Patch111: sudo-1.7.2p7_user_in_group.patch
  22. Patch120: sudo-1.7.2p7_CVE-2012-2337.patch
  23. Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
  24. BuildRequires: pam-devel
  25. BuildRequires: groff
  26. BuildRequires: flex
  27. BuildRequires: bison
  28. BuildRequires: openldap-devel
  29. BuildRequires: automake autoconf libtool
  30. BuildRequires: libcap-devel
  31. Vendor: Project Vine
  32. Distribution: Vine Linux
  33. %description
  34. Sudo (superuser do) allows a system administrator to give certain users
  35. (or groups of users) the ability to run some (or all) commands as root while
  36. logging all commands and arguments. Sudo operates on a per-command basis,
  37. it is not a replacement for the shell.
  38. %description -l ja
  39. sudo は、特定のユーザや特定のグループに所属するユーザが、スーパーユーザ権限で
  40. いくつかのコマンド操作を行うことを許可するためのプログラムです。
  41. %prep
  42. %setup -q
  43. %patch1 -p1 -b .strip
  44. %patch2 -p1 -b .login
  45. %patch3 -p1 -b .getgrouplist
  46. %patch4 -p1 -b .envdebug
  47. %patch5 -p1 -b .libtool
  48. %patch100 -p1 -b .CVE-2010-2956
  49. %patch110 -p1 -b .CVE-2011-0010
  50. %patch111 -p1 -b .user_in_group
  51. %patch120 -p1 -b .CVE-2012-2337
  52. libtoolize --force && rm acsite.m4 && mv aclocal.m4 acinclude.m4 && autoreconf
  53. %build
  54. %configure \
  55. --prefix=%{_prefix} \
  56. --sbindir=%{_sbindir} \
  57. --libdir=%{_libdir} \
  58. --sysconfdir=%{_sysconfdir} \
  59. --with-pam \
  60. --with-pam-login \
  61. --with-logging=syslog \
  62. --with-logfac=authpriv \
  63. --with-tty-tickets \
  64. --with-ignore-dot \
  65. --with-editor=/bin/vi \
  66. --with-env-editor \
  67. --with-ldap \
  68. --with-passprompt="[sudo] password for %p: " \
  69. --with-secure-path="/sbin:/bin:/usr/sbin:/usr/bin" \
  70. --without-interfaces
  71. make %{?_smp_mflags}
  72. %install
  73. rm -rf $RPM_BUILD_ROOT
  74. mkdir $RPM_BUILD_ROOT
  75. make install DESTDIR="$RPM_BUILD_ROOT" install_uid=`id -u` install_gid=`id -g` sudoers_uid=`id -u` sudoers_gid=`id -g`
  76. chmod 755 $RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{_sbindir}/*
  77. install -p -d -m 700 $RPM_BUILD_ROOT/var/run/sudo
  78. install -p -c -m 0440 %{SOURCE1} $RPM_BUILD_ROOT/etc/sudoers
  79. mkdir -p $RPM_BUILD_ROOT/etc/pam.d
  80. cat > $RPM_BUILD_ROOT/etc/pam.d/sudo << EOF
  81. #%PAM-1.0
  82. auth include system-auth
  83. account include system-auth
  84. password include system-auth
  85. session optional pam_keyinit.so revoke
  86. session required pam_limits.so
  87. EOF
  88. cat > $RPM_BUILD_ROOT/etc/pam.d/sudo-i << EOF
  89. #%PAM-1.0
  90. auth include sudo
  91. account include sudo
  92. password include sudo
  93. session optional pam_keyinit.so force revoke
  94. session required pam_limits.so
  95. EOF
  96. %clean
  97. rm -rf $RPM_BUILD_ROOT
  98. %files
  99. %defattr(-,root,root)
  100. %doc HISTORY LICENSE README* TROUBLESHOOTING UPGRADE
  101. %doc ChangeLog
  102. %doc *.pod schema.* sudoers2ldif sample.*
  103. %attr(0440,root,root) %config(noreplace) /etc/sudoers
  104. %config(noreplace) /etc/pam.d/sudo
  105. %config(noreplace) /etc/pam.d/sudo-i
  106. %dir /var/run/sudo
  107. %attr(4111,root,root) %{_bindir}/sudo
  108. %attr(4111,root,root) %{_bindir}/sudoedit
  109. %attr(0755,root,root) %{_sbindir}/visudo
  110. %{_libexecdir}/sudo_noexec.*
  111. %{_mandir}/man5/sudoers*.5*
  112. %{_mandir}/man8/sudo.8*
  113. %{_mandir}/man8/sudoedit.8*
  114. %{_mandir}/man8/visudo.8*
  115. %post
  116. /bin/chmod 0440 /etc/sudoers || :
  117. %changelog
  118. * Sat May 19 2012 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p7-5
  119. - add patch120 for fix CVE-2012-2337 (netmask match)
  120. * Fri Jun 03 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.7.2p7-4
  121. - update sudoers
  122. - enable "%wheel ALL=(ALL) ALL" by default.
  123. * Thu Feb 10 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p7-3
  124. - add patch110,111 for fix CVE-2011-0010 ("-g" option)
  125. * Wed Sep 8 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p7-2
  126. - add Patch100 for fix CVE-2010-2956 (sudo Runas)
  127. - add _smp_mflags flag into make section
  128. - fix doc filelist (no longer exist BUGS, CHANGSE)
  129. * Sun Jun 20 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p7-1
  130. - new upstream release with security fix (CVE-2010-1646)
  131. - change specfile name (-vl)
  132. * Sun Apr 25 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p6-1
  133. - new upstream release with security fix (CVE-2010-1163)
  134. - add sudoers.ldap.5 into files section
  135. * Wed Feb 24 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p4-1
  136. - new upstream release with security fix (CVE-2010-0426)
  137. - update Patch3
  138. * Wed Jul 15 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.7.2-1
  139. - new upstream release
  140. * Wed Jun 17 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.7.1-1
  141. - new upstream release
  142. - update patches
  143. - disable "Defaults requiretty"
  144. * Fri Feb 13 2009 NAKAMURA Kenta <kenta@vinelinux.org> 1.6.9p20-2
  145. - rebuilt with openldap-2.4.11
  146. * Thu Feb 12 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.6.9p20-1
  147. - new upstream release with security fix (CVE 2009-0034)
  148. * Sat Aug 16 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.9p17-1
  149. - new upstream release
  150. - merge some changes from fedoraproject
  151. - include [sudo] in password prompt
  152. - compiled with secure path
  153. - also use getgrouplist() to determine group membership
  154. - add sudoers file
  155. - add command aliases, default environment config
  156. - build with openldap
  157. * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 1.6.8p12-1vl5
  158. - applied new versioning policy, spec in utf-8
  159. * Fri May 19 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.8p12-0vl2
  160. - change PAM configuration to use system-auth
  161. - add --with-ignore-dot, --with-editor and --with-env-editor to
  162. configure option.
  163. * Mon Jan 23 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.6.8p12-0vl1
  164. - new upstream release (included security fix)
  165. - add patch1 for fix CVE-2006-0151
  166. * Mon May 09 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.8p8-0vl1
  167. - new upstream release
  168. - use macros
  169. - build with pam
  170. * Wed Jan 19 2005 IWAI, Masaharu <iwai@alib.jp> 1.6.8p6-0vl1
  171. - new upstream release
  172. * Sun Oct 10 2004 IWAI, Masaharu <iwai@alib.jp> 1.6.8p1-0vl1
  173. - SECURITY FIX: new upstream release
  174. - update rpmnonroot.patch ( Patch0 )
  175. - add new man page: sudoedit(8)
  176. * Wed Sep 1 2004 IWAI, Masaharu <iwai@alib.jp> 1.6.8-0vl1
  177. - new upstream release
  178. - update rpmnonroot.patch ( Patch0 )
  179. - change Copyrigh tag to License tag
  180. - update License
  181. - update URL and Source0: official web site moved.
  182. - new files: %%{_bindir}/sudoedit and %%{_libexecdir}/sudo_noexec.*
  183. * Mon Apr 14 2003 IWAI Masaharu <iwai@alib.jp> 1.6.7p3-0vl1
  184. - upstream release
  185. * Wed May 08 2002 Satoshi MACHINO <machino@vinelinux.org> 1.6.6-0vl3
  186. - fixed changelog
  187. -- don't expand macros in changelog ;P
  188. * Wed May 01 2002 Satoshi MACHINO <machino@vinelinux.org> 1.6.6-0vl2
  189. - changed to use configure in build section
  190. (can't build on sparc)
  191. * Fri Apr 26 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.6-0vl1
  192. - upstream release
  193. - fix security hole : buffer over flow
  194. * Thu Jan 24 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.5p2-0vl1
  195. - upstream release
  196. - updated sudo.rpmnonroot.diff
  197. * Fri Jan 18 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.5p1-0vl1
  198. - upstream release
  199. - added configure script option '--disable-root-mailer'
  200. * Tue Jan 15 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.4p1-0vl1
  201. - upstream release
  202. - eliminated FAQ from %doc
  203. * Mon Jan 14 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.4-0vl1
  204. - upstream release
  205. - added noreplace flag (%{_sysconfdir}/sudoers file is not replaced)
  206. - updated sudo.rpmnonroot.diff
  207. * Wed May 09 2001 <sagami@vinelinux.org>
  208. - 1.6.3p7-0vl2: follow up 1.6.2p6-0.6vl1
  209. * Fri Mar 02 2001 sagami@vinelinux.org
  210. - 1.6.3p7-0vl1
  211. - use better macros
  212. * Tue Mar 1 2001 Kunio Murasawa <murasawa@marineroad.com>
  213. - 1.6.3p6-0vl1
  214. - changed sudo.rpmnonroot.diff for 1.6.3p6
  215. * Tue Sep 19 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  216. - 1.6.1-2vl5
  217. - patch -p1 -> patch -p0
  218. * Mon Sep 18 2000 MATSUMOTO Shoji <shom@vinelinux.org>
  219. - 1.6.1-2vl4
  220. - fix uid/gid to root.root
  221. - add sudo.rpmnonroot.diff to built by non-root users
  222. * Tue Sep 12 2000 Jun Nishii <jun@vinelinux.org>
  223. - 1.6.1-2vl3
  224. - fix attr
  225. * Sun Sep 10 2000 Jun Nishii <jun@vinelinux.org>
  226. - 1.6.1-2vl2
  227. - enable to build by non-root useres
  228. * Fri Sep 08 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  229. - 1.6.1-2vl1
  230. - modified %files section to handle compressed man page(s)
  231. * Fri Jan 7 2000 Jun Nishii <jun@vinelinux.org>
  232. - change group
  233. * Thu Dec 30 1999 Jun Nishii <jun@vinelinux.org>
  234. - version 1.6.1
  235. - build for Vine Linux 2.0
  236. * Fri May 14 1999 Takeda Eiji <keda@flatout.org>
  237. - sudo reads $BuildRoot%{_sysconfdir}/sudoers. Make change to read /etc/sudoers.
  238. * Wed Apr 21 1999 Hiroto Watanabe <watanabe@cij.co.jp>
  239. - Initial Release