remove trailing whitespace
This commit is contained in:
62
appl/su/su.1
62
appl/su/su.1
@@ -1,34 +1,34 @@
|
||||
.\" Copyright (c) 2003 - 2006 Kungliga Tekniska Högskolan
|
||||
.\" (Royal Institute of Technology, Stockholm, Sweden).
|
||||
.\" All rights reserved.
|
||||
.\" (Royal Institute of Technology, Stockholm, Sweden).
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 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.
|
||||
.\" 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.
|
||||
.\" 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. Neither the name of the Institute nor the names of its contributors
|
||||
.\" may be used to endorse or promote products derived from this software
|
||||
.\" without specific prior written permission.
|
||||
.\" 3. Neither the name of the Institute nor the names of its contributors
|
||||
.\" may be used to endorse or promote products derived from this software
|
||||
.\" without specific prior written permission.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``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 INSTITUTE OR CONTRIBUTORS 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.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``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 INSTITUTE OR CONTRIBUTORS 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.
|
||||
.\"
|
||||
.\" $Id$
|
||||
.\"
|
||||
.Dd January 12, 2006
|
||||
@@ -59,25 +59,25 @@ user wanting to change effective UID is present in a file named
|
||||
.Pa .k5login
|
||||
in the target user id's home directory
|
||||
.Pp
|
||||
A special case exists where
|
||||
A special case exists where
|
||||
.Ql root Ap s
|
||||
.Pa ~/.k5login
|
||||
needs to contain an entry for:
|
||||
.Ql user Ns / Ns Ao instance Ac Ns @ Ns REALM
|
||||
for
|
||||
.Nm su
|
||||
to succed (where
|
||||
to succed (where
|
||||
.Aq instance
|
||||
is
|
||||
.Ql root
|
||||
unless changed with
|
||||
unless changed with
|
||||
.Fl i ) .
|
||||
.Pp
|
||||
In the absence of either an entry for current user in said file or
|
||||
other problems like missing
|
||||
other problems like missing
|
||||
.Ql host/hostname@REALM
|
||||
keys in the system's
|
||||
keytab, or user typing the wrong password,
|
||||
keytab, or user typing the wrong password,
|
||||
.Nm su
|
||||
will fall back to traditional
|
||||
.Pa /etc/passwd
|
||||
@@ -86,7 +86,7 @@ authentication.
|
||||
When using
|
||||
.Pa /etc/passwd
|
||||
authentication,
|
||||
.Nm su
|
||||
.Nm su
|
||||
allows
|
||||
.Ql root
|
||||
access only to members of the group
|
||||
|
12
appl/su/su.c
12
appl/su/su.c
@@ -152,7 +152,7 @@ krb5_verify(const struct passwd *login_info,
|
||||
krb5_realm *realms, *r;
|
||||
char *login_name = NULL;
|
||||
int user_ok = 0;
|
||||
|
||||
|
||||
#if defined(HAVE_GETLOGIN) && !defined(POSIX_GETLOGIN)
|
||||
login_name = getlogin();
|
||||
#endif
|
||||
@@ -163,7 +163,7 @@ krb5_verify(const struct passwd *login_info,
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
ret = krb5_get_default_realms(context, &realms);
|
||||
if (ret)
|
||||
return 1;
|
||||
@@ -186,7 +186,7 @@ krb5_verify(const struct passwd *login_info,
|
||||
krb5_free_host_realm(context, realms);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* if we are su-ing too root, check with krb5_kuserok */
|
||||
if (su_info->pw_uid == 0 && !krb5_kuserok(context, p, su_info->pw_name))
|
||||
continue;
|
||||
@@ -348,7 +348,7 @@ main(int argc, char **argv)
|
||||
full_login = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if(help_flag)
|
||||
usage(0);
|
||||
if(version_flag) {
|
||||
@@ -499,14 +499,14 @@ main(int argc, char **argv)
|
||||
args[i++] = "-c";
|
||||
args[i++] = cmd;
|
||||
}
|
||||
|
||||
|
||||
if (csh_f_flag)
|
||||
args[i++] = "-f";
|
||||
|
||||
for (argv += optind; *argv; ++argv)
|
||||
args[i++] = *argv;
|
||||
args[i] = NULL;
|
||||
|
||||
|
||||
if(setgid(su_info->pw_gid) < 0)
|
||||
err(1, "setgid");
|
||||
if (initgroups (su_info->pw_name, su_info->pw_gid) < 0)
|
||||
|
Reference in New Issue
Block a user