remove trailing whitespace
This commit is contained in:
@@ -104,7 +104,7 @@ kt_add(struct add_options *opt, int argc, char **argv)
|
||||
if (opt->hex_flag) {
|
||||
size_t len;
|
||||
void *data;
|
||||
|
||||
|
||||
len = (strlen(opt->password_string) + 1) / 2;
|
||||
|
||||
data = malloc(len);
|
||||
|
@@ -73,7 +73,7 @@ change_entry (krb5_keytab keytab,
|
||||
free(conf.realm);
|
||||
krb5_set_error_message(context, ENOMEM, "malloc failed");
|
||||
return ENOMEM;
|
||||
}
|
||||
}
|
||||
conf.mask |= KADM5_CONFIG_ADMIN_SERVER;
|
||||
}
|
||||
|
||||
|
@@ -157,7 +157,7 @@ kt_get(struct get_options *opt, int argc, char **argv)
|
||||
if(kadm_handle == NULL)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
ret = kadm5_create_principal(kadm_handle, &princ, mask, "x");
|
||||
if(ret == 0)
|
||||
created = 1;
|
||||
@@ -174,7 +174,7 @@ kt_get(struct get_options *opt, int argc, char **argv)
|
||||
failed++;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
ret = kadm5_get_principal(kadm_handle, princ_ent, &princ,
|
||||
KADM5_PRINCIPAL | KADM5_KVNO | KADM5_ATTRIBUTES);
|
||||
if (ret) {
|
||||
@@ -226,7 +226,7 @@ kt_get(struct get_options *opt, int argc, char **argv)
|
||||
}
|
||||
krb5_free_keyblock_contents(context, &keys[j]);
|
||||
}
|
||||
|
||||
|
||||
kadm5_free_principal_ent(kadm_handle, &princ);
|
||||
krb5_free_principal(context, princ_ent);
|
||||
}
|
||||
|
@@ -1,34 +1,34 @@
|
||||
.\" Copyright (c) 1997-2004 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 April 14, 2005
|
||||
|
@@ -52,7 +52,7 @@ static struct getargs args[] = {
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"help",
|
||||
"help",
|
||||
'h',
|
||||
arg_flag,
|
||||
&help_flag,
|
||||
@@ -60,7 +60,7 @@ static struct getargs args[] = {
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"keytab",
|
||||
"keytab",
|
||||
'k',
|
||||
arg_string,
|
||||
&keytab_string,
|
||||
@@ -101,7 +101,7 @@ ktutil_open_keytab(void)
|
||||
}
|
||||
if (verbose_flag)
|
||||
fprintf (stderr, "Using keytab %s\n", keytab_string);
|
||||
|
||||
|
||||
return keytab;
|
||||
}
|
||||
|
||||
|
@@ -76,7 +76,7 @@ do_list(struct list_options *opt, const char *keytab_str)
|
||||
}
|
||||
|
||||
printf ("%s:\n\n", keytab_str);
|
||||
|
||||
|
||||
table = rtbl_create();
|
||||
rtbl_add_column_by_id(table, 0, "Vno", RTBL_ALIGN_RIGHT);
|
||||
rtbl_add_column_by_id(table, 1, "Type", 0);
|
||||
@@ -129,12 +129,12 @@ do_list(struct list_options *opt, const char *keytab_str)
|
||||
if (entry.aliases) {
|
||||
unsigned int i;
|
||||
struct rk_strpool *p = NULL;
|
||||
|
||||
|
||||
for (i = 0; i< entry.aliases->len; i++) {
|
||||
krb5_unparse_name_fixed(context, entry.principal, buf, sizeof(buf));
|
||||
rk_strpoolprintf(p, "%s%s", buf,
|
||||
i + 1 < entry.aliases->len ? ", " : "");
|
||||
|
||||
|
||||
}
|
||||
rtbl_add_column_entry_by_id(table, 5, rk_strpoolcollect(p));
|
||||
}
|
||||
|
@@ -1,34 +1,34 @@
|
||||
.\" Copyright (c) 2002 - 2007 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 November 26, 2002
|
||||
@@ -70,7 +70,7 @@ obtains AFS tokens for a number of cells. What cells to get tokens for
|
||||
can either be specified as an explicit list, as file paths to get
|
||||
tokens for, or be left unspecified, in which case
|
||||
.Nm
|
||||
will use whatever magic
|
||||
will use whatever magic
|
||||
.Xr krb_afslog 3
|
||||
decides upon.
|
||||
.Pp
|
||||
@@ -131,22 +131,22 @@ Instead of using
|
||||
and
|
||||
.Fl p ,
|
||||
you may also pass a list of cells and file paths after any other
|
||||
options. These arguments are considered files if they are either
|
||||
options. These arguments are considered files if they are either
|
||||
the strings
|
||||
.Do . Dc
|
||||
or
|
||||
.Dq ..
|
||||
.Dq ..
|
||||
or they contain a slash, or if there exists a file by that name.
|
||||
.Sh EXAMPLES
|
||||
Assuming that there is no file called
|
||||
Assuming that there is no file called
|
||||
.Dq openafs.org
|
||||
in the current directory, and that
|
||||
in the current directory, and that
|
||||
.Pa /afs/openafs.org
|
||||
points to that cell, the follwing should be identical:
|
||||
.Bd -literal -offset indent
|
||||
$ afslog -c openafs.org
|
||||
$ afslog openafs.org
|
||||
$ afslog /afs/openafs.org/some/file
|
||||
.Ed
|
||||
.Ed
|
||||
.Sh SEE ALSO
|
||||
.Xr krb_afslog 3
|
||||
|
@@ -1,34 +1,34 @@
|
||||
.\" Copyright (c) 2005 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 February 12, 2005
|
||||
|
@@ -601,7 +601,7 @@ int k5dcecreate(luid, luser, pname, krbtgt)
|
||||
"Error while adding credentials for %s because %s\n",
|
||||
username, err_string);
|
||||
goto abort;
|
||||
}
|
||||
}
|
||||
DEEDEBUG("validating and certifying\n");
|
||||
/*
|
||||
* Now "validate" and certify the identity,
|
||||
|
@@ -987,7 +987,7 @@ setprompt(int argc, char **argv)
|
||||
void
|
||||
setglob(int argc, char **argv)
|
||||
{
|
||||
|
||||
|
||||
doglob = !doglob;
|
||||
printf("Globbing %s.\n", onoff(doglob));
|
||||
code = doglob;
|
||||
|
@@ -196,7 +196,7 @@ struct cmd cmdtab[] = {
|
||||
#if defined(KRB5)
|
||||
{ "afslog", afsloghelp, 0, 1, 0, afslog },
|
||||
#endif
|
||||
|
||||
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
|
@@ -89,7 +89,7 @@ hookup (const char *host, int port)
|
||||
strlcpy (hostnamebuf, a->ai_canonname, sizeof(hostnamebuf));
|
||||
|
||||
memcpy (hisctladdr, a->ai_addr, a->ai_addrlen);
|
||||
|
||||
|
||||
error = connect (s, a->ai_addr, a->ai_addrlen);
|
||||
if (error < 0) {
|
||||
char addrstr[256];
|
||||
@@ -98,7 +98,7 @@ hookup (const char *host, int port)
|
||||
addrstr, sizeof(addrstr),
|
||||
NULL, 0, NI_NUMERICHOST) != 0)
|
||||
strlcpy (addrstr, "unknown address", sizeof(addrstr));
|
||||
|
||||
|
||||
warn ("connect %s", addrstr);
|
||||
close (s);
|
||||
s = -1;
|
||||
@@ -622,7 +622,7 @@ copy_stream (FILE * from, FILE * to)
|
||||
goto try_read;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
res = sec_write (fileno (to), chunk, len);
|
||||
if (msync (chunk, len, MS_ASYNC))
|
||||
warn ("msync");
|
||||
|
@@ -158,7 +158,7 @@ sockaddr_to_gss_address (struct sockaddr *sa,
|
||||
}
|
||||
default :
|
||||
errx (1, "unknown address family %d", sa->sa_family);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ gss_adat(void *app_data, void *buf, size_t len)
|
||||
sockaddr_to_gss_address (ctrl_addr,
|
||||
&bindings->acceptor_addrtype,
|
||||
&bindings->acceptor_address);
|
||||
|
||||
|
||||
bindings->application_data.length = 0;
|
||||
bindings->application_data.value = NULL;
|
||||
} else
|
||||
@@ -302,7 +302,7 @@ import_name(const char *kname, const char *host, gss_name_t *target_name)
|
||||
OM_uint32 new_stat;
|
||||
OM_uint32 msg_ctx = 0;
|
||||
gss_buffer_desc status_string;
|
||||
|
||||
|
||||
gss_display_status(&new_stat,
|
||||
min_stat,
|
||||
GSS_C_MECH_CODE,
|
||||
@@ -337,7 +337,7 @@ gss_auth(void *app_data, char *host)
|
||||
OM_uint32 mech_flags = GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG;
|
||||
|
||||
const char *knames[] = { "ftp", "host", NULL }, **kname = knames;
|
||||
|
||||
|
||||
|
||||
if(import_name(*kname++, host, &target_name))
|
||||
return AUTH_ERROR;
|
||||
@@ -349,14 +349,14 @@ gss_auth(void *app_data, char *host)
|
||||
bindings = malloc(sizeof(*bindings));
|
||||
if (bindings == NULL)
|
||||
errx(1, "out of memory");
|
||||
|
||||
|
||||
sockaddr_to_gss_address (myctladdr,
|
||||
&bindings->initiator_addrtype,
|
||||
&bindings->initiator_address);
|
||||
sockaddr_to_gss_address (hisctladdr,
|
||||
&bindings->acceptor_addrtype,
|
||||
&bindings->acceptor_address);
|
||||
|
||||
|
||||
bindings->application_data.length = 0;
|
||||
bindings->application_data.value = NULL;
|
||||
} else
|
||||
@@ -397,7 +397,7 @@ gss_auth(void *app_data, char *host)
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (bindings != GSS_C_NO_CHANNEL_BINDINGS)
|
||||
free(bindings);
|
||||
|
||||
@@ -490,7 +490,7 @@ gss_auth(void *app_data, char *host)
|
||||
gss_release_name(&min_stat, &targ_name);
|
||||
} else
|
||||
printf("Failed to get gss name of peer.\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return AUTH_OK;
|
||||
|
@@ -142,7 +142,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
if (argc > 0) {
|
||||
char *xargv[5];
|
||||
|
||||
|
||||
if (setjmp(toplevel))
|
||||
exit(0);
|
||||
signal(SIGINT, intr);
|
||||
@@ -217,7 +217,7 @@ tail(filename)
|
||||
char *filename;
|
||||
{
|
||||
char *s;
|
||||
|
||||
|
||||
while (*filename) {
|
||||
s = strrchr(filename, '/');
|
||||
if (s == NULL)
|
||||
|
@@ -818,7 +818,7 @@ sec_login(char *host)
|
||||
return -1;
|
||||
}
|
||||
app_data = tmp;
|
||||
|
||||
|
||||
if((*m)->init && (*(*m)->init)(app_data) != 0) {
|
||||
printf("Skipping %s...\n", (*m)->name);
|
||||
continue;
|
||||
@@ -840,7 +840,7 @@ sec_login(char *host)
|
||||
}
|
||||
|
||||
ret = (*(*m)->auth)(app_data, host);
|
||||
|
||||
|
||||
if(ret == AUTH_CONTINUE)
|
||||
continue;
|
||||
else if(ret != AUTH_OK){
|
||||
|
@@ -161,7 +161,7 @@ cmd
|
||||
socket_get_address(his_addr),
|
||||
socket_addr_size(his_addr)) != 0)) {
|
||||
usedefault = 1;
|
||||
reply(500, "Illegal PORT range rejected.");
|
||||
reply(500, "Illegal PORT range rejected.");
|
||||
} else {
|
||||
usedefault = 0;
|
||||
if (pdata >= 0) {
|
||||
@@ -1013,7 +1013,7 @@ struct tab sitetab[] = {
|
||||
{ "FIND", LOCATE, STR1, 1, "<sp> globexpr" },
|
||||
|
||||
{ "URL", URL, ARGS, 1, "?" },
|
||||
|
||||
|
||||
{ NULL, 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
|
@@ -191,7 +191,7 @@ parse_auth_level(char *str)
|
||||
else
|
||||
warnx("bad value for -a: `%s'", p);
|
||||
}
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -277,7 +277,7 @@ main(int argc, char **argv)
|
||||
|
||||
if(help_flag)
|
||||
usage(0);
|
||||
|
||||
|
||||
if(version_flag) {
|
||||
print_version(NULL);
|
||||
exit(0);
|
||||
@@ -288,7 +288,7 @@ main(int argc, char **argv)
|
||||
{
|
||||
char *p;
|
||||
long val = 0;
|
||||
|
||||
|
||||
if(guest_umask_string) {
|
||||
val = strtol(guest_umask_string, &p, 8);
|
||||
if (*p != '\0' || val < 0)
|
||||
@@ -319,7 +319,7 @@ main(int argc, char **argv)
|
||||
else
|
||||
warnx("bad value for -p");
|
||||
}
|
||||
|
||||
|
||||
if (maxtimeout < ftpd_timeout)
|
||||
maxtimeout = ftpd_timeout;
|
||||
|
||||
@@ -401,7 +401,7 @@ main(int argc, char **argv)
|
||||
show_file(_PATH_FTPWELCOME, 220);
|
||||
/* reply(220,) must follow */
|
||||
gethostname(hostname, sizeof(hostname));
|
||||
|
||||
|
||||
reply(220, "%s FTP server (%s"
|
||||
#ifdef KRB5
|
||||
"+%s"
|
||||
@@ -947,7 +947,7 @@ pass(char *passwd)
|
||||
}
|
||||
if(!do_login(230, passwd))
|
||||
return;
|
||||
|
||||
|
||||
/* Forget all about it... */
|
||||
end_login();
|
||||
}
|
||||
@@ -983,7 +983,7 @@ retrieve(const char *cmd, char *name)
|
||||
for(p = cmds; p->ext; p++){
|
||||
char *tail = name + strlen(name) - strlen(p->ext);
|
||||
char c = *tail;
|
||||
|
||||
|
||||
if(strcmp(tail, p->ext) == 0 &&
|
||||
(*tail = 0) == 0 &&
|
||||
access(name, R_OK) == 0){
|
||||
@@ -1007,7 +1007,7 @@ retrieve(const char *cmd, char *name)
|
||||
free(ext);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(p->ext){
|
||||
fin = ftpd_popen(line, "r", 0, 0);
|
||||
@@ -1279,7 +1279,7 @@ dataconn(const char *name, off_t size, const char *mode)
|
||||
#if defined(IP_TOS) && defined(HAVE_SETSOCKOPT)
|
||||
{
|
||||
int tos = IPTOS_THROUGHPUT;
|
||||
|
||||
|
||||
setsockopt(s, IPPROTO_IP, IP_TOS, (void *)&tos,
|
||||
sizeof(tos));
|
||||
}
|
||||
@@ -1373,7 +1373,7 @@ send_data(FILE *instr, FILE *outstr)
|
||||
goto data_err;
|
||||
reply(226, "Transfer complete.");
|
||||
return;
|
||||
|
||||
|
||||
case TYPE_I:
|
||||
case TYPE_L:
|
||||
#if 0 /* XXX handle urg flag */
|
||||
@@ -1557,13 +1557,13 @@ receive_data(FILE *instr, FILE *outstr)
|
||||
urgflag = 0;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
|
||||
data_err:
|
||||
transflag = 0;
|
||||
urgflag = 0;
|
||||
perror_reply(426, "Data Connection");
|
||||
return (-1);
|
||||
|
||||
|
||||
file_err:
|
||||
transflag = 0;
|
||||
urgflag = 0;
|
||||
@@ -1887,7 +1887,7 @@ dologout(int status)
|
||||
exit(status);
|
||||
#else
|
||||
_exit(status);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void abor(void)
|
||||
@@ -2097,7 +2097,7 @@ eprt(char *str)
|
||||
case 2 :
|
||||
data_dest->sa_family = AF_INET6;
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
case 1 :
|
||||
data_dest->sa_family = AF_INET;
|
||||
break;
|
||||
@@ -2338,7 +2338,7 @@ out:
|
||||
transflag = 0;
|
||||
if (dout != NULL){
|
||||
sec_write(fileno(dout), buf, 0); /* XXX flush */
|
||||
|
||||
|
||||
fclose(dout);
|
||||
}
|
||||
data = -1;
|
||||
|
@@ -101,7 +101,7 @@ print_tickets (krb5_context context,
|
||||
&cursor,
|
||||
&cred)) == 0) {
|
||||
if (print_cred(context, &cred))
|
||||
return 500;
|
||||
return 500;
|
||||
krb5_free_cred_contents (context, &cred);
|
||||
}
|
||||
if (ret != KRB5_CC_END) {
|
||||
@@ -137,7 +137,7 @@ klist5(void)
|
||||
else
|
||||
ret = krb5_cc_default (context, &ccache);
|
||||
if (ret) {
|
||||
lreply(500, "krb5_cc_default: %d", ret);
|
||||
lreply(500, "krb5_cc_default: %d", ret);
|
||||
return 500;
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ klist5(void)
|
||||
|
||||
ret = krb5_cc_close (context, ccache);
|
||||
if (ret) {
|
||||
lreply(500, "krb5_cc_close: %d", ret);
|
||||
lreply(500, "krb5_cc_close: %d", ret);
|
||||
exit_status = 500;
|
||||
}
|
||||
|
||||
|
@@ -179,10 +179,10 @@ ftpd_logwtmp_wtmp(char *line, char *name, char *host)
|
||||
if(fd >= 0) {
|
||||
#ifdef WTMP_FILE
|
||||
write(fd, &ut, sizeof(struct utmp)); /* XXX */
|
||||
#endif
|
||||
#endif
|
||||
#ifdef WTMPX_FILE
|
||||
write(fdx, &utx, sizeof(struct utmpx));
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -425,19 +425,19 @@ lstat_file (const char *file, struct stat *sb)
|
||||
static ino_t ino_counter = 0, ino_last = 0;
|
||||
int ret;
|
||||
const int maxsize = 2048;
|
||||
|
||||
|
||||
path_bkp = strdup (file);
|
||||
if (path_bkp == NULL)
|
||||
return -1;
|
||||
|
||||
|
||||
a_params.out = malloc (maxsize);
|
||||
if (a_params.out == NULL) {
|
||||
free (path_bkp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/* If path contains more than the filename alone - split it */
|
||||
|
||||
|
||||
last = strrchr (path_bkp, '/');
|
||||
if (last != NULL) {
|
||||
if(last[1] == '\0')
|
||||
@@ -457,10 +457,10 @@ lstat_file (const char *file, struct stat *sb)
|
||||
dir = ".";
|
||||
a_params.in = path_bkp;
|
||||
}
|
||||
|
||||
|
||||
a_params.in_size = strlen (a_params.in) + 1;
|
||||
a_params.out_size = maxsize;
|
||||
|
||||
|
||||
ret = k_pioctl (dir, VIOC_AFS_STAT_MT_PT, &a_params, 0);
|
||||
free (a_params.out);
|
||||
if (ret < 0) {
|
||||
@@ -602,7 +602,7 @@ list_files(FILE *out, const char **files, int n_files, int flags)
|
||||
max_inode = find_log10(max_inode);
|
||||
max_bsize = find_log10(max_bsize);
|
||||
max_n_link = find_log10(max_n_link);
|
||||
|
||||
|
||||
if(n_print > 0)
|
||||
sec_fprintf2(out, "total %lu\r\n", (unsigned long)total_blocks);
|
||||
if(flags & LS_SORT_REVERSE)
|
||||
|
@@ -196,8 +196,8 @@ ftpd_popen(char *program, char *type, int do_stderr, int no_glob)
|
||||
close(pdes[0]);
|
||||
}
|
||||
pids[fileno(iop)] = pid;
|
||||
|
||||
pfree:
|
||||
|
||||
pfree:
|
||||
for (argc = 1; gargv[argc] != NULL; argc++)
|
||||
free(gargv[argc]);
|
||||
|
||||
|
@@ -327,7 +327,7 @@ build_context(struct client *ipeer, struct client *apeer,
|
||||
krb5_data_zero(&itoken);
|
||||
|
||||
while (!iDone || !aDone) {
|
||||
|
||||
|
||||
if (iDone) {
|
||||
warnx("iPeer already done, aPeer want extra rtt");
|
||||
val = GSMERR_ERROR;
|
||||
@@ -405,7 +405,7 @@ build_context(struct client *ipeer, struct client *apeer,
|
||||
out:
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
test_mic(struct client *c1, int32_t hc1, struct client *c2, int32_t hc2)
|
||||
{
|
||||
@@ -540,17 +540,17 @@ test_token(struct client *c1, int32_t hc1, struct client *c2, int32_t hc2, int w
|
||||
if (val) return val;
|
||||
val = test_wrap_ext(c2, hc2, c1, hc1, 1, 0);
|
||||
if (val) return val;
|
||||
|
||||
|
||||
val = test_wrap_ext(c1, hc1, c2, hc2, 1, 1);
|
||||
if (val) return val;
|
||||
val = test_wrap_ext(c2, hc2, c1, hc1, 1, 1);
|
||||
if (val) return val;
|
||||
|
||||
|
||||
val = test_wrap_ext(c1, hc1, c2, hc2, 0, 0);
|
||||
if (val) return val;
|
||||
val = test_wrap_ext(c2, hc2, c1, hc1, 0, 0);
|
||||
if (val) return val;
|
||||
|
||||
|
||||
val = test_wrap_ext(c1, hc1, c2, hc2, 0, 1);
|
||||
if (val) return val;
|
||||
val = test_wrap_ext(c2, hc2, c1, hc1, 0, 1);
|
||||
@@ -780,7 +780,7 @@ main(int argc, char **argv)
|
||||
if (password == NULL)
|
||||
errx(1, "password missing from %s", user);
|
||||
*password++ = 0;
|
||||
|
||||
|
||||
if (slaves.num_strings == 0)
|
||||
errx(1, "no principals");
|
||||
|
||||
@@ -834,7 +834,7 @@ main(int argc, char **argv)
|
||||
int32_t hCred, val, delegCred;
|
||||
int32_t clientC, serverC;
|
||||
struct client *c = clients[i];
|
||||
|
||||
|
||||
if (c->target_name == NULL)
|
||||
continue;
|
||||
|
||||
@@ -893,18 +893,18 @@ main(int argc, char **argv)
|
||||
int32_t hCred, val, delegCred = 0;
|
||||
int32_t clientC = 0, serverC = 0;
|
||||
struct client *client, *server;
|
||||
|
||||
|
||||
p = list[i];
|
||||
|
||||
|
||||
client = get_client(p[0]);
|
||||
|
||||
|
||||
val = acquire_cred(client, user, password, 1, &hCred);
|
||||
if (val != GSMERR_OK)
|
||||
errx(1, "failed to acquire_cred: %d", (int)val);
|
||||
|
||||
for (j = 1; j < num_clients + 1; j++) {
|
||||
server = get_client(p[j % num_clients]);
|
||||
|
||||
|
||||
if (server->target_name == NULL)
|
||||
break;
|
||||
|
||||
@@ -921,11 +921,11 @@ main(int argc, char **argv)
|
||||
warnx("build_context failed: %d", (int)val);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
val = test_token(client, clientC, server, serverC, wrap_ext);
|
||||
if (val)
|
||||
break;
|
||||
|
||||
|
||||
toast_resource(client, clientC);
|
||||
toast_resource(server, serverC);
|
||||
if (!delegCred) {
|
||||
|
@@ -229,7 +229,7 @@ acquire_cred(struct client *c,
|
||||
"krb5_get_init_creds failed: %d", ret);
|
||||
return convert_krb5_to_gsm(ret);
|
||||
}
|
||||
|
||||
|
||||
ret = krb5_cc_new_unique(context, "MEMORY", NULL, &id);
|
||||
if (ret)
|
||||
krb5_err (context, 1, ret, "krb5_cc_initialize");
|
||||
@@ -358,7 +358,7 @@ HandleOP(InitContext)
|
||||
if (ctx)
|
||||
krb5_errx(context, 1, "initcreds, context not NULL, but first req");
|
||||
}
|
||||
|
||||
|
||||
if ((flags & GSS_C_DELEG_FLAG) != 0)
|
||||
logmessage(c, __FILE__, __LINE__, 0, "init_sec_context delegating");
|
||||
if ((flags & GSS_C_DCE_STYLE) != 0)
|
||||
@@ -484,7 +484,7 @@ HandleOP(AcceptContext)
|
||||
gss_release_cred(&min_stat, &deleg_cred);
|
||||
deleg_hcred = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
gsm_error = convert_gss_to_gsm(maj_stat);
|
||||
|
||||
@@ -799,7 +799,7 @@ HandleOP(Unwrap)
|
||||
|
||||
if (maj_stat != GSS_S_COMPLETE)
|
||||
errx(1, "gss_unwrap failed: %d/%d", maj_stat, min_stat);
|
||||
|
||||
|
||||
krb5_data_free(&token);
|
||||
if (maj_stat == GSS_S_COMPLETE) {
|
||||
token.data = output_token.value;
|
||||
@@ -1013,7 +1013,7 @@ HandleOP(UnwrapExt)
|
||||
|
||||
if (maj_stat != GSS_S_COMPLETE)
|
||||
errx(1, "gss_unwrap failed: %d/%d", maj_stat, min_stat);
|
||||
|
||||
|
||||
if (maj_stat == GSS_S_COMPLETE) {
|
||||
token.data = iov[1].buffer.value;
|
||||
token.length = iov[1].buffer.length;
|
||||
@@ -1100,7 +1100,7 @@ create_client(int fd, int port, const char *moniker)
|
||||
{
|
||||
c->salen = sizeof(c->sa);
|
||||
getpeername(fd, (struct sockaddr *)&c->sa, &c->salen);
|
||||
|
||||
|
||||
getnameinfo((struct sockaddr *)&c->sa, c->salen,
|
||||
c->servername, sizeof(c->servername),
|
||||
NULL, 0, NI_NUMERICHOST);
|
||||
|
50
appl/kf/kf.1
50
appl/kf/kf.1
@@ -1,34 +1,34 @@
|
||||
.\" Copyright (c) 2000 - 2001 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 July 2, 2000
|
||||
|
@@ -1,34 +1,34 @@
|
||||
.\" Copyright (c) 2000 - 2002 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 July 2, 2000
|
||||
|
@@ -693,7 +693,7 @@ replace_cookie(int xserver, int fd, char *filename, int cookiesp) /* XXX */
|
||||
if (f != NULL) {
|
||||
Xauth *auth = find_auth_cookie (f);
|
||||
u_char len[6] = {0, 0, 0, 0, 0, 0};
|
||||
|
||||
|
||||
fclose (f);
|
||||
|
||||
if (auth != NULL) {
|
||||
|
@@ -256,7 +256,7 @@ copy_out (kx_context *kc, int from_fd, int to_fd)
|
||||
}
|
||||
return krb5_write (kc, to_fd, buf, len);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Copy from the socket `from_fd' decrypting to `to_fd'.
|
||||
* Return 0, -1 or len.
|
||||
|
50
appl/kx/kx.1
50
appl/kx/kx.1
@@ -1,34 +1,34 @@
|
||||
.\" Copyright (c) 1996 - 1997 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 September 27, 1996
|
||||
|
@@ -182,7 +182,7 @@ status_output (int debugp)
|
||||
printf ("%u\t%s\t%s\n", (unsigned)getpid(), display, xauthfile);
|
||||
else {
|
||||
pid_t pid;
|
||||
|
||||
|
||||
pid = fork();
|
||||
if (pid < 0) {
|
||||
err(1, "fork");
|
||||
@@ -279,7 +279,7 @@ doit_passive (kx_context *kc)
|
||||
p++;
|
||||
p += kx_get_int (p, &tmp, 4, 0);
|
||||
}
|
||||
|
||||
|
||||
++nchild;
|
||||
child = fork ();
|
||||
if (child < 0) {
|
||||
@@ -292,7 +292,7 @@ doit_passive (kx_context *kc)
|
||||
close (otherside);
|
||||
|
||||
socket_set_port(kc->thataddr, htons(tmp));
|
||||
|
||||
|
||||
fd = socket (kc->thataddr->sa_family, SOCK_STREAM, 0);
|
||||
if (fd < 0)
|
||||
err(1, "socket");
|
||||
|
@@ -1,34 +1,34 @@
|
||||
.\" Copyright (c) 1996 - 1997, 2001 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 September 27, 1996
|
||||
|
@@ -424,7 +424,7 @@ close_connection(int fd, const char *message)
|
||||
p += mlen;
|
||||
while((p - buf) % 4) /* pad to multiple of 4 bytes */
|
||||
*p++ = 0;
|
||||
|
||||
|
||||
/* now fill in length of additional data */
|
||||
if(lsb) {
|
||||
buf[6] = (p - buf - 8) / 4;
|
||||
@@ -502,7 +502,7 @@ doit_passive (kx_context *kc,
|
||||
memcpy (p, xauthfile, len);
|
||||
p += len;
|
||||
rem -= len;
|
||||
|
||||
|
||||
if(kx_write (kc, sock, msg, p - msg) < 0) {
|
||||
syslog (LOG_ERR, "write: %m");
|
||||
cleanup(nsockets, sockets);
|
||||
@@ -515,7 +515,7 @@ doit_passive (kx_context *kc,
|
||||
int i;
|
||||
int ret;
|
||||
int cookiesp = TRUE;
|
||||
|
||||
|
||||
FD_ZERO(&fds);
|
||||
if (sock >= FD_SETSIZE) {
|
||||
syslog (LOG_ERR, "fd too large");
|
||||
@@ -640,7 +640,7 @@ doit_active (kx_context *kc,
|
||||
|
||||
p = msg;
|
||||
*p++ = ACK;
|
||||
|
||||
|
||||
if(kx_write (kc, sock, msg, p - msg) < 0) {
|
||||
syslog (LOG_ERR, "write: %m");
|
||||
return 1;
|
||||
@@ -648,7 +648,7 @@ doit_active (kx_context *kc,
|
||||
for (;;) {
|
||||
pid_t child;
|
||||
int len;
|
||||
|
||||
|
||||
len = kx_read (kc, sock, msg, sizeof(msg));
|
||||
if (len < 0) {
|
||||
syslog (LOG_ERR, "read: %m");
|
||||
|
@@ -1,34 +1,34 @@
|
||||
.\" Copyright (c) 1996 - 1998, 2001 - 2002 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 March 7, 2004
|
||||
|
@@ -1,34 +1,34 @@
|
||||
.\" Copyright (c) 1996 - 1997, 2001 - 2003 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 April 11, 2003
|
||||
|
@@ -1,34 +1,34 @@
|
||||
.\" Copyright (c) 1997, 2001 - 2002 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 March 31, 1997
|
||||
|
@@ -192,7 +192,7 @@ read_limits_conf(const char *file, const struct passwd *pwd)
|
||||
continue;
|
||||
l->has_limit = level;
|
||||
}
|
||||
|
||||
|
||||
/* XXX unclear: if you soft to more than default hard, should
|
||||
we set hard to soft? this code doesn't. */
|
||||
if(strcasecmp(args[1], "soft") == 0 || strcmp(args[1], "-") == 0)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
.\" $Id$
|
||||
.\"
|
||||
.\"
|
||||
.Dd April 22, 2005
|
||||
.Dt LOGIN 1
|
||||
.Os HEIMDAL
|
||||
@@ -13,8 +13,8 @@
|
||||
.Op Fl h Ar hostname
|
||||
.Ar [username]
|
||||
.Sh DESCRIPTION
|
||||
This manual page documents the
|
||||
.Nm login
|
||||
This manual page documents the
|
||||
.Nm login
|
||||
program distributed with the Heimdal Kerberos 5 implementation, it may
|
||||
differ in important ways from your system version.
|
||||
.Pp
|
||||
@@ -22,7 +22,7 @@ The
|
||||
.Nm login
|
||||
programs logs users into the system. It is intended to be run by
|
||||
system daemons like
|
||||
.Xr getty 8
|
||||
.Xr getty 8
|
||||
or
|
||||
.Xr telnetd 8 .
|
||||
If you are already logged in, but want to change to another user, you
|
||||
@@ -32,16 +32,16 @@ should use
|
||||
A username can be given on the command line, else one will be prompted
|
||||
for.
|
||||
.Pp
|
||||
A password is required to login, unless the
|
||||
A password is required to login, unless the
|
||||
.Fl f
|
||||
option is given (indicating that the calling program has already done
|
||||
proper authentication). With
|
||||
.Fl f
|
||||
the user will be logged in without further questions.
|
||||
the user will be logged in without further questions.
|
||||
.Pp
|
||||
For password authentication Kerberos 5, Kerberos 4 (if compiled in),
|
||||
OTP (if compiled in) and local
|
||||
.No ( Pa /etc/passwd )
|
||||
.No ( Pa /etc/passwd )
|
||||
passwords are supported. OTP will be used if the the user is
|
||||
registered to use it, and
|
||||
.Nm login
|
||||
@@ -70,7 +70,7 @@ to preserve all environment variables. If not given, only the
|
||||
and
|
||||
.Dv TZ
|
||||
variables are preserved. It could be a security risk to pass random
|
||||
variables to
|
||||
variables to
|
||||
.Nm login
|
||||
or the user shell, so the calling daemon should make sure it only
|
||||
passes
|
||||
@@ -90,12 +90,12 @@ Then various system parameters are set up, like changing the owner of
|
||||
the tty to the user, setting up signals, setting the group list, and
|
||||
user and group id. Also various machine specific tasks are performed.
|
||||
.Pp
|
||||
Next
|
||||
Next
|
||||
.Nm login
|
||||
changes to the users home directory, or if that fails, to
|
||||
changes to the users home directory, or if that fails, to
|
||||
.Pa / .
|
||||
The environment is setup, by adding some required variables (such as
|
||||
.Dv PATH ) ,
|
||||
.Dv PATH ) ,
|
||||
and also authentication related ones (such as
|
||||
.Dv KRB5CCNAME ) .
|
||||
If an environment file exists
|
||||
@@ -107,31 +107,31 @@ If one or more login message files are configured, their contents is
|
||||
printed to the terminal.
|
||||
.Pp
|
||||
If a login time command is configured, it is executed. A logout time
|
||||
command can also be configured, which makes
|
||||
command can also be configured, which makes
|
||||
.Nm login
|
||||
fork, and wait for the user shell to exit, and then run the command.
|
||||
This can be used to clean up user credentials.
|
||||
.Pp
|
||||
Finally, the user's shell is executed. If the user logging in is root,
|
||||
and root's login shell does not exist, a default shell (usually
|
||||
and root's login shell does not exist, a default shell (usually
|
||||
.Pa /bin/sh )
|
||||
is also tried before giving up.
|
||||
.Sh ENVIRONMENT
|
||||
These environment variables are set by login (not including ones set by
|
||||
These environment variables are set by login (not including ones set by
|
||||
.Pa /etc/environment ) :
|
||||
.Pp
|
||||
.Bl -tag -compact -width USERXXLOGNAME
|
||||
.It Dv PATH
|
||||
the default system path
|
||||
.It Dv HOME
|
||||
the user's home directory (or possibly
|
||||
the user's home directory (or possibly
|
||||
.Pa / )
|
||||
.It Dv USER , Dv LOGNAME
|
||||
both set to the username
|
||||
.It Dv SHELL
|
||||
the user's shell
|
||||
.It Dv TERM , Dv TZ
|
||||
set to whatever is passed to
|
||||
set to whatever is passed to
|
||||
.Nm login
|
||||
.It Dv KRB5CCNAME
|
||||
if the password is verified via Kerberos 5, this will point to the
|
||||
@@ -144,7 +144,7 @@ ticket file
|
||||
.Bl -tag -compact -width Ds
|
||||
.It Pa /etc/environment
|
||||
Contains a set of environment variables that should be set in addition
|
||||
to the ones above. It should contain sh-style assignments like
|
||||
to the ones above. It should contain sh-style assignments like
|
||||
.Dq VARIABLE=value .
|
||||
Note that they are not parsed the way a shell would. No variable
|
||||
expansion is performed, and all strings are literal, and quotation
|
||||
@@ -160,7 +160,7 @@ FOO="this is a string"
|
||||
BAR= FOO='this is a string'
|
||||
.Ed
|
||||
.It Pa /etc/login.access
|
||||
See
|
||||
See
|
||||
.Xr login.access 5 .
|
||||
.It Pa /etc/login.conf
|
||||
This is a termcap style configuration file, that contains various
|
||||
@@ -204,14 +204,14 @@ programs typically print all sorts of information by default, such as
|
||||
last time you logged in, if you have mail, and system message files.
|
||||
This version of
|
||||
.Nm login
|
||||
does not, so there is no reason for
|
||||
does not, so there is no reason for
|
||||
.Pa .hushlogin
|
||||
files or similar. We feel that these tasks are best left to the user's
|
||||
shell, but the
|
||||
shell, but the
|
||||
.Li login_program
|
||||
facility allows for a shell independent solution, if that is desired.
|
||||
.Sh EXAMPLES
|
||||
A
|
||||
A
|
||||
.Pa login.conf
|
||||
file could look like:
|
||||
.Bd -literal -offset indent
|
||||
@@ -224,8 +224,8 @@ The
|
||||
.Pa limits.conf
|
||||
file consists of a table with four whitespace separated fields. First
|
||||
field is a username or a groupname (prefixed with
|
||||
.Sq @ ) ,
|
||||
or
|
||||
.Sq @ ) ,
|
||||
or
|
||||
.Sq * .
|
||||
Second field is
|
||||
.Sq soft ,
|
||||
@@ -234,11 +234,11 @@ or
|
||||
.Sq -
|
||||
(the last meaning both soft and hard).
|
||||
Third field is a limit name (such as
|
||||
.Sq cpu
|
||||
or
|
||||
.Sq cpu
|
||||
or
|
||||
.Sq core ) .
|
||||
Last field is the limit value (a number or
|
||||
.Sq -
|
||||
.Sq -
|
||||
for unlimited). In the case of data sizes, the value is in kilobytes,
|
||||
and cputime is in minutes.
|
||||
.Sh SEE ALSO
|
||||
|
@@ -1,5 +1,5 @@
|
||||
.\" $Id$
|
||||
.\"
|
||||
.\"
|
||||
.Dd March 21, 2003
|
||||
.Dt LOGIN.ACCESS 5
|
||||
.Os HEIMDAL
|
||||
@@ -13,7 +13,7 @@ file specifies on which ttys or from which hosts certain users are
|
||||
allowed to login.
|
||||
.Pp
|
||||
At login, the
|
||||
.Pa /etc/login.access
|
||||
.Pa /etc/login.access
|
||||
file is checked for the first entry that matches a specific user/host
|
||||
or user/tty combination. That entry can either allow or deny login
|
||||
access to that user.
|
||||
@@ -51,5 +51,5 @@ make the group match if the user also matches.
|
||||
.Sh AUTHORS
|
||||
The
|
||||
.Fn login_access
|
||||
function was written by
|
||||
function was written by
|
||||
Wietse Venema. This manual page was written for Heimdal.
|
||||
|
@@ -365,7 +365,7 @@ do_login(const struct passwd *pwd, char *tty, char *ttyn)
|
||||
|
||||
read_limits_conf(file, pwd);
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_SETPCRED
|
||||
if (setpcred (pwd->pw_name, NULL) == -1)
|
||||
warn("setpcred(%s)", pwd->pw_name);
|
||||
@@ -599,7 +599,7 @@ main(int argc, char **argv)
|
||||
print_version (NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (geteuid() != 0)
|
||||
errx(1, "only root may use login, use su");
|
||||
|
||||
@@ -687,7 +687,7 @@ main(int argc, char **argv)
|
||||
sig_handler(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(pwd == NULL){
|
||||
fprintf(stderr, "Login incorrect.\n");
|
||||
ask = 1;
|
||||
|
@@ -1,34 +1,34 @@
|
||||
.\" Copyright (c) 1996, 2000 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 November 17, 1996
|
||||
|
@@ -1,34 +1,34 @@
|
||||
.\" Copyright (c) 1996, 2000 - 2001 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 November 17, 1996
|
||||
|
@@ -195,7 +195,7 @@ main(int argc, char **argv)
|
||||
print_version (NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (argc < 1)
|
||||
usage (1);
|
||||
|
||||
|
@@ -83,14 +83,14 @@ pop_xdele(POP *p)
|
||||
continue; /* no point in returning error */
|
||||
/* Flag the message for deletion */
|
||||
mp->flags |= DEL_FLAG;
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
if(p->debug)
|
||||
pop_log(p, POP_DEBUG,
|
||||
"Deleting message %u at offset %ld of length %ld\n",
|
||||
mp->number, mp->offset, mp->length);
|
||||
#endif /* DEBUG */
|
||||
|
||||
|
||||
/* Update the messages_deleted and bytes_deleted counters */
|
||||
p->msgs_deleted++;
|
||||
p->bytes_deleted += mp->length;
|
||||
|
@@ -105,7 +105,7 @@ add_missing_headers(POP *p, MsgInfoList *mp)
|
||||
p->user);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#ifdef XOVER
|
||||
if (mp->subject == NULL)
|
||||
mp->subject = "<none>";
|
||||
@@ -219,7 +219,7 @@ pop_dropinfo(POP *p)
|
||||
pop_log(p,POP_DEBUG,
|
||||
"Msg %d at offset %ld is %ld octets long and has %u lines and id %s.",
|
||||
mp->number,mp->offset,mp->length,mp->lines, mp->msg_id);
|
||||
#else
|
||||
#else
|
||||
pop_log(p,POP_DEBUG,
|
||||
"Msg %d at offset %d is %d octets long and has %u lines.",
|
||||
mp->number,mp->offset,mp->length,mp->lines);
|
||||
|
@@ -62,7 +62,7 @@ krb5_authenticate (POP *p, int s, u_char *buf, struct sockaddr *addr)
|
||||
if (memcmp (buf, "\x00\x00\x00\x13", 4) != 0)
|
||||
return -1;
|
||||
len = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | (buf[3]);
|
||||
|
||||
|
||||
if (krb5_net_read(p->context, &s, buf, len) != len)
|
||||
return -1;
|
||||
if (len != sizeof(KRB5_SENDAUTH_VERSION)
|
||||
|
@@ -109,7 +109,7 @@ login_user(POP *p)
|
||||
/* Make a temporary copy of the user's maildrop */
|
||||
/* and set the group and user id */
|
||||
if (pop_dropcopy(p, pw) != POP_SUCCESS) return (POP_FAILURE);
|
||||
|
||||
|
||||
/* Get information about the maildrop */
|
||||
if (pop_dropinfo(p) != POP_SUCCESS) return(POP_FAILURE);
|
||||
} else {
|
||||
@@ -143,7 +143,7 @@ pop_pass (POP *p)
|
||||
#ifdef KRB5
|
||||
if (p->version == 5) {
|
||||
char *name;
|
||||
|
||||
|
||||
if (!krb5_kuserok (p->context, p->principal, p->user)) {
|
||||
pop_log (p, POP_PRIORITY,
|
||||
"krb5 permission denied");
|
||||
|
@@ -1,34 +1,34 @@
|
||||
.\" Copyright (c) 2001 - 2004 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 July 14, 2004
|
||||
@@ -54,7 +54,7 @@ serves mail via the Post Office Protocol. Supported options include:
|
||||
.It Fl a Ar plaintext Ns \*(Ba Ns Ar otp Ns \*(Ba Ns Ar sasl
|
||||
Tells
|
||||
.Nm
|
||||
which authentication mode is acceptable,
|
||||
which authentication mode is acceptable,
|
||||
.Ar sasl
|
||||
enables SASL (RFC2222), and
|
||||
.Ar otp
|
||||
|
@@ -1,34 +1,34 @@
|
||||
.\" Copyright (c) 2000 - 2002 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 March 4, 2000
|
||||
|
@@ -168,20 +168,20 @@ write_state_init (struct write_state *w, int fd)
|
||||
static void
|
||||
write_state_add (struct write_state *w, void *v, size_t len)
|
||||
{
|
||||
if(w->niovecs == w->allociovecs) {
|
||||
if(w->niovecs == w->maxiovecs) {
|
||||
if(writev (w->fd, w->iovecs, w->niovecs) < 0)
|
||||
err(1, "writev");
|
||||
w->niovecs = 0;
|
||||
} else {
|
||||
w->allociovecs = min(w->allociovecs + STEP, w->maxiovecs);
|
||||
w->iovecs = erealloc (w->iovecs,
|
||||
w->allociovecs * sizeof(*w->iovecs));
|
||||
}
|
||||
}
|
||||
w->iovecs[w->niovecs].iov_base = v;
|
||||
w->iovecs[w->niovecs].iov_len = len;
|
||||
++w->niovecs;
|
||||
if(w->niovecs == w->allociovecs) {
|
||||
if(w->niovecs == w->maxiovecs) {
|
||||
if(writev (w->fd, w->iovecs, w->niovecs) < 0)
|
||||
err(1, "writev");
|
||||
w->niovecs = 0;
|
||||
} else {
|
||||
w->allociovecs = min(w->allociovecs + STEP, w->maxiovecs);
|
||||
w->iovecs = erealloc (w->iovecs,
|
||||
w->allociovecs * sizeof(*w->iovecs));
|
||||
}
|
||||
}
|
||||
w->iovecs[w->niovecs].iov_base = v;
|
||||
w->iovecs[w->niovecs].iov_len = len;
|
||||
++w->niovecs;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -310,12 +310,12 @@ doit(int s,
|
||||
else
|
||||
err (1, "select");
|
||||
}
|
||||
|
||||
|
||||
if (FD_ISSET(s, &readset)) {
|
||||
char *beg, *p;
|
||||
size_t rem;
|
||||
int blank_line = 0;
|
||||
|
||||
|
||||
if(in_len >= in_buf_size) {
|
||||
char *tmp = erealloc(in_buf, in_buf_size + PUSH_BUFSIZ + 1);
|
||||
in_ptr = tmp + (in_ptr - in_buf);
|
||||
@@ -328,11 +328,11 @@ doit(int s,
|
||||
err (1, "read");
|
||||
else if (ret == 0)
|
||||
errx (1, "EOF during read");
|
||||
|
||||
|
||||
in_len += ret;
|
||||
in_ptr += ret;
|
||||
*in_ptr = '\0';
|
||||
|
||||
|
||||
beg = in_buf;
|
||||
rem = in_len;
|
||||
while(rem > 1
|
||||
@@ -727,7 +727,7 @@ main(int argc, char **argv)
|
||||
print_version(NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (do_from && header_str == NULL)
|
||||
header_str = "From:";
|
||||
else if (header_str != NULL)
|
||||
|
@@ -17,7 +17,7 @@
|
||||
.Ar file... directory
|
||||
.Sh DESCRIPTION
|
||||
.Nm rcp
|
||||
copies files between machines. Each file argument is either a remote file name of the form
|
||||
copies files between machines. Each file argument is either a remote file name of the form
|
||||
.Dq rname@rhost:path
|
||||
or a local file (containing no colon or with a slash before the first
|
||||
colon).
|
||||
@@ -25,11 +25,11 @@ colon).
|
||||
Supported options:
|
||||
.Bl -tag -width Ds
|
||||
.It Xo
|
||||
.Fl 4 ,
|
||||
.Fl 5 ,
|
||||
.Fl K ,
|
||||
.Fl F ,
|
||||
.Fl x ,
|
||||
.Fl 4 ,
|
||||
.Fl 5 ,
|
||||
.Fl K ,
|
||||
.Fl F ,
|
||||
.Fl x ,
|
||||
.Fl z
|
||||
.Xc
|
||||
These options are passed on to
|
||||
@@ -37,7 +37,7 @@ These options are passed on to
|
||||
.It Fl P Ar port
|
||||
This will pass the option
|
||||
.Fl p Ar port
|
||||
to
|
||||
to
|
||||
.Xr rsh 1 .
|
||||
.It Fl p
|
||||
Preserve file permissions.
|
||||
@@ -58,7 +58,7 @@ connection".
|
||||
.\".Sh SEE ALSO
|
||||
.\".Sh STANDARDS
|
||||
.Sh HISTORY
|
||||
The
|
||||
The
|
||||
.Nm rcp
|
||||
utility first appeared in 4.2BSD. This version is derived from
|
||||
4.3BSD-Reno.
|
||||
|
@@ -101,7 +101,7 @@ main(int argc, char **argv)
|
||||
print_version (NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
iamremote = (fflag || tflag);
|
||||
|
||||
argc -= optind;
|
||||
@@ -384,7 +384,7 @@ rsource(char *name, struct stat *statp)
|
||||
}
|
||||
}
|
||||
snprintf(path, sizeof(path),
|
||||
"D%04o %d %s\n",
|
||||
"D%04o %d %s\n",
|
||||
(unsigned int)(statp->st_mode & MODEMASK), 0, last);
|
||||
write(remout, path, strlen(path));
|
||||
if (response() < 0) {
|
||||
|
@@ -105,7 +105,7 @@ do_read (int fd, void *buf, size_t sz, void *ivec)
|
||||
status = krb5_decrypt_ivec(context, crypto, key_usage,
|
||||
edata, outer_len, &data, ivec);
|
||||
free (edata);
|
||||
|
||||
|
||||
if (status)
|
||||
krb5_err (context, 1, status, "decrypting data");
|
||||
if(ivec != NULL) {
|
||||
|
@@ -1,34 +1,34 @@
|
||||
.\" Copyright (c) 2002 - 2003 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 February 20, 2004
|
||||
@@ -126,7 +126,7 @@ The opposite of
|
||||
This is the default, and is mainly useful if encryption has been
|
||||
enabled by default, for instance in the
|
||||
.Li appdefaults
|
||||
section of
|
||||
section of
|
||||
.Pa /etc/krb5.conf
|
||||
when using Kerberos 5.
|
||||
.It Xo
|
||||
@@ -142,7 +142,7 @@ Also settable via
|
||||
.Fl F ,
|
||||
.Fl Fl forwardable
|
||||
.Xc
|
||||
Make the forwarded credentials re-forwardable.
|
||||
Make the forwarded credentials re-forwardable.
|
||||
Also settable via
|
||||
.Li appdefaults
|
||||
(see
|
||||
@@ -160,7 +160,7 @@ format allow the remote name to be specified.
|
||||
.Fl n ,
|
||||
.Fl Fl no-input
|
||||
.Xc
|
||||
Direct input from
|
||||
Direct input from
|
||||
.Pa /dev/null
|
||||
(see the
|
||||
.Sx BUGS
|
||||
@@ -182,7 +182,7 @@ Specifies the protocol version to use with Kerberos 5.
|
||||
.Ar N
|
||||
and
|
||||
.Ar 2
|
||||
select protocol version 2, while
|
||||
select protocol version 2, while
|
||||
.Ar O
|
||||
and
|
||||
.Ar 1
|
||||
|
@@ -297,7 +297,7 @@ send_krb5_auth(int s,
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
|
||||
|
||||
status = krb5_sendauth (context,
|
||||
&auth_context,
|
||||
&s,
|
||||
@@ -645,7 +645,7 @@ doit_broken (int argc,
|
||||
|
||||
if (connect (priv_socket1, ai->ai_addr, ai->ai_addrlen) < 0) {
|
||||
int save_errno = errno;
|
||||
|
||||
|
||||
close(priv_socket1);
|
||||
close(priv_socket2);
|
||||
|
||||
|
@@ -1,34 +1,34 @@
|
||||
.\" Copyright (c) 2001 - 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 November 22, 2002
|
||||
|
@@ -258,7 +258,7 @@ recv_krb5_auth (int s, u_char *buf,
|
||||
if (memcmp (buf, "\x00\x00\x00\x13", 4) != 0)
|
||||
return -1;
|
||||
len = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | (buf[3]);
|
||||
|
||||
|
||||
if (net_read(s, buf, len) != len)
|
||||
syslog_and_die ("reading auth info: %s", strerror(errno));
|
||||
if (len != sizeof(KRB5_SENDAUTH_VERSION)
|
||||
@@ -394,7 +394,7 @@ recv_krb5_auth (int s, u_char *buf,
|
||||
*cmd);
|
||||
free (name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
krb5_auth_con_free(context, auth_context);
|
||||
|
||||
@@ -918,12 +918,12 @@ main(int argc, char **argv)
|
||||
int error;
|
||||
struct addrinfo *ai = NULL, hints;
|
||||
char portstr[NI_MAXSERV];
|
||||
|
||||
|
||||
memset (&hints, 0, sizeof(hints));
|
||||
hints.ai_flags = AI_PASSIVE;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
hints.ai_family = PF_UNSPEC;
|
||||
|
||||
|
||||
if(port_str != NULL) {
|
||||
error = getaddrinfo (NULL, port_str, &hints, &ai);
|
||||
if (error)
|
||||
|
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)
|
||||
|
@@ -108,7 +108,7 @@ static long i_support_encrypt = typemask(ENCTYPE_DES_CFB64)
|
||||
static Encryptions encryptions[] = {
|
||||
#if defined(DES_ENCRYPTION)
|
||||
{ "DES_CFB64", ENCTYPE_DES_CFB64,
|
||||
cfb64_encrypt,
|
||||
cfb64_encrypt,
|
||||
cfb64_decrypt,
|
||||
cfb64_init,
|
||||
cfb64_start,
|
||||
@@ -118,7 +118,7 @@ static long i_support_encrypt = typemask(ENCTYPE_DES_CFB64)
|
||||
cfb64_keyid,
|
||||
cfb64_printsub },
|
||||
{ "DES_OFB64", ENCTYPE_DES_OFB64,
|
||||
ofb64_encrypt,
|
||||
ofb64_encrypt,
|
||||
ofb64_decrypt,
|
||||
ofb64_init,
|
||||
ofb64_start,
|
||||
@@ -388,7 +388,7 @@ encrypt_display(void)
|
||||
ENCTYPE_NAME(encrypt_mode));
|
||||
else
|
||||
printf("Currently not encrypting output\r\n");
|
||||
|
||||
|
||||
if (decrypt_input)
|
||||
printf("Currently decrypting input with %s\r\n",
|
||||
ENCTYPE_NAME(decrypt_mode));
|
||||
@@ -411,7 +411,7 @@ EncryptStatus(void)
|
||||
ENCTYPE_NAME(encrypt_mode));
|
||||
} else
|
||||
printf("Currently not encrypting output\r\n");
|
||||
|
||||
|
||||
if (decrypt_input) {
|
||||
printf("Currently decrypting input with %s\r\n",
|
||||
ENCTYPE_NAME(decrypt_mode));
|
||||
|
@@ -75,7 +75,7 @@ char **
|
||||
genget(char *name, char **table, int stlen)
|
||||
/* name to match */
|
||||
/* name entry in table */
|
||||
|
||||
|
||||
{
|
||||
char **c, **found;
|
||||
int n;
|
||||
|
@@ -135,7 +135,7 @@ Data(Authenticator *ap, int type, const void *d, int c)
|
||||
|
||||
memcpy(p0, str_data, sizeof(str_data));
|
||||
p = p0 + sizeof(str_data);
|
||||
|
||||
|
||||
if (auth_debug_mode) {
|
||||
printf("%s:%d: [%d] (%d)",
|
||||
str_data[3] == TELQUAL_IS ? ">>>IS" : ">>>REPLY",
|
||||
@@ -215,7 +215,7 @@ kerberos5_send(char *name, Authenticator *ap)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if ((ap->way & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL)
|
||||
ap_opts = AP_OPTS_MUTUAL_REQUIRED;
|
||||
else
|
||||
@@ -418,13 +418,13 @@ kerberos5_is(Authenticator *ap, unsigned char *data, int cnt)
|
||||
free (errbuf);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
char ap_msg[2];
|
||||
|
||||
|
||||
ap_msg[0] = ap->type;
|
||||
ap_msg[1] = ap->way;
|
||||
|
||||
|
||||
ret = krb5_verify_authenticator_checksum(context,
|
||||
auth_context,
|
||||
ap_msg,
|
||||
@@ -536,7 +536,7 @@ kerberos5_is(Authenticator *ap, unsigned char *data, int cnt)
|
||||
}
|
||||
auth_finished(ap, AUTH_USER);
|
||||
krb5_free_keyblock(context, key_block);
|
||||
|
||||
|
||||
break;
|
||||
case KRB_FORWARD: {
|
||||
struct passwd *pwd;
|
||||
@@ -628,7 +628,7 @@ kerberos5_reply(Authenticator *ap, unsigned char *data, int cnt)
|
||||
krb5_error_code ret;
|
||||
Session_Key skey;
|
||||
krb5_keyblock *keyblock;
|
||||
|
||||
|
||||
if ((ap->way & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL &&
|
||||
!mutual_complete) {
|
||||
printf("[ Kerberos V5 accepted you, but didn't provide mutual authentication! ]\r\n");
|
||||
@@ -639,7 +639,7 @@ kerberos5_reply(Authenticator *ap, unsigned char *data, int cnt)
|
||||
printf("[ Kerberos V5 accepts you as ``%.*s'' ]\r\n", cnt, data);
|
||||
else
|
||||
printf("[ Kerberos V5 accepts you ]\r\n");
|
||||
|
||||
|
||||
ret = krb5_auth_con_getlocalsubkey (context,
|
||||
auth_context,
|
||||
&keyblock);
|
||||
@@ -653,7 +653,7 @@ kerberos5_reply(Authenticator *ap, unsigned char *data, int cnt)
|
||||
auth_send_retry();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
skey.type = SK_DES;
|
||||
skey.length = 8;
|
||||
skey.data = keyblock->keyvalue.data;
|
||||
@@ -670,7 +670,7 @@ kerberos5_reply(Authenticator *ap, unsigned char *data, int cnt)
|
||||
krb5_ap_rep_enc_part *reply;
|
||||
krb5_data inbuf;
|
||||
krb5_error_code ret;
|
||||
|
||||
|
||||
inbuf.length = cnt;
|
||||
inbuf.data = (char *)data;
|
||||
|
||||
|
@@ -2181,7 +2181,7 @@ tn(int argc, char **argv)
|
||||
addrstr, sizeof(addrstr),
|
||||
NULL, 0, NI_NUMERICHOST) != 0)
|
||||
strlcpy (addrstr, "unknown address", sizeof(addrstr));
|
||||
|
||||
|
||||
printf("Trying %s...\r\n", addrstr);
|
||||
|
||||
net = socket (a->ai_family, a->ai_socktype, a->ai_protocol);
|
||||
|
@@ -164,7 +164,7 @@ main(int argc, char **argv)
|
||||
#ifdef KRB5
|
||||
krb5_init();
|
||||
#endif
|
||||
|
||||
|
||||
tninit(); /* Clear out things */
|
||||
|
||||
TerminalSaveState();
|
||||
|
@@ -2130,7 +2130,7 @@ my_telnet(char *user)
|
||||
printf("\nServer disconnected.\n");
|
||||
Exit(1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (printed_encrypt) {
|
||||
printf("Encryption negotiated.\n");
|
||||
|
@@ -250,7 +250,7 @@ optionstatus(void)
|
||||
|
||||
static void __attribute__((format (printf, 3, 4)))
|
||||
qprintf(int quote, FILE *f, const char *fmt, ...)
|
||||
|
||||
|
||||
{
|
||||
va_list va;
|
||||
if (quote)
|
||||
|
@@ -506,7 +506,7 @@ willoption(int option)
|
||||
changeok++;
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@@ -391,7 +391,7 @@ int getpty(int *ptynum)
|
||||
{
|
||||
char *clone[] = { "/dev/ptc", "/dev/ptmx", "/dev/ptm",
|
||||
"/dev/ptym/clone", 0 };
|
||||
|
||||
|
||||
char **q;
|
||||
int p;
|
||||
for(q=clone; *q; q++){
|
||||
@@ -415,7 +415,7 @@ int getpty(int *ptynum)
|
||||
int p;
|
||||
char *cp, *p1, *p2;
|
||||
int i;
|
||||
|
||||
|
||||
#ifndef __hpux
|
||||
snprintf(line, sizeof(Xline), "/dev/ptyXX");
|
||||
p1 = &line[8];
|
||||
@@ -425,11 +425,11 @@ int getpty(int *ptynum)
|
||||
p1 = &line[13];
|
||||
p2 = &line[14];
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
for (cp = "pqrstuvwxyzPQRST"; *cp; cp++) {
|
||||
struct stat stb;
|
||||
|
||||
|
||||
*p1 = *cp;
|
||||
*p2 = '0';
|
||||
/*
|
||||
@@ -446,7 +446,7 @@ int getpty(int *ptynum)
|
||||
#if SunOS == 40
|
||||
int dummy;
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __hpux
|
||||
line[5] = 't';
|
||||
#else
|
||||
@@ -474,7 +474,7 @@ int getpty(int *ptynum)
|
||||
extern lowpty, highpty;
|
||||
struct stat sb;
|
||||
int p;
|
||||
|
||||
|
||||
for (*ptynum = lowpty; *ptynum <= highpty; (*ptynum)++) {
|
||||
snprintf(myline, sizeof(myline), "/dev/pty/%03d", *ptynum);
|
||||
p = open(myline, 2);
|
||||
@@ -856,7 +856,7 @@ void getptyslave(void)
|
||||
|
||||
#ifdef STREAMSPTY
|
||||
ttyfd = t;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Not all systems have (or need) modules ttcompat and pckt so
|
||||
@@ -876,7 +876,7 @@ void getptyslave(void)
|
||||
pushed (via autopush, for instance).
|
||||
|
||||
*/
|
||||
|
||||
|
||||
char *ttymodules[] = { "ttcompat", "ldterm", "ptem", NULL };
|
||||
char *ptymodules[] = { "pckt", NULL };
|
||||
|
||||
@@ -1289,11 +1289,11 @@ start_login(const char *host, int autologin, char *name)
|
||||
struct utmpx utmpx;
|
||||
struct timeval tv;
|
||||
char *clean_tty;
|
||||
|
||||
|
||||
/*
|
||||
* Create utmp entry for child
|
||||
*/
|
||||
|
||||
|
||||
clean_tty = clean_ttyname(line);
|
||||
memset(&utmpx, 0, sizeof(utmpx));
|
||||
strncpy(utmpx.ut_user, ".telnet", sizeof(utmpx.ut_user));
|
||||
@@ -1302,9 +1302,9 @@ start_login(const char *host, int autologin, char *name)
|
||||
strncpy(utmpx.ut_id, make_id(clean_tty), sizeof(utmpx.ut_id));
|
||||
#endif
|
||||
utmpx.ut_pid = pid;
|
||||
|
||||
|
||||
utmpx.ut_type = LOGIN_PROCESS;
|
||||
|
||||
|
||||
gettimeofday (&tv, NULL);
|
||||
utmpx.ut_tv.tv_sec = tv.tv_sec;
|
||||
utmpx.ut_tv.tv_usec = tv.tv_usec;
|
||||
@@ -1315,7 +1315,7 @@ start_login(const char *host, int autologin, char *name)
|
||||
#endif
|
||||
|
||||
scrub_env();
|
||||
|
||||
|
||||
/*
|
||||
* -h : pass on name of host.
|
||||
* WARNING: -h is accepted by login if and only if
|
||||
@@ -1444,7 +1444,7 @@ rmut(void)
|
||||
#elif defined(__osf__) /* XXX */
|
||||
utxp->ut_exit.ut_termination = 0;
|
||||
utxp->ut_exit.ut_exit = 0;
|
||||
#else
|
||||
#else
|
||||
utxp->ut_exit.e_termination = 0;
|
||||
utxp->ut_exit.e_exit = 0;
|
||||
#endif
|
||||
|
@@ -338,7 +338,7 @@ main(int argc, char **argv)
|
||||
case 'L':
|
||||
new_login = optarg;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
fprintf(stderr, "telnetd: %c: unknown option\n", ch);
|
||||
/* FALLTHROUGH */
|
||||
|
@@ -922,28 +922,28 @@ printsub(int direction, unsigned char *pointer, size_t length)
|
||||
output_data("VAR ");
|
||||
quote = 0;
|
||||
break;
|
||||
|
||||
|
||||
case NEW_ENV_VALUE:
|
||||
if (quote)
|
||||
output_data("\" ");
|
||||
output_data("VALUE ");
|
||||
quote = 0;
|
||||
break;
|
||||
|
||||
|
||||
case ENV_ESC:
|
||||
if (quote)
|
||||
output_data("\" ");
|
||||
output_data("ESC ");
|
||||
quote = 0;
|
||||
break;
|
||||
|
||||
|
||||
case ENV_USERVAR:
|
||||
if (quote)
|
||||
output_data("\" ");
|
||||
output_data("USERVAR ");
|
||||
quote = 0;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
if (isprint(pointer[i]) && pointer[i] != '"') {
|
||||
if (!quote) {
|
||||
|
@@ -124,7 +124,7 @@ proto (int sock, const char *hostname, const char *service)
|
||||
if (str == NULL)
|
||||
errx(1, "malloc - out of memory");
|
||||
name_token.value = str;
|
||||
|
||||
|
||||
maj_stat = gss_import_name (&min_stat,
|
||||
&name_token,
|
||||
GSS_C_NT_HOSTBASED_SERVICE,
|
||||
|
@@ -216,7 +216,7 @@ http_query(const char *host, const char *page,
|
||||
break;
|
||||
else if (ret < 0)
|
||||
err (1, "read: %lu", (unsigned long)ret);
|
||||
|
||||
|
||||
in_buf[ret + in_len] = '\0';
|
||||
|
||||
if (state == HEADER || state == RESPONSE) {
|
||||
@@ -362,7 +362,7 @@ main(int argc, char **argv)
|
||||
|
||||
if (verbose_flag)
|
||||
printf("Negotiate found\n");
|
||||
|
||||
|
||||
if (server == GSS_C_NO_NAME) {
|
||||
char *name;
|
||||
asprintf(&name, "%s@%s", gss_service, host);
|
||||
@@ -474,7 +474,7 @@ main(int argc, char **argv)
|
||||
base64_encode(output_token.value,
|
||||
output_token.length,
|
||||
&neg_token);
|
||||
|
||||
|
||||
asprintf(&headers[0], "Authorization: Negotiate %s",
|
||||
neg_token);
|
||||
|
||||
|
@@ -107,7 +107,7 @@ gss_print_errors (int min_stat)
|
||||
GSS_C_NO_OID,
|
||||
&msg_ctx,
|
||||
&status_string);
|
||||
fprintf (stderr, "%.*s\n",
|
||||
fprintf (stderr, "%.*s\n",
|
||||
(int)status_string.length,
|
||||
(char *)status_string.value);
|
||||
gss_release_buffer (&new_stat, &status_string);
|
||||
|
@@ -121,7 +121,7 @@ proto (int sock, const char *service)
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
|
||||
if (status)
|
||||
krb5_err(context, 1, status, "krb5_sendauth");
|
||||
|
||||
|
@@ -998,7 +998,7 @@ main (int argc, char **argv)
|
||||
struct xxx{
|
||||
Pixel bg;
|
||||
}res;
|
||||
|
||||
|
||||
XtResource Res[] = {
|
||||
{ XtNbackground, XtCBackground, XtRPixel, sizeof(Pixel),
|
||||
XtOffsetOf(struct xxx, bg), XtRString, "black" }
|
||||
@@ -1072,7 +1072,7 @@ main (int argc, char **argv)
|
||||
GrabModeAsync, XtWindow(widget),
|
||||
None, CurrentTime)) != 0)
|
||||
errx(1, "Failed to grab pointer (%d)", i);
|
||||
|
||||
|
||||
if((i = XGrabKeyboard(dpy, XtWindow(widget), True, GrabModeAsync,
|
||||
GrabModeAsync, CurrentTime)) != 0)
|
||||
errx(1, "Failed to grab keyboard (%d)", i);
|
||||
|
@@ -120,7 +120,7 @@ heim_dict_create(size_t size)
|
||||
heim_release(dict);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
dict->tab = calloc(dict->size, sizeof(dict->tab[0]));
|
||||
if (dict->tab == NULL) {
|
||||
dict->size = 0;
|
||||
|
@@ -369,7 +369,7 @@ void
|
||||
heim_abortv(const char *fmt, va_list ap)
|
||||
{
|
||||
static char str[1024];
|
||||
|
||||
|
||||
vsnprintf(str, sizeof(str), fmt, ap);
|
||||
syslog(LOG_ERR, "heim_abort: %s", str);
|
||||
abort();
|
||||
|
@@ -139,9 +139,9 @@ heim_json2base(const void *data, size_t length)
|
||||
|
||||
out:
|
||||
if (ret && o) {
|
||||
heim_release(o);
|
||||
heim_release(o);
|
||||
o = NULL;
|
||||
}
|
||||
|
||||
|
||||
return o;
|
||||
}
|
||||
|
@@ -67,13 +67,13 @@
|
||||
|
||||
#define HEIMDAL_RWLOCK rwlock_t
|
||||
#define HEIMDAL_RWLOCK_INITIALIZER RWLOCK_INITIALIZER
|
||||
#define HEIMDAL_RWLOCK_init(l) rwlock_init(l, NULL)
|
||||
#define HEIMDAL_RWLOCK_rdlock(l) rwlock_rdlock(l)
|
||||
#define HEIMDAL_RWLOCK_wrlock(l) rwlock_wrlock(l)
|
||||
#define HEIMDAL_RWLOCK_tryrdlock(l) rwlock_tryrdlock(l)
|
||||
#define HEIMDAL_RWLOCK_trywrlock(l) rwlock_trywrlock(l)
|
||||
#define HEIMDAL_RWLOCK_unlock(l) rwlock_unlock(l)
|
||||
#define HEIMDAL_RWLOCK_destroy(l) rwlock_destroy(l)
|
||||
#define HEIMDAL_RWLOCK_init(l) rwlock_init(l, NULL)
|
||||
#define HEIMDAL_RWLOCK_rdlock(l) rwlock_rdlock(l)
|
||||
#define HEIMDAL_RWLOCK_wrlock(l) rwlock_wrlock(l)
|
||||
#define HEIMDAL_RWLOCK_tryrdlock(l) rwlock_tryrdlock(l)
|
||||
#define HEIMDAL_RWLOCK_trywrlock(l) rwlock_trywrlock(l)
|
||||
#define HEIMDAL_RWLOCK_unlock(l) rwlock_unlock(l)
|
||||
#define HEIMDAL_RWLOCK_destroy(l) rwlock_destroy(l)
|
||||
|
||||
#define HEIMDAL_thread_key thread_key_t
|
||||
#define HEIMDAL_key_create(k,d,r) do { r = thr_keycreate(k,d); } while(0)
|
||||
@@ -94,13 +94,13 @@
|
||||
|
||||
#define HEIMDAL_RWLOCK rwlock_t
|
||||
#define HEIMDAL_RWLOCK_INITIALIZER RWLOCK_INITIALIZER
|
||||
#define HEIMDAL_RWLOCK_init(l) pthread_rwlock_init(l, NULL)
|
||||
#define HEIMDAL_RWLOCK_rdlock(l) pthread_rwlock_rdlock(l)
|
||||
#define HEIMDAL_RWLOCK_wrlock(l) pthread_rwlock_wrlock(l)
|
||||
#define HEIMDAL_RWLOCK_tryrdlock(l) pthread_rwlock_tryrdlock(l)
|
||||
#define HEIMDAL_RWLOCK_trywrlock(l) pthread_rwlock_trywrlock(l)
|
||||
#define HEIMDAL_RWLOCK_unlock(l) pthread_rwlock_unlock(l)
|
||||
#define HEIMDAL_RWLOCK_destroy(l) pthread_rwlock_destroy(l)
|
||||
#define HEIMDAL_RWLOCK_init(l) pthread_rwlock_init(l, NULL)
|
||||
#define HEIMDAL_RWLOCK_rdlock(l) pthread_rwlock_rdlock(l)
|
||||
#define HEIMDAL_RWLOCK_wrlock(l) pthread_rwlock_wrlock(l)
|
||||
#define HEIMDAL_RWLOCK_tryrdlock(l) pthread_rwlock_tryrdlock(l)
|
||||
#define HEIMDAL_RWLOCK_trywrlock(l) pthread_rwlock_trywrlock(l)
|
||||
#define HEIMDAL_RWLOCK_unlock(l) pthread_rwlock_unlock(l)
|
||||
#define HEIMDAL_RWLOCK_destroy(l) pthread_rwlock_destroy(l)
|
||||
|
||||
#define HEIMDAL_thread_key pthread_key_t
|
||||
#define HEIMDAL_key_create(k,d,r) do { r = pthread_key_create(k,d); } while(0)
|
||||
|
@@ -158,7 +158,7 @@ cpw_entry(struct passwd_options *opt, int argc, char **argv)
|
||||
"--random-key, --random-password, --password, --key\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if (opt->key_string) {
|
||||
const char *error;
|
||||
|
||||
|
12
kadmin/get.c
12
kadmin/get.c
@@ -171,23 +171,23 @@ format_field(kadm5_principal_ent_t princ, unsigned int field,
|
||||
case KADM5_PRINC_EXPIRE_TIME:
|
||||
time_t2str(princ->princ_expire_time, buf, buf_len, !condensed);
|
||||
break;
|
||||
|
||||
|
||||
case KADM5_PW_EXPIRATION:
|
||||
time_t2str(princ->pw_expiration, buf, buf_len, !condensed);
|
||||
break;
|
||||
|
||||
|
||||
case KADM5_LAST_PWD_CHANGE:
|
||||
time_t2str(princ->last_pwd_change, buf, buf_len, !condensed);
|
||||
break;
|
||||
|
||||
|
||||
case KADM5_MAX_LIFE:
|
||||
deltat2str(princ->max_life, buf, buf_len);
|
||||
break;
|
||||
|
||||
|
||||
case KADM5_MAX_RLIFE:
|
||||
deltat2str(princ->max_renewable_life, buf, buf_len);
|
||||
break;
|
||||
|
||||
|
||||
case KADM5_MOD_TIME:
|
||||
time_t2str(princ->mod_date, buf, buf_len, !condensed);
|
||||
break;
|
||||
@@ -489,7 +489,7 @@ getit(struct get_options *opt, const char *name, int argc, char **argv)
|
||||
ret = setup_columns(&data, DEFAULT_COLUMNS_SHORT);
|
||||
} else
|
||||
ret = setup_columns(&data, opt->column_info_string);
|
||||
|
||||
|
||||
if(ret != 0) {
|
||||
if(data.table != NULL)
|
||||
rtbl_destroy(data.table);
|
||||
|
@@ -222,8 +222,8 @@ Possible attributes are:
|
||||
.Li disallow-forwardable ,
|
||||
.Li disallow-postdated
|
||||
.Pp
|
||||
Attributes may be negated with a "-", e.g.,
|
||||
.Pp
|
||||
Attributes may be negated with a "-", e.g.,
|
||||
.Pp
|
||||
kadmin -l modify -a -disallow-proxiable user
|
||||
.Ed
|
||||
.Pp
|
||||
|
@@ -63,15 +63,15 @@ static struct getargs args[] = {
|
||||
"key-file", 'k', arg_string, &keyfile,
|
||||
"location of master key file", "file"
|
||||
},
|
||||
{
|
||||
{
|
||||
"realm", 'r', arg_string, &realm,
|
||||
"realm to use", "realm"
|
||||
},
|
||||
{
|
||||
{
|
||||
"admin-server", 'a', arg_string, &admin_server,
|
||||
"server to contact", "host"
|
||||
},
|
||||
{
|
||||
{
|
||||
"server-port", 's', arg_integer, &server_port,
|
||||
"port to use", "port number"
|
||||
},
|
||||
@@ -211,7 +211,7 @@ main(int argc, char **argv)
|
||||
|
||||
kadm5_setup_passwd_quality_check (context,
|
||||
check_library, check_function);
|
||||
|
||||
|
||||
for (i = 0; i < policy_libraries.num_strings; i++) {
|
||||
ret = kadm5_add_passwd_quality_verifier(context,
|
||||
policy_libraries.strings[i]);
|
||||
@@ -221,7 +221,7 @@ main(int argc, char **argv)
|
||||
ret = kadm5_add_passwd_quality_verifier(context, NULL);
|
||||
if (ret)
|
||||
krb5_err(context, 1, ret, "kadm5_add_passwd_quality_verifier");
|
||||
|
||||
|
||||
ret = kadm5_s_init_with_password_ctx(context,
|
||||
KADM5_ADMIN_SERVICE,
|
||||
NULL,
|
||||
|
@@ -1,34 +1,34 @@
|
||||
.\" Copyright (c) 2002 - 2004 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 December 8, 2004
|
||||
|
@@ -162,7 +162,7 @@ main(int argc, char **argv)
|
||||
|
||||
if(debug_flag) {
|
||||
int debug_port;
|
||||
|
||||
|
||||
if(port_str == NULL)
|
||||
debug_port = krb5_getportbyname (context, "kerberos-adm",
|
||||
"tcp", 749);
|
||||
|
@@ -205,7 +205,7 @@ parse_keys(hdb_entry *ent, char *str)
|
||||
if (key->salt == NULL)
|
||||
krb5_errx (context, 1, "malloc: out of memory");
|
||||
key->salt->type = type;
|
||||
|
||||
|
||||
if (p_len) {
|
||||
if(*p == '\"') {
|
||||
ret = krb5_data_copy(&key->salt->salt, p + 1, p_len - 2);
|
||||
@@ -411,7 +411,7 @@ doit(const char *filename, int mergep)
|
||||
}
|
||||
}
|
||||
p = skip_next(p);
|
||||
|
||||
|
||||
e.key = p;
|
||||
p = skip_next(p);
|
||||
|
||||
@@ -454,14 +454,14 @@ doit(const char *filename, int mergep)
|
||||
krb5_free_error_message(context, msg);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (parse_keys(&ent.entry, e.key)) {
|
||||
fprintf (stderr, "%s:%d:error parsing keys (%s)\n",
|
||||
filename, line, e.key);
|
||||
hdb_free_entry (context, &ent);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (parse_event(&ent.entry.created_by, e.created) == -1) {
|
||||
fprintf (stderr, "%s:%d:error parsing created event (%s)\n",
|
||||
filename, line, e.created);
|
||||
|
@@ -63,7 +63,7 @@ add_constrained_delegation(krb5_context contextp,
|
||||
HDB_extension ext;
|
||||
krb5_data buf;
|
||||
size_t size = 0;
|
||||
|
||||
|
||||
memset(&ext, 0, sizeof(ext));
|
||||
ext.mandatory = FALSE;
|
||||
ext.data.element = choice_HDB_extension_data_allowed_to_delegate_to;
|
||||
@@ -79,7 +79,7 @@ add_constrained_delegation(krb5_context contextp,
|
||||
calloc(strings->num_strings,
|
||||
sizeof(ext.data.u.allowed_to_delegate_to.val[0]));
|
||||
ext.data.u.allowed_to_delegate_to.len = strings->num_strings;
|
||||
|
||||
|
||||
for (i = 0; i < strings->num_strings; i++) {
|
||||
ret = krb5_parse_name(contextp, strings->strings[i], &p);
|
||||
if (ret)
|
||||
@@ -126,7 +126,7 @@ add_aliases(krb5_context contextp, kadm5_principal_ent_rec *princ,
|
||||
calloc(strings->num_strings,
|
||||
sizeof(ext.data.u.aliases.aliases.val[0]));
|
||||
ext.data.u.aliases.aliases.len = strings->num_strings;
|
||||
|
||||
|
||||
for (i = 0; i < strings->num_strings; i++) {
|
||||
ret = krb5_parse_name(contextp, strings->strings[i], &p);
|
||||
ret = copy_Principal(p, &ext.data.u.aliases.aliases.val[i]);
|
||||
@@ -168,7 +168,7 @@ add_pkinit_acl(krb5_context contextp, kadm5_principal_ent_rec *princ,
|
||||
calloc(strings->num_strings,
|
||||
sizeof(ext.data.u.pkinit_acl.val[0]));
|
||||
ext.data.u.pkinit_acl.len = strings->num_strings;
|
||||
|
||||
|
||||
for (i = 0; i < strings->num_strings; i++) {
|
||||
ext.data.u.pkinit_acl.val[i].subject = estrdup(strings->strings[i]);
|
||||
}
|
||||
|
64
kadmin/rpc.c
64
kadmin/rpc.c
@@ -109,47 +109,47 @@ parse_name(const unsigned char *p, size_t len,
|
||||
const gss_OID oid, char **name)
|
||||
{
|
||||
size_t l;
|
||||
|
||||
|
||||
if (len < 4)
|
||||
return 1;
|
||||
|
||||
|
||||
/* TOK_ID */
|
||||
if (memcmp(p, "\x04\x01", 2) != 0)
|
||||
return 1;
|
||||
len -= 2;
|
||||
p += 2;
|
||||
|
||||
|
||||
/* MECH_LEN */
|
||||
l = (p[0] << 8) | p[1];
|
||||
len -= 2;
|
||||
p += 2;
|
||||
if (l < 2 || len < l)
|
||||
return 1;
|
||||
|
||||
|
||||
/* oid wrapping */
|
||||
if (p[0] != 6 || p[1] != l - 2)
|
||||
return 1;
|
||||
p += 2;
|
||||
l -= 2;
|
||||
len -= 2;
|
||||
|
||||
|
||||
/* MECH */
|
||||
if (l != oid->length || memcmp(p, oid->elements, oid->length) != 0)
|
||||
return 1;
|
||||
len -= l;
|
||||
p += l;
|
||||
|
||||
|
||||
/* MECHNAME_LEN */
|
||||
if (len < 4)
|
||||
return 1;
|
||||
l = p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3];
|
||||
len -= 4;
|
||||
p += 4;
|
||||
|
||||
|
||||
/* MECH NAME */
|
||||
if (len != l)
|
||||
return 1;
|
||||
|
||||
|
||||
*name = malloc(l + 1);
|
||||
INSIST(*name != NULL);
|
||||
memcpy(*name, p, l);
|
||||
@@ -184,7 +184,7 @@ gss_error(krb5_context contextp,
|
||||
}
|
||||
|
||||
static void
|
||||
gss_print_errors (krb5_context contextp,
|
||||
gss_print_errors (krb5_context contextp,
|
||||
OM_uint32 maj_stat, OM_uint32 min_stat)
|
||||
{
|
||||
gss_error(contextp, GSS_C_NO_OID, GSS_C_GSS_CODE, maj_stat);
|
||||
@@ -202,13 +202,13 @@ read_data(krb5_storage *sp, krb5_storage *msg, size_t len)
|
||||
|
||||
if (tlen > sizeof(buf))
|
||||
tlen = sizeof(buf);
|
||||
|
||||
|
||||
slen = krb5_storage_read(sp, buf, tlen);
|
||||
INSIST((size_t)slen == tlen);
|
||||
|
||||
|
||||
slen = krb5_storage_write(msg, buf, tlen);
|
||||
INSIST((size_t)slen == tlen);
|
||||
|
||||
|
||||
len -= tlen;
|
||||
}
|
||||
return 0;
|
||||
@@ -226,7 +226,7 @@ collect_framents(krb5_storage *sp, krb5_storage *msg)
|
||||
ret = krb5_ret_uint32(sp, &len);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
||||
last_fragment = (len & LAST_FRAGMENT);
|
||||
len &= ~LAST_FRAGMENT;
|
||||
|
||||
@@ -341,7 +341,7 @@ store_string_xdr(krb5_storage *sp, const char *str)
|
||||
c.length = strlen(str) + 1;
|
||||
} else
|
||||
krb5_data_zero(&c);
|
||||
|
||||
|
||||
return store_data_xdr(sp, c);
|
||||
}
|
||||
|
||||
@@ -512,7 +512,7 @@ ret_principal_ent(krb5_context contextp,
|
||||
} else {
|
||||
INSIST(ent->n_tl_data == 0);
|
||||
}
|
||||
|
||||
|
||||
CHECK(krb5_ret_uint32(sp, &num));
|
||||
INSIST(num == (uint32_t)ent->n_key_data);
|
||||
|
||||
@@ -637,7 +637,7 @@ proc_get_principal(kadm5_server_context *contextp,
|
||||
|
||||
static void
|
||||
proc_chrand_principal_v2(kadm5_server_context *contextp,
|
||||
krb5_storage *in,
|
||||
krb5_storage *in,
|
||||
krb5_storage *out)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
@@ -741,7 +741,7 @@ struct gctx {
|
||||
};
|
||||
|
||||
static int
|
||||
process_stream(krb5_context contextp,
|
||||
process_stream(krb5_context contextp,
|
||||
unsigned char *buf, size_t ilen,
|
||||
krb5_storage *sp)
|
||||
{
|
||||
@@ -798,11 +798,11 @@ process_stream(krb5_context contextp,
|
||||
buf = tmp;
|
||||
}
|
||||
INSIST(ilen >= 4);
|
||||
|
||||
|
||||
_krb5_get_int(buf, &len, 4);
|
||||
last_fragment = (len & LAST_FRAGMENT) != 0;
|
||||
len &= ~LAST_FRAGMENT;
|
||||
|
||||
|
||||
ilen -= 4;
|
||||
buf += 4;
|
||||
|
||||
@@ -820,7 +820,7 @@ process_stream(krb5_context contextp,
|
||||
}
|
||||
|
||||
CHECK(read_data(sp, msg, len));
|
||||
|
||||
|
||||
if (!last_fragment) {
|
||||
ret = collect_framents(sp, msg);
|
||||
if (ret == HEIM_ERR_EOF)
|
||||
@@ -880,7 +880,7 @@ process_stream(krb5_context contextp,
|
||||
INSIST(gctx.done);
|
||||
|
||||
INSIST(krb5_data_cmp(&gcred.handle, &gctx.handle) == 0);
|
||||
|
||||
|
||||
CHECK(ret_data_xdr(msg, &data));
|
||||
|
||||
gin.value = data.data;
|
||||
@@ -904,7 +904,7 @@ process_stream(krb5_context contextp,
|
||||
INSIST(seq > gctx.seq_num);
|
||||
gctx.seq_num = seq;
|
||||
|
||||
/*
|
||||
/*
|
||||
* If contextp is setup, priv data have the seq_num stored
|
||||
* first in the block, so add it here before users data is
|
||||
* added.
|
||||
@@ -914,7 +914,7 @@ process_stream(krb5_context contextp,
|
||||
if (chdr.proc >= sizeof(procs)/sizeof(procs[0])) {
|
||||
krb5_warnx(contextp, "proc number out of array");
|
||||
} else if (procs[chdr.proc].func == NULL) {
|
||||
krb5_warnx(contextp, "proc '%s' never implemented",
|
||||
krb5_warnx(contextp, "proc '%s' never implemented",
|
||||
procs[chdr.proc].name);
|
||||
} else {
|
||||
krb5_warnx(contextp, "proc %s", procs[chdr.proc].name);
|
||||
@@ -946,7 +946,7 @@ process_stream(krb5_context contextp,
|
||||
gout.length = 0;
|
||||
|
||||
maj_stat = gss_accept_sec_context(&min_stat,
|
||||
&gctx.ctx,
|
||||
&gctx.ctx,
|
||||
GSS_C_NO_CREDENTIAL,
|
||||
&gin,
|
||||
GSS_C_NO_CHANNEL_BINDINGS,
|
||||
@@ -966,13 +966,13 @@ process_stream(krb5_context contextp,
|
||||
char *client;
|
||||
|
||||
gctx.done = 1;
|
||||
|
||||
|
||||
memset(&realm_params, 0, sizeof(realm_params));
|
||||
|
||||
maj_stat = gss_export_name(&min_stat, src_name, &bufp);
|
||||
INSIST(maj_stat == GSS_S_COMPLETE);
|
||||
|
||||
CHECK(parse_name(bufp.value, bufp.length,
|
||||
CHECK(parse_name(bufp.value, bufp.length,
|
||||
GSS_KRB5_MECHANISM, &client));
|
||||
|
||||
gss_release_buffer(&min_stat, &bufp);
|
||||
@@ -992,7 +992,7 @@ process_stream(krb5_context contextp,
|
||||
INSIST(gctx.ctx != GSS_C_NO_CONTEXT);
|
||||
|
||||
CHECK(krb5_store_uint32(dreply, 0));
|
||||
CHECK(store_gss_init_res(dreply, gctx.handle,
|
||||
CHECK(store_gss_init_res(dreply, gctx.handle,
|
||||
maj_stat, min_stat, 1, &gout));
|
||||
if (gout.value)
|
||||
gss_release_buffer(&min_stat, &gout);
|
||||
@@ -1004,7 +1004,7 @@ process_stream(krb5_context contextp,
|
||||
case RPG_DESTROY:
|
||||
krb5_errx(contextp, 1, "client destroyed gss contextp");
|
||||
default:
|
||||
krb5_errx(contextp, 1, "client sent unknown gsscode %d",
|
||||
krb5_errx(contextp, 1, "client sent unknown gsscode %d",
|
||||
(int)gcred.proc);
|
||||
}
|
||||
|
||||
@@ -1061,16 +1061,16 @@ process_stream(krb5_context contextp,
|
||||
|
||||
gin.value = data.data;
|
||||
gin.length = data.length;
|
||||
|
||||
|
||||
maj_stat = gss_wrap(&min_stat, gctx.ctx, 1, 0,
|
||||
&gin, &conf_state, &gout);
|
||||
INSIST(maj_stat == GSS_S_COMPLETE);
|
||||
INSIST(conf_state != 0);
|
||||
krb5_data_free(&data);
|
||||
|
||||
|
||||
data.data = gout.value;
|
||||
data.length = gout.length;
|
||||
|
||||
|
||||
store_data_xdr(reply, data);
|
||||
gss_release_buffer(&min_stat, &gout);
|
||||
}
|
||||
@@ -1099,7 +1099,7 @@ handle_mit(krb5_context contextp, void *buf, size_t len, krb5_socket_t sock)
|
||||
|
||||
sp = krb5_storage_from_fd(sock);
|
||||
INSIST(sp != NULL);
|
||||
|
||||
|
||||
process_stream(contextp, buf, len, sp);
|
||||
|
||||
return 0;
|
||||
|
@@ -115,7 +115,7 @@ stash(struct stash_options *opt, int argc, char **argv)
|
||||
ret = ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
if(unlink(new) < 0 && errno != ENOENT) {
|
||||
ret = errno;
|
||||
goto out;
|
||||
|
@@ -67,7 +67,7 @@ kcm_ccache_acquire(krb5_context context,
|
||||
ccache->name);
|
||||
return KRB5_FCC_INTERNAL;
|
||||
}
|
||||
|
||||
|
||||
HEIMDAL_MUTEX_lock(&ccache->mutex);
|
||||
|
||||
/* Fake up an internal ccache */
|
||||
|
@@ -168,7 +168,7 @@ krb5_error_code kcm_debug_ccache(krb5_context context)
|
||||
krb5_unparse_name(context, p->client, &cpn);
|
||||
if (p->server != NULL)
|
||||
krb5_unparse_name(context, p->server, &spn);
|
||||
|
||||
|
||||
kcm_log(7, "cache %08x: name %s refcnt %d flags %04x mode %04o "
|
||||
"uid %d gid %d client %s server %s ncreds %d",
|
||||
p, p->name, p->refcnt, p->flags, p->mode, p->uid, p->gid,
|
||||
|
@@ -114,7 +114,7 @@ kcm_ccache_new_client(krb5_context context,
|
||||
if (bad && !CLIENT_IS_ROOT(client))
|
||||
return KRB5_CC_BADNAME;
|
||||
}
|
||||
|
||||
|
||||
ret = kcm_ccache_resolve(context, name, &ccache);
|
||||
if (ret == 0) {
|
||||
if ((ccache->uid != client->uid ||
|
||||
|
@@ -357,7 +357,7 @@ kcm_configure(int argc, char **argv)
|
||||
ret = krb5_prepend_config_files_default(config_file, &files);
|
||||
if (ret)
|
||||
krb5_err(kcm_context, 1, ret, "getting configuration files");
|
||||
|
||||
|
||||
ret = krb5_set_config_files(kcm_context, files);
|
||||
krb5_free_config_files(files);
|
||||
if(ret)
|
||||
|
@@ -74,7 +74,7 @@ kcm_service(void *ctx, const heim_idata *req,
|
||||
|
||||
request.data = buf + 2;
|
||||
request.length = len - 2;
|
||||
|
||||
|
||||
/* buf is now pointing at opcode */
|
||||
|
||||
ret = kcm_dispatch(kcm_context, &peercred, &request, &rep);
|
||||
|
50
kcm/kcm.8
50
kcm/kcm.8
@@ -1,33 +1,33 @@
|
||||
.\" Copyright (c) 2005 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$
|
||||
.\"
|
||||
@@ -122,7 +122,7 @@ The
|
||||
daemon can also keep a SYSTEM credential that server processes can
|
||||
use to access services. One example of usage might be an nss_ldap
|
||||
module that quickly needs to get credentials and doesn't want to renew
|
||||
the ticket itself.
|
||||
the ticket itself.
|
||||
.Pp
|
||||
Supported options:
|
||||
.Bl -tag -width Ds
|
||||
|
@@ -59,7 +59,7 @@ kcm_op_noop(krb5_context context,
|
||||
{
|
||||
KCM_LOG_REQUEST(context, client, opcode);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -108,7 +108,7 @@ kcm_op_get_name(krb5_context context,
|
||||
|
||||
/*
|
||||
* Request:
|
||||
*
|
||||
*
|
||||
* Response:
|
||||
* NameZ
|
||||
*/
|
||||
@@ -139,9 +139,9 @@ kcm_op_gen_new(krb5_context context,
|
||||
* Request:
|
||||
* NameZ
|
||||
* Principal
|
||||
*
|
||||
*
|
||||
* Response:
|
||||
*
|
||||
*
|
||||
*/
|
||||
static krb5_error_code
|
||||
kcm_op_initialize(krb5_context context,
|
||||
@@ -205,9 +205,9 @@ kcm_op_initialize(krb5_context context,
|
||||
/*
|
||||
* Request:
|
||||
* NameZ
|
||||
*
|
||||
*
|
||||
* Response:
|
||||
*
|
||||
*
|
||||
*/
|
||||
static krb5_error_code
|
||||
kcm_op_destroy(krb5_context context,
|
||||
@@ -238,9 +238,9 @@ kcm_op_destroy(krb5_context context,
|
||||
* Request:
|
||||
* NameZ
|
||||
* Creds
|
||||
*
|
||||
*
|
||||
* Response:
|
||||
*
|
||||
*
|
||||
*/
|
||||
static krb5_error_code
|
||||
kcm_op_store(krb5_context context,
|
||||
@@ -298,7 +298,7 @@ kcm_op_store(krb5_context context,
|
||||
*
|
||||
* Response:
|
||||
* Creds
|
||||
*
|
||||
*
|
||||
*/
|
||||
static krb5_error_code
|
||||
kcm_op_retrieve(krb5_context context,
|
||||
@@ -432,7 +432,7 @@ kcm_op_get_principal(krb5_context context,
|
||||
*
|
||||
* Response:
|
||||
* UUIDs
|
||||
*
|
||||
*
|
||||
*/
|
||||
static krb5_error_code
|
||||
kcm_op_get_cred_uuid_list(krb5_context context,
|
||||
@@ -535,7 +535,7 @@ kcm_op_get_cred_by_uuid(krb5_context context,
|
||||
* MatchCreds
|
||||
*
|
||||
* Response:
|
||||
*
|
||||
*
|
||||
*/
|
||||
static krb5_error_code
|
||||
kcm_op_remove_cred(krb5_context context,
|
||||
@@ -593,7 +593,7 @@ kcm_op_remove_cred(krb5_context context,
|
||||
* Flags
|
||||
*
|
||||
* Response:
|
||||
*
|
||||
*
|
||||
*/
|
||||
static krb5_error_code
|
||||
kcm_op_set_flags(krb5_context context,
|
||||
@@ -640,7 +640,7 @@ kcm_op_set_flags(krb5_context context,
|
||||
* GID
|
||||
*
|
||||
* Response:
|
||||
*
|
||||
*
|
||||
*/
|
||||
static krb5_error_code
|
||||
kcm_op_chown(krb5_context context,
|
||||
@@ -694,7 +694,7 @@ kcm_op_chown(krb5_context context,
|
||||
* Mode
|
||||
*
|
||||
* Response:
|
||||
*
|
||||
*
|
||||
*/
|
||||
static krb5_error_code
|
||||
kcm_op_chmod(krb5_context context,
|
||||
@@ -1257,7 +1257,7 @@ find_ntlm_cred(const char *user, const char *domain, kcm_client *client)
|
||||
struct kcm_ntlm_cred *c;
|
||||
|
||||
for (c = ntlm_head; c != NULL; c = c->next)
|
||||
if ((user[0] == '\0' || strcmp(user, c->user) == 0) &&
|
||||
if ((user[0] == '\0' || strcmp(user, c->user) == 0) &&
|
||||
(domain == NULL || strcmp(domain, c->domain) == 0) &&
|
||||
kcm_is_same_session(client, c->uid, c->session))
|
||||
return c;
|
||||
@@ -1448,7 +1448,7 @@ kcm_op_do_ntlm(krb5_context context,
|
||||
memset(&type3, 0, sizeof(type3));
|
||||
sessionkey.data = NULL;
|
||||
sessionkey.length = 0;
|
||||
|
||||
|
||||
ret = krb5_ret_stringz(request, &user);
|
||||
if (ret)
|
||||
goto error;
|
||||
@@ -1489,22 +1489,22 @@ kcm_op_do_ntlm(krb5_context context,
|
||||
type3.flags = type2.flags;
|
||||
type3.targetname = type2.targetname;
|
||||
type3.ws = rk_UNCONST("workstation");
|
||||
|
||||
|
||||
/*
|
||||
* NTLM Version 1 if no targetinfo buffer.
|
||||
*/
|
||||
|
||||
|
||||
if (1 || type2.targetinfo.length == 0) {
|
||||
struct ntlm_buf sessionkey;
|
||||
|
||||
|
||||
if (type2.flags & NTLM_NEG_NTLM2_SESSION) {
|
||||
unsigned char nonce[8];
|
||||
|
||||
|
||||
if (RAND_bytes(nonce, sizeof(nonce)) != 1) {
|
||||
ret = EINVAL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
||||
ret = heim_ntlm_calculate_ntlm2_sess(nonce,
|
||||
type2.challenge,
|
||||
c->nthash.data,
|
||||
@@ -1515,11 +1515,11 @@ kcm_op_do_ntlm(krb5_context context,
|
||||
c->nthash.length,
|
||||
type2.challenge,
|
||||
&type3.ntlm);
|
||||
|
||||
|
||||
}
|
||||
if (ret)
|
||||
goto error;
|
||||
|
||||
|
||||
ret = heim_ntlm_build_ntlm1_master(c->nthash.data,
|
||||
c->nthash.length,
|
||||
&sessionkey,
|
||||
@@ -1541,14 +1541,14 @@ kcm_op_do_ntlm(krb5_context context,
|
||||
goto error;
|
||||
}
|
||||
flags |= NTLM_FLAG_SESSIONKEY;
|
||||
#if 0
|
||||
#if 0
|
||||
} else {
|
||||
struct ntlm_buf sessionkey;
|
||||
unsigned char ntlmv2[16];
|
||||
struct ntlm_targetinfo ti;
|
||||
|
||||
|
||||
/* verify infotarget */
|
||||
|
||||
|
||||
ret = heim_ntlm_decode_targetinfo(&type2.targetinfo, 1, &ti);
|
||||
if(ret) {
|
||||
_gss_ntlm_delete_sec_context(minor_status,
|
||||
@@ -1556,14 +1556,14 @@ kcm_op_do_ntlm(krb5_context context,
|
||||
*minor_status = ret;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
if (ti.domainname && strcmp(ti.domainname, name->domain) != 0) {
|
||||
_gss_ntlm_delete_sec_context(minor_status,
|
||||
context_handle, NULL);
|
||||
*minor_status = EINVAL;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
ret = heim_ntlm_calculate_ntlm2(ctx->client->key.data,
|
||||
ctx->client->key.length,
|
||||
type3.username,
|
||||
@@ -1578,7 +1578,7 @@ kcm_op_do_ntlm(krb5_context context,
|
||||
*minor_status = ret;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
ret = heim_ntlm_build_ntlm1_master(ntlmv2, sizeof(ntlmv2),
|
||||
&sessionkey,
|
||||
&type3.sessionkey);
|
||||
@@ -1589,10 +1589,10 @@ kcm_op_do_ntlm(krb5_context context,
|
||||
*minor_status = ret;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
flags |= NTLM_FLAG_NTLM2_SESSION |
|
||||
NTLM_FLAG_SESSION;
|
||||
|
||||
|
||||
if (type3.flags & NTLM_NEG_KEYEX)
|
||||
flags |= NTLM_FLAG_KEYEX;
|
||||
|
||||
@@ -1607,7 +1607,7 @@ kcm_op_do_ntlm(krb5_context context,
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
if (flags & NTLM_FLAG_NTLM2_SESSION) {
|
||||
_gss_ntlm_set_key(&ctx->u.v2.send, 0, (ctx->flags & NTLM_NEG_KEYEX),
|
||||
@@ -1630,7 +1630,7 @@ kcm_op_do_ntlm(krb5_context context,
|
||||
ret = heim_ntlm_encode_type3(&type3, &ndata);
|
||||
if (ret)
|
||||
goto error;
|
||||
|
||||
|
||||
data.data = ndata.data;
|
||||
data.length = ndata.length;
|
||||
ret = krb5_store_data(response, data);
|
||||
|
@@ -62,18 +62,18 @@ kcm_session_setup_handler(void)
|
||||
for (;;) {
|
||||
auditinfo_addr_t aio;
|
||||
int event;
|
||||
|
||||
|
||||
if (au_sdev_read_aia(h, &event, &aio) != 0)
|
||||
continue;
|
||||
|
||||
/*
|
||||
/*
|
||||
* Ignore everything but END. This should relly be
|
||||
* CLOSE but since that is delayed until the credential
|
||||
* is reused, we can't do that
|
||||
* is reused, we can't do that
|
||||
* */
|
||||
if (event != AUE_SESSION_END)
|
||||
continue;
|
||||
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
kcm_cache_remove_session(aio.ai_asid);
|
||||
});
|
||||
|
@@ -82,7 +82,7 @@ CFString2utf8(CFStringRef string)
|
||||
str = malloc(size);
|
||||
if (str == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
if (CFStringGetCString(string, str, size, kCFStringEncodingUTF8) == false) {
|
||||
free(str);
|
||||
return NULL;
|
||||
@@ -99,12 +99,12 @@ retry_timer(void)
|
||||
{
|
||||
dispatch_source_t s;
|
||||
dispatch_time_t t;
|
||||
|
||||
|
||||
s = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER,
|
||||
0, 0, g_queue);
|
||||
t = dispatch_time(DISPATCH_TIME_NOW, 5ull * NSEC_PER_SEC);
|
||||
dispatch_source_set_timer(s, t, 0, NSEC_PER_SEC);
|
||||
dispatch_source_set_event_handler(s, ^{
|
||||
dispatch_source_set_event_handler(s, ^{
|
||||
create_dns_sd();
|
||||
dispatch_release(s);
|
||||
});
|
||||
@@ -132,7 +132,7 @@ create_dns_sd(void)
|
||||
s = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ,
|
||||
DNSServiceRefSockFD(g_dnsRef),
|
||||
0, g_queue);
|
||||
|
||||
|
||||
dispatch_source_set_event_handler(s, ^{
|
||||
DNSServiceErrorType ret = DNSServiceProcessResult(g_dnsRef);
|
||||
/* on error tear down and set timer to recreate */
|
||||
@@ -148,7 +148,7 @@ create_dns_sd(void)
|
||||
});
|
||||
|
||||
dispatch_resume(s);
|
||||
|
||||
|
||||
/* Do the first update ourself */
|
||||
update_all(g_store, NULL, NULL);
|
||||
dispatch_resume(g_queue);
|
||||
@@ -205,8 +205,8 @@ domains_add(const void *key, const void *value, void *context)
|
||||
|
||||
static void
|
||||
dnsCallback(DNSServiceRef sdRef __attribute__((unused)),
|
||||
DNSRecordRef RecordRef __attribute__((unused)),
|
||||
DNSServiceFlags flags __attribute__((unused)),
|
||||
DNSRecordRef RecordRef __attribute__((unused)),
|
||||
DNSServiceFlags flags __attribute__((unused)),
|
||||
DNSServiceErrorType errorCode __attribute__((unused)),
|
||||
void *context __attribute__((unused)))
|
||||
{
|
||||
@@ -369,11 +369,11 @@ update_dns(void)
|
||||
asprintf(&name, "_kerberos.%s.%s", hostname, update->domain);
|
||||
if (name == NULL)
|
||||
errx(1, "malloc");
|
||||
|
||||
|
||||
if (update->recordRef)
|
||||
DNSServiceRemoveRecord(g_dnsRef, update->recordRef, 0);
|
||||
|
||||
error = DNSServiceRegisterRecord(g_dnsRef,
|
||||
|
||||
error = DNSServiceRegisterRecord(g_dnsRef,
|
||||
&update->recordRef,
|
||||
kDNSServiceFlagsShared | kDNSServiceFlagsAllowRemoteQuery,
|
||||
0,
|
||||
@@ -388,7 +388,7 @@ update_dns(void)
|
||||
free(name);
|
||||
free(dnsdata);
|
||||
if (error)
|
||||
errx(1, "failure to update entry for %s/%s",
|
||||
errx(1, "failure to update entry for %s/%s",
|
||||
update->domain, update->realm);
|
||||
}
|
||||
e = &(*e)->next;
|
||||
@@ -487,7 +487,7 @@ destroy_dns_sd(void)
|
||||
#ifdef REGISTER_SRV_RR
|
||||
unregister_srv_realms();
|
||||
#endif
|
||||
|
||||
|
||||
DNSServiceRefDeallocate(g_dnsRef);
|
||||
g_dnsRef = NULL;
|
||||
}
|
||||
@@ -512,7 +512,7 @@ register_notification(void)
|
||||
errx(1, "CFArrayCreateMutable");
|
||||
|
||||
CFArrayAppendValue(keys, computerNameKey);
|
||||
CFArrayAppendValue(keys, NetworkChangedKey_BackToMyMac);
|
||||
CFArrayAppendValue(keys, NetworkChangedKey_BackToMyMac);
|
||||
|
||||
if (SCDynamicStoreSetNotificationKeys(store, keys, NULL) == false)
|
||||
errx(1, "SCDynamicStoreSetNotificationKeys");
|
||||
@@ -534,11 +534,11 @@ bonjour_announce(krb5_context context, krb5_kdc_configuration *config)
|
||||
g_queue = dispatch_queue_create("com.apple.kdc_announce", NULL);
|
||||
if (!g_queue)
|
||||
errx(1, "dispatch_queue_create");
|
||||
|
||||
|
||||
g_store = register_notification();
|
||||
announce_config = config;
|
||||
announce_context = context;
|
||||
|
||||
|
||||
create_dns_sd();
|
||||
#endif
|
||||
}
|
||||
|
@@ -180,7 +180,7 @@ configure(krb5_context context, int argc, char **argv)
|
||||
ret = krb5_prepend_config_files_default(config_file, &files);
|
||||
if (ret)
|
||||
krb5_err(context, 1, ret, "getting configuration files");
|
||||
|
||||
|
||||
ret = krb5_set_config_files(context, files);
|
||||
krb5_free_config_files(files);
|
||||
if(ret)
|
||||
@@ -260,7 +260,7 @@ configure(krb5_context context, int argc, char **argv)
|
||||
"kdc",
|
||||
"detach", NULL);
|
||||
#endif /* SUPPORT_DETACH */
|
||||
|
||||
|
||||
if(max_request_tcp == 0)
|
||||
max_request_tcp = 64 * 1024;
|
||||
if(max_request_udp == 0)
|
||||
|
@@ -138,7 +138,7 @@ add_port_string (krb5_context context,
|
||||
*/
|
||||
|
||||
static void
|
||||
add_standard_ports (krb5_context context,
|
||||
add_standard_ports (krb5_context context,
|
||||
krb5_kdc_configuration *config,
|
||||
int family)
|
||||
{
|
||||
@@ -162,7 +162,7 @@ add_standard_ports (krb5_context context,
|
||||
*/
|
||||
|
||||
static void
|
||||
parse_ports(krb5_context context,
|
||||
parse_ports(krb5_context context,
|
||||
krb5_kdc_configuration *config,
|
||||
const char *str)
|
||||
{
|
||||
@@ -194,7 +194,7 @@ parse_ports(krb5_context context,
|
||||
add_port_string(context, AF_INET, p, "tcp");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
p = strtok_r(NULL, " \t", &pos);
|
||||
}
|
||||
free (str_copy);
|
||||
@@ -377,7 +377,7 @@ descr_type(struct descr *d)
|
||||
}
|
||||
|
||||
static void
|
||||
addr_to_string(krb5_context context,
|
||||
addr_to_string(krb5_context context,
|
||||
struct sockaddr *addr, size_t addr_len, char *str, size_t len)
|
||||
{
|
||||
krb5_address a;
|
||||
|
@@ -184,7 +184,7 @@ krb5_kdc_get_config(krb5_context context, krb5_kdc_configuration **config)
|
||||
NULL);
|
||||
|
||||
|
||||
c->pkinit_kdc_identity =
|
||||
c->pkinit_kdc_identity =
|
||||
krb5_config_get_string(context, NULL,
|
||||
"kdc", "pkinit_identity", NULL);
|
||||
c->pkinit_kdc_anchors =
|
||||
@@ -196,7 +196,7 @@ krb5_kdc_get_config(krb5_context context, krb5_kdc_configuration **config)
|
||||
c->pkinit_kdc_revoke =
|
||||
krb5_config_get_strings(context, NULL,
|
||||
"kdc", "pkinit_revoke", NULL);
|
||||
c->pkinit_kdc_ocsp_file =
|
||||
c->pkinit_kdc_ocsp_file =
|
||||
krb5_config_get_string(context, NULL,
|
||||
"kdc", "pkinit_kdc_ocsp", NULL);
|
||||
c->pkinit_kdc_friendly_name =
|
||||
@@ -233,7 +233,7 @@ krb5_kdc_pkinit_config(krb5_context context, krb5_kdc_configuration *config)
|
||||
|
||||
if (config->pkinit_kdc_identity == NULL) {
|
||||
if (config->pkinit_kdc_friendly_name == NULL)
|
||||
config->pkinit_kdc_friendly_name =
|
||||
config->pkinit_kdc_friendly_name =
|
||||
strdup("O=System Identity,CN=com.apple.kerberos.kdc");
|
||||
config->pkinit_kdc_identity = strdup("KEYCHAIN:");
|
||||
}
|
||||
@@ -245,7 +245,7 @@ krb5_kdc_pkinit_config(krb5_context context, krb5_kdc_configuration *config)
|
||||
if (config->enable_pkinit) {
|
||||
if (config->pkinit_kdc_identity == NULL)
|
||||
krb5_errx(context, 1, "pkinit enabled but no identity");
|
||||
|
||||
|
||||
if (config->pkinit_kdc_anchors == NULL)
|
||||
krb5_errx(context, 1, "pkinit enabled but no X509 anchors");
|
||||
|
||||
@@ -259,4 +259,4 @@ krb5_kdc_pkinit_config(krb5_context context, krb5_kdc_configuration *config)
|
||||
|
||||
return 0;
|
||||
#endif /* PKINIT */
|
||||
}
|
||||
}
|
||||
|
@@ -67,7 +67,7 @@ ntlm_service(void *ctx, const heim_idata *req,
|
||||
|
||||
kdc_log(context, config, 1, "digest-request: uid=%d",
|
||||
(int)heim_ipc_cred_get_uid(cred));
|
||||
|
||||
|
||||
if (heim_ipc_cred_get_uid(cred) != 0) {
|
||||
(*complete)(cctx, EPERM, NULL);
|
||||
return;
|
||||
@@ -129,10 +129,10 @@ ntlm_service(void *ctx, const heim_idata *req,
|
||||
|
||||
if (ntq.ntChallengeResponce.length != 24) {
|
||||
struct ntlm_buf infotarget, answer;
|
||||
|
||||
|
||||
answer.length = ntq.ntChallengeResponce.length;
|
||||
answer.data = ntq.ntChallengeResponce.data;
|
||||
|
||||
|
||||
ret = heim_ntlm_verify_ntlm2(key->key.keyvalue.data,
|
||||
key->key.keyvalue.length,
|
||||
ntq.loginUserName,
|
||||
@@ -145,17 +145,17 @@ ntlm_service(void *ctx, const heim_idata *req,
|
||||
if (ret) {
|
||||
goto failed;
|
||||
}
|
||||
|
||||
|
||||
free(infotarget.data);
|
||||
/* XXX verify info target */
|
||||
|
||||
|
||||
} else {
|
||||
struct ntlm_buf answer;
|
||||
|
||||
|
||||
if (ntq.flags & NTLM_NEG_NTLM2_SESSION) {
|
||||
unsigned char sessionhash[MD5_DIGEST_LENGTH];
|
||||
EVP_MD_CTX *md5ctx;
|
||||
|
||||
|
||||
/* the first first 8 bytes is the challenge, what is the other 16 bytes ? */
|
||||
if (ntq.lmChallengeResponce.length != 24)
|
||||
goto failed;
|
||||
@@ -168,13 +168,13 @@ ntlm_service(void *ctx, const heim_idata *req,
|
||||
EVP_MD_CTX_destroy(md5ctx);
|
||||
memcpy(ntq.lmchallenge.data, sessionhash, ntq.lmchallenge.length);
|
||||
}
|
||||
|
||||
|
||||
ret = heim_ntlm_calculate_ntlm1(key->key.keyvalue.data,
|
||||
key->key.keyvalue.length,
|
||||
ntq.lmchallenge.data, &answer);
|
||||
if (ret)
|
||||
goto failed;
|
||||
|
||||
|
||||
if (ntq.ntChallengeResponce.length != answer.length ||
|
||||
memcmp(ntq.ntChallengeResponce.data, answer.data, answer.length) != 0) {
|
||||
free(answer.data);
|
||||
@@ -182,10 +182,10 @@ ntlm_service(void *ctx, const heim_idata *req,
|
||||
goto failed;
|
||||
}
|
||||
free(answer.data);
|
||||
|
||||
|
||||
{
|
||||
EVP_MD_CTX *ctxp;
|
||||
|
||||
|
||||
ctxp = EVP_MD_CTX_create();
|
||||
EVP_DigestInit_ex(ctxp, EVP_md4(), NULL);
|
||||
EVP_DigestUpdate(ctxp, key->key.keyvalue.data, key->key.keyvalue.length);
|
||||
@@ -201,7 +201,7 @@ ntlm_service(void *ctx, const heim_idata *req,
|
||||
goto failed;
|
||||
if (rep.length != size)
|
||||
abort();
|
||||
|
||||
|
||||
failed:
|
||||
kdc_log(context, config, 1, "digest-request: %d", ret);
|
||||
|
||||
@@ -241,10 +241,10 @@ main(int argc, char **argv)
|
||||
|
||||
if (getarg(args, num_args, argc, argv, &optidx))
|
||||
usage(1);
|
||||
|
||||
|
||||
if (help_flag)
|
||||
usage(0);
|
||||
|
||||
|
||||
if (version_flag) {
|
||||
print_version(NULL);
|
||||
exit(0);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user