http://www.sudo.ws/
-Sudo is distributed under the following BSD-style license:
+Sudo is distributed under the following ISC-style license:
- Copyright (c) 1994-1996,1998-2005,2007 Todd C. Miller <Todd.Miller@courtesan.com>
- All rights reserved.
+ Copyright (c) 1994-1996, 1998-2008
+ Todd C. Miller <Todd.Miller@courtesan.com>
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission
- from the author.
-
- 4. Products derived from this software may not be called "Sudo" nor
- may "Sudo" appear in their names without specific prior written
- permission from the author.
+ Permission to use, copy, modify, and distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
- THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ Sponsored in part by the Defense Advanced Research Projects
+ Agency (DARPA) and Air Force Research Laboratory, Air Force
+ Materiel Command, USAF, under agreement number F39502-99-1-0512.
-Additionally, lsearch.c, fnmatch.c, getcwd.c, snprintf.c, strcasecmp.c
-and fnmatch.3 bear the following UCB license:
+Additionally, fnmatch.c, fnmatch.h, getcwd.c, glob.c, glob.h and snprintf.c
+bear the following UCB license:
- Copyright (c) 1987, 1989, 1990, 1991, 1993, 1994
- The Regents of the University of California. All rights reserved.
+ Copyright (c) 1987, 1989, 1990, 1991, 1992, 1993, 1994
+ The Regents of the University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
+++ /dev/null
-etc/pam.d
-usr/bin
-usr/share/man/man8
-usr/share/man/man5
-usr/sbin
-usr/share/doc/sudo/examples
-usr/share/lintian/overrides
+++ /dev/null
-debian/OPTIONS
-BUGS
-UPGRADE
-PORTING
-HISTORY
-README
-TROUBLESHOOTING
+++ /dev/null
-#!/usr/bin/perl
-
-# remove old link
-
-unlink ("/etc/alternatives/sudo") if ( -l "/etc/alternatives/sudo");
-
-# make sure we have a sudoers file
-if ( ! -f "/etc/sudoers") {
-
- print "No /etc/sudoers found... creating one for you.\n";
-
- open (SUDOERS, "> /etc/sudoers");
- print SUDOERS "# /etc/sudoers\n",
- "#\n",
- "# This file MUST be edited with the 'visudo' command as root.\n",
- "#\n",
- "# See the man page for details on how to write a sudoers file.\n",
- "#\n\nDefaults\tenv_reset\n\n",
- "# Host alias specification\n\n",
- "# User alias specification\n\n",
- "# Cmnd alias specification\n\n",
- "# User privilege specification\nroot\tALL=(ALL) ALL\n\n",
- "# Uncomment to allow members of group sudo to not need a password\n",
- "# (Note that later entries override this, so you might need to move\n",
- "# it further down)\n",
- "# %sudo ALL=NOPASSWD: ALL\n";
- close SUDOERS;
-
-}
-
-# make sure sudoers has the correct permissions and owner/group
-system ('chown root:root /etc/sudoers');
-system ('chmod 440 /etc/sudoers');
-
-# must do a remove first to un-do the "bad" links created by previous version
-system ('update-rc.d -f sudo remove >/dev/null 2>&1');
-
-system ('update-rc.d sudo start 75 S . >/dev/null');
-
-# make sure we have a sudo group
-
-exit 0 if getgrnam("sudo"); # we're finished if there is a group sudo
-
-$gid = 27; # start searcg with gid 27
-setgrent;
-while (getgrgid($gid)) {
- ++$gid;
-}
-endgrent;
-
-if ($gid != 27) {
- print "On Debian we normally use gid 27 for 'sudo'.\n";
- $gname = getgrgid(27);
- print "However, on your system gid 27 is group '$gname'.\n\n";
- print "Would you like me to stop configuring sudo so that you can change this? [n] ";
- $ans = <STDIN>;
- if ($ans =~ m/^[yY].*/) {
- print "'dpkg --pending --configure' will restart the configuration.\n\n\n";
- exit 1;
- }
-}
-
-print "Creating group 'sudo' with gid = $gid\n";
-system("groupadd -g $gid sudo");
-
-print "";
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-check_password() {
- if [ ! "$SUDO_FORCE_REMOVE" = "yes" ]; then
- # let's check whether the root account is locked.
- # if it is, we're not going another step. No Sirreee!
- passwd=$(getent shadow root|cut -f2 -d:)
- passwd1=$(echo "$passwd" |cut -c1)
- # Note: we do need the 'xfoo' syntax here, since POSIX special-cases
- # the $passwd value '!' as negation.
- if [ "x$passwd" = "x*" ] || [ "x$passwd1" = "x!" ]; then
- # yup, password is locked
- echo "You have asked that the sudo package be removed,"
- echo "but no root password has been set."
- echo "Without sudo, you may not be able to gain administrative privileges."
- echo
- echo "If you would prefer to access the root account with su(1)"
- echo "or by logging in directly,"
- echo "you must set a root password with \"sudo passwd\"."
- echo
- echo "If you have arranged other means to access the root account,"
- echo "and you are sure this is what you want,"
- echo "you may bypass this check by setting an environment variable "
- echo "(export SUDO_FORCE_REMOVE=yes)."
- echo
- echo "Refusing to remove sudo."
- exit 1
- fi
- fi
-}
-
-case $1 in
- remove)
- check_password;
- ;;
- *)
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
-
debian/OPTIONS
-BUGS
UPGRADE
-PORTING
HISTORY
README
README.LDAP
TROUBLESHOOTING
+WHATSNEW
sudoers2ldif
-schema.iPlanet
-schema.OpenLDAP
+schema.*
--- /dev/null
+etc/pam.d
+usr/bin
+usr/share/man/man8
+usr/share/man/man5
+usr/sbin
+usr/share/doc/sudo/examples
+usr/share/lintian/overrides
--- /dev/null
+debian/OPTIONS
+UPGRADE
+HISTORY
+README
+TROUBLESHOOTING
+WHATSNEW
--- /dev/null
+#!/usr/bin/perl
+
+# remove old link
+
+unlink ("/etc/alternatives/sudo") if ( -l "/etc/alternatives/sudo");
+
+# make sure we have a sudoers file
+if ( ! -f "/etc/sudoers") {
+
+ print "No /etc/sudoers found... creating one for you.\n";
+
+ open (SUDOERS, "> /etc/sudoers");
+ print SUDOERS "# /etc/sudoers\n",
+ "#\n",
+ "# This file MUST be edited with the 'visudo' command as root.\n",
+ "#\n",
+ "# See the man page for details on how to write a sudoers file.\n",
+ "#\n\nDefaults\tenv_reset\n\n",
+ "# Host alias specification\n\n",
+ "# User alias specification\n\n",
+ "# Cmnd alias specification\n\n",
+ "# User privilege specification\nroot\tALL=(ALL) ALL\n\n",
+ "# Uncomment to allow members of group sudo to not need a password\n",
+ "# (Note that later entries override this, so you might need to move\n",
+ "# it further down)\n",
+ "# %sudo ALL=NOPASSWD: ALL\n";
+ close SUDOERS;
+
+}
+
+# make sure sudoers has the correct permissions and owner/group
+system ('chown root:root /etc/sudoers');
+system ('chmod 440 /etc/sudoers');
+
+# must do a remove first to un-do the "bad" links created by previous version
+system ('update-rc.d -f sudo remove >/dev/null 2>&1');
+
+system ('update-rc.d sudo start 75 S . >/dev/null');
+
+# make sure we have a sudo group
+
+exit 0 if getgrnam("sudo"); # we're finished if there is a group sudo
+
+$gid = 27; # start searcg with gid 27
+setgrent;
+while (getgrgid($gid)) {
+ ++$gid;
+}
+endgrent;
+
+if ($gid != 27) {
+ print "On Debian we normally use gid 27 for 'sudo'.\n";
+ $gname = getgrgid(27);
+ print "However, on your system gid 27 is group '$gname'.\n\n";
+ print "Would you like me to stop configuring sudo so that you can change this? [n] ";
+ $ans = <STDIN>;
+ if ($ans =~ m/^[yY].*/) {
+ print "'dpkg --pending --configure' will restart the configuration.\n\n\n";
+ exit 1;
+ }
+}
+
+print "Creating group 'sudo' with gid = $gid\n";
+system("groupadd -g $gid sudo");
+
+print "";
--- /dev/null
+#!/bin/sh
+
+set -e
+
+check_password() {
+ if [ ! "$SUDO_FORCE_REMOVE" = "yes" ]; then
+ # let's check whether the root account is locked.
+ # if it is, we're not going another step. No Sirreee!
+ passwd=$(getent shadow root|cut -f2 -d:)
+ passwd1=$(echo "$passwd" |cut -c1)
+ # Note: we do need the 'xfoo' syntax here, since POSIX special-cases
+ # the $passwd value '!' as negation.
+ if [ "x$passwd" = "x*" ] || [ "x$passwd1" = "x!" ]; then
+ # yup, password is locked
+ echo "You have asked that the sudo package be removed,"
+ echo "but no root password has been set."
+ echo "Without sudo, you may not be able to gain administrative privileges."
+ echo
+ echo "If you would prefer to access the root account with su(1)"
+ echo "or by logging in directly,"
+ echo "you must set a root password with \"sudo passwd\"."
+ echo
+ echo "If you have arranged other means to access the root account,"
+ echo "and you are sure this is what you want,"
+ echo "you may bypass this check by setting an environment variable "
+ echo "(export SUDO_FORCE_REMOVE=yes)."
+ echo
+ echo "Refusing to remove sudo."
+ exit 1
+ fi
+ fi
+}
+
+case $1 in
+ remove)
+ check_password;
+ ;;
+ *)
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+