krb5_cc_destroy. (encrypted rcp failed).
* krlogind.c (main): -S option was not getting a keytab. (passing
a char * to krb5_compat_recvauth).
* krshd.c (recvauth): extract the client principal from ticket
before calling krb5_kuserok on a NULL principal.
(main): -S option was not getting a keytab (passing a char *).
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5536
dc483132-0cff-0310-8789-
dd5450dbe970
Thu Apr 27 01:09:19 1995 Ezra Peisach <epeisach@kangaroo.mit.edu>
+ * krcp.c (answer_auth): Should not call krb5_cc_close after
+ krb5_cc_destroy. (encrypted rcp failed).
+
+ * krlogind.c (main): -S option was not getting a keytab. (passing
+ a char * to krb5_compat_recvauth).
+
* krshd.c (recvauth): extract the client principal from ticket
before calling krb5_kuserok on a NULL principal.
+ (main): -S option was not getting a keytab (passing a char *).
* krcp.c: (main): Missing htons on port number when specified on
command line.
if (status = krb5_cc_get_principal(bsd_context, cc, &creds.client)){
krb5_cc_destroy(bsd_context, cc);
- krb5_cc_close(bsd_context, cc);
exit(1);
}
if (status = krb5_parse_name(bsd_context, pname_data.data, &creds.server)){
krb5_cc_destroy(bsd_context, cc);
- krb5_cc_close(bsd_context, cc);
exit(1);
}
krb5_xfree(pname_data.data);
if (status = krb5_get_credentials(bsd_context, KRB5_GC_USER_USER, cc,
&creds, &new_creds)){
krb5_cc_destroy(bsd_context, cc);
- krb5_cc_close(bsd_context, cc);
exit(1);
}
AP_OPTS_USE_SESSION_KEY,
NULL, new_creds, &msg)) {
krb5_cc_destroy(bsd_context, cc);
- krb5_cc_close(bsd_context, cc);
exit(1);
}
krb5_cc_destroy(bsd_context, cc);
- krb5_cc_close(bsd_context, cc);
status = krb5_write_message(bsd_context, (krb5_pointer) &rem, &msg);
krb5_xfree(msg.data);
if (status){
krb5_ticket *ticket = 0;
krb5_context bsd_context;
-char *srvtab = NULL;
+krb5_keytab keytab = NULL;
#define ARGSTR "rRkKeExXpPD:S:M:L:?"
#else /* !KERBEROS */
char *options;
int debug_port = 0;
int fd;
+#ifdef KERBEROS
+ krb5_error_code status;
+#endif
progname = *argv;
break;
#endif
case 'S':
- srvtab = optarg;
+ if (status = krb5_kt_resolve(bsd_context, optarg, &keytab)) {
+ com_err(progname, status, "while resolving srvtab file %s",
+ optarg);
+ exit(2);
+ }
break;
case 'M':
krb5_set_default_realm(bsd_context, optarg);
server, /* Specify daemon principal */
0, /* default rc_type */
0, /* no flags */
- srvtab, /* normally NULL to use v5srvtab */
+ keytab, /* normally NULL to use v5srvtab */
do_encrypt ? KOPT_DO_MUTUAL : 0, /*v4_opts*/
"rcmd", /* v4_service */
krb5_data desinbuf,desoutbuf;
krb5_context bsd_context;
char *srvtab = NULL;
+krb5_keytab keytab = NULL;
void fatal();
int v5_des_read();
int i;
int fd;
int debug_port = 0;
+#ifdef KERBEROS
+ krb5_error_code status;
+#endif
#ifdef CRAY
secflag = sysconf(_SC_CRAY_SECURE_SYS);
break;
case 'S':
- srvtab = optarg;
+ if (status = krb5_kt_resolve(bsd_context, optarg, &keytab)) {
+ com_err(progname, status, "while resolving srvtab file %s",
+ optarg);
+ exit(2);
+ }
break;
case 'M':
server, /* Specify daemon principal */
0, /* default rc_type */
0, /* no flags */
- srvtab, /* normally NULL to use v5srvtab */
+ keytab, /* normally NULL to use v5srvtab */
0, /* v4_opts */
"rcmd", /* v4_service */
v4_instance, /* v4_instance */