diff --git a/util/admin/sudo/actions.py b/util/admin/sudo/actions.py new file mode 100644 index 0000000000..2cd1204e4b --- /dev/null +++ b/util/admin/sudo/actions.py @@ -0,0 +1,41 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import get +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools + +def setup(): + pisitools.cflags.add("-fpie") + pisitools.ldflags.add("-pie -Wl,-z,relro -Wl,-z,now") + + autotools.autoreconf("-fi") + + autotools.configure("--libexecdir=/usr/libexec/sudo \ + --with-rundir=/run/sudo \ + --with-noexec=/usr/libexec/sudo/sudo_noexec.so \ + --with-logging=syslog \ + --with-logfac=authpriv \ + --with-pam \ + --with-pam-login \ + --with-linux-audit \ + --with-env-editor \ + --with-ignore-dot \ + --with-tty-tickets \ + --with-ldap \ + --enable-shell-sets-home \ + --without-selinux \ + --without-rpath") + + pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ") + +def build(): + autotools.make() + +def install(): + autotools.rawInstall("DESTDIR=%s" % get.installDIR()) + + pisitools.dodoc("README.LDAP", "README") diff --git a/util/admin/sudo/comar/package.py b/util/admin/sudo/comar/package.py new file mode 100644 index 0000000000..8590b06376 --- /dev/null +++ b/util/admin/sudo/comar/package.py @@ -0,0 +1,20 @@ +#/usr/bin/python + +import os + +permissions = { + "/etc/sudoers" : ["0440", "root:root"], + "/etc/sudoers.d" : ["0750", "root:root"], + "/var/db/sudo" : ["0700", "root:root"], + "/usr/bin/sudo" : ["4111", "root:root"], + "/usr/bin/sudoedit" : ["4111", "root:root"], + "/usr/bin/sudoreplay" : ["0111", "root:root"], + } + + +def postInstall(fromVersion, fromRelease, toVersion, toRelease): + for _file, perms in permissions.items(): + # The list above is general, some paths may not exist depending on the configuration + if os.path.exists(_file): + os.system("/bin/chown -R %s %s" % (perms[1], _file)) + os.system("/bin/chmod %s %s" % (perms[0], _file)) diff --git a/util/admin/sudo/files/sudo-i.pamd b/util/admin/sudo/files/sudo-i.pamd new file mode 100644 index 0000000000..c594b134e0 --- /dev/null +++ b/util/admin/sudo/files/sudo-i.pamd @@ -0,0 +1,7 @@ +#%PAM-1.0 +auth include sudo +account include sudo +password include sudo +session optional pam_keyinit.so force revoke +session required pam_limits.so + diff --git a/util/admin/sudo/files/sudo.pamd b/util/admin/sudo/files/sudo.pamd new file mode 100644 index 0000000000..c1917a2836 --- /dev/null +++ b/util/admin/sudo/files/sudo.pamd @@ -0,0 +1,7 @@ +#%PAM-1.0 +auth include system-auth +account include system-auth +password include system-auth +session optional pam_keyinit.so revoke +session required pam_limits.so + diff --git a/util/admin/sudo/files/sudo.tmpfiles.conf b/util/admin/sudo/files/sudo.tmpfiles.conf new file mode 100644 index 0000000000..0bab614442 --- /dev/null +++ b/util/admin/sudo/files/sudo.tmpfiles.conf @@ -0,0 +1 @@ +d /run/sudo 0711 root root - diff --git a/util/admin/sudo/files/sudoers b/util/admin/sudo/files/sudoers new file mode 100644 index 0000000000..7f351e4a6d --- /dev/null +++ b/util/admin/sudo/files/sudoers @@ -0,0 +1,32 @@ +# sudoers file. +# +# This file MUST be edited with the 'visudo' command as root. +# +# See the sudoers man page for the details on how to write a sudoers file. +# + +# Prevent environment variables from influencing programs in an +# unexpected or harmful way (CVE-2005-2959, CVE-2005-4158, CVE-2006-0151) +Defaults always_set_home +Defaults env_reset + +Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS" +Defaults env_keep += "MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE" +Defaults env_keep += "LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES" +Defaults env_keep += "LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE" +Defaults env_keep += "LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY" +#Defaults env_keep += "XDG_SESSION_COOKIE" + +# Comment out the preceding line and uncomment the following one if you need +# to use special input methods. This may allow users to compromise the root +# account if they are allowed to run commands without authentication. +#Defaults env_keep = "LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS XDG_SESSION_COOKIE XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER" + +# User privilege specification +root ALL=(ALL) ALL + +# Uncomment to allow people in group wheel to run all commands +%wheel ALL=(ALL) ALL + +# Same thing without a password +#%wheel ALL=(ALL) NOPASSWD: ALL diff --git a/util/admin/sudo/files/tr.po b/util/admin/sudo/files/tr.po new file mode 100644 index 0000000000..06313dd42c --- /dev/null +++ b/util/admin/sudo/files/tr.po @@ -0,0 +1,36 @@ +# sudo. +# Copyright (C) 1993-1996,1998-2004 Todd C. Miller +# This file is distributed under the same license as the sudo package. +# Bahadır Kandemir , 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: sudo\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-12-06 17:24+0200\n" +"PO-Revision-Date: 2011-01-07 10:11+0200\n" +"Last-Translator: Bahadır Kandemir \n" +"Language-Team: Bahadır Kandemir \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: check.c:138 +msgid "" +"\n" +"We trust you have received the usual lecture from the local System\n" +"Administrator. It usually boils down to these three things:\n" +"\n" +" #1) Respect the privacy of others.\n" +" #2) Think before you type.\n" +" #3) With great power comes great responsibility.\n" +"\n" +msgstr "" +"\n" +"Sistem yöneticinizin gerekli bilgilendirmeyi yaptığını varsayıyoruz.\n" +"Bilgilendirme, genellikle aşağıdaki maddelerle ilgilidir:\n" +"\n" +" #1) Diğerlerinin mahremiyetine saygı gösterin.\n" +" #2) Yazmadan önce düşünün.\n" +" #3) Büyük güç büyük sorumluluk getirir.\n" +"\n" diff --git a/util/admin/sudo/pspec.xml b/util/admin/sudo/pspec.xml new file mode 100644 index 0000000000..7828393799 --- /dev/null +++ b/util/admin/sudo/pspec.xml @@ -0,0 +1,126 @@ + + + + + sudo + http://www.sudo.ws/ + + PisiLinux Community + admins@pisilinux.org + + Sudo + app:console + Allows restricted root access for specified users + sudo allows certain users/groups to run commands with root user privileges. + http://www.sudo.ws/sudo/dist/sudo-1.8.13.tar.gz + + nss-devel + audit-devel + pam-devel + zlib-devel + cyrus-sasl-devel + openldap-client + + + + + sudo + + nss + audit + pam + zlib + cyrus-sasl + openldap-client + + + /etc + /usr/lib/tmpfiles.d/sudo.conf + /usr/bin + /usr/sbin + /usr/libexec + /usr/share/doc + /usr/share/locale + /usr/share/man + /run/sudo + /var/db/sudo + /usr/include + + + sudoers + sudo.pamd + sudo-i.pamd + sudo.tmpfiles.conf + + + System.Package + + + + + + 2015-04-17 + 1.8.13 + Version bump. + Yusuf Aydemir + yusuf.aydemir@pisilinux.org + + + 2014-12-01 + 1.8.11_p2 + Version bump. + Yusuf Aydemir + yusuf.aydemir@pisilinux.org + + + 2014-12-01 + 1.8.11p2 + Version bump. + Yusuf Aydemir + yusuf.aydemir@pisilinux.org + + + 2014-06-18 + 1.8.10_p3 + Version bump. + Ayhan Yalçınsoy + ayhanyalcinsoy@pisilinux.org + + + 2014-03-29 + 1.8.10_p2 + Version bump. + Marcin Bojara + marcin@pisilinux.org + + + 2014-02-13 + 1.8.9 + Version bump. + Yusuf Aydemir + yusuf.aydemir@pisilinux.org + + + 2014-01-09 + 1.8.8 + Version bump. + Marcin Bojara + marcin@pisilinux.org + + + 2013-06-21 + 1.8.7 + Version bump. + Yusuf Aydemir + yusuf.aydemir@pisilinux.org + + + 2011-02-04 + 1.7.4_p6 + First release + security + Pisi Linux Admins + admins@pisilinux.org + + + diff --git a/util/admin/sudo/translations.xml b/util/admin/sudo/translations.xml new file mode 100644 index 0000000000..79ce1d1f9c --- /dev/null +++ b/util/admin/sudo/translations.xml @@ -0,0 +1,8 @@ + + + + sudo + Yönetici haklarıyla komut çalıştırma uygulaması + sudo, belirli kullanıcıların ya da kullanıcı gruplarının komut ve uygulamaları yönetici kullanıcı (root) haklarıyla çalıştırmasına izin veren bir konsol uygulamasıdır. + +