summaryrefslogtreecommitdiff
path: root/kerberosV
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-11-18 00:48:40 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-11-18 00:48:40 +0000
commitf3f707ede0b452898fa6d10d67acf847e40aa0d3 (patch)
tree91746fb4cc50d10293fbf5801b950397349318af /kerberosV
parentddb83661349bf36f3aa9701803e5c4a0b20edecd (diff)
volatile sig_atomic_t
Diffstat (limited to 'kerberosV')
-rw-r--r--kerberosV/src/appl/login/read_string.c2
-rw-r--r--kerberosV/src/kadmin/kadm_conn.c11
-rw-r--r--kerberosV/src/kadmin/kadmin_locl.h11
-rw-r--r--kerberosV/src/kdc/kdc_locl.h2
-rw-r--r--kerberosV/src/kdc/main.c6
-rw-r--r--kerberosV/src/kpasswd/kpasswdd.c15
6 files changed, 28 insertions, 19 deletions
diff --git a/kerberosV/src/appl/login/read_string.c b/kerberosV/src/appl/login/read_string.c
index 3c4ef9a0941..03e802515c4 100644
--- a/kerberosV/src/appl/login/read_string.c
+++ b/kerberosV/src/appl/login/read_string.c
@@ -35,7 +35,7 @@
RCSID("$KTH: read_string.c,v 1.4 2000/06/21 02:09:36 assar Exp $");
-static sig_atomic_t intr_flag;
+static volatile sig_atomic_t intr_flag;
static void
intr(int sig)
diff --git a/kerberosV/src/kadmin/kadm_conn.c b/kerberosV/src/kadmin/kadm_conn.c
index a3fb7939b60..9b711375231 100644
--- a/kerberosV/src/kadmin/kadm_conn.c
+++ b/kerberosV/src/kadmin/kadm_conn.c
@@ -36,7 +36,7 @@
#include <sys/wait.h>
#endif
-RCSID("$KTH: kadm_conn.c,v 1.11 2001/01/29 08:43:01 assar Exp $");
+RCSID("$KTH: kadm_conn.c,v 1.13 2001/05/16 22:06:44 assar Exp $");
struct kadm_port {
char *port;
@@ -91,7 +91,7 @@ parse_ports(krb5_context context, const char *str)
}
static pid_t pgrp;
-sig_atomic_t term_flag, doing_useful_work;
+volatile sig_atomic_t term_flag, doing_useful_work;
static RETSIGTYPE
sigchld(int sig)
@@ -137,14 +137,14 @@ spawn_child(krb5_context context, int *socks, int num_socks, int this_sock)
krb5_warn(context, errno, "accept");
return 1;
}
- e = krb5_sockaddr2address(sa, &addr);
+ e = krb5_sockaddr2address(context, sa, &addr);
if(e)
krb5_warn(context, e, "krb5_sockaddr2address");
else {
e = krb5_print_address (&addr, buf, sizeof(buf),
&buf_len);
if(e)
- krb5_warn(context, e, "krb5_sockaddr2address");
+ krb5_warn(context, e, "krb5_print_address");
else
krb5_warnx(context, "connection from %s", buf);
krb5_free_address(context, &addr);
@@ -243,7 +243,8 @@ start_server(krb5_context context)
}
if(e) {
- krb5_warn(context, krb5_eai_to_heim_errno(e), "%s", portstr);
+ krb5_warn(context, krb5_eai_to_heim_errno(e, errno),
+ "%s", portstr);
continue;
}
i = 0;
diff --git a/kerberosV/src/kadmin/kadmin_locl.h b/kerberosV/src/kadmin/kadmin_locl.h
index 05277a9baa8..e50c9156da2 100644
--- a/kerberosV/src/kadmin/kadmin_locl.h
+++ b/kerberosV/src/kadmin/kadmin_locl.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2000 Kungliga Tekniska Högskolan
+ * Copyright (c) 1997-2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -32,7 +32,7 @@
*/
/*
- * $KTH: kadmin_locl.h,v 1.34 2000/09/19 12:46:18 assar Exp $
+ * $KTH: kadmin_locl.h,v 1.36 2001/05/07 05:32:04 assar Exp $
*/
#ifndef __ADMIN_LOCL_H__
@@ -83,7 +83,11 @@
#endif
#include <err.h>
#include <roken.h>
+#ifdef HAVE_OPENSSL_DES_H
+#include <openssl/des.h>
+#else
#include <des.h>
+#endif
#include <krb5.h>
#include <krb5_locl.h>
#include <hdb.h>
@@ -152,6 +156,7 @@ int set_entry(krb5_context context,
int
foreach_principal(const char *exp,
int (*func)(krb5_principal, void*),
+ const char *funcname,
void *data);
void get_response(const char *prompt, const char *def, char *buf, size_t len);
@@ -176,7 +181,7 @@ random_password(char *pw, size_t len);
/* kadm_conn.c */
-sig_atomic_t term_flag, doing_useful_work;
+extern volatile sig_atomic_t term_flag, doing_useful_work;
void parse_ports(krb5_context, const char*);
int start_server(krb5_context);
diff --git a/kerberosV/src/kdc/kdc_locl.h b/kerberosV/src/kdc/kdc_locl.h
index e0e83a8315f..1e09e1e1182 100644
--- a/kerberosV/src/kdc/kdc_locl.h
+++ b/kerberosV/src/kdc/kdc_locl.h
@@ -43,7 +43,7 @@
extern krb5_context context;
extern int require_preauth;
-extern sig_atomic_t exit_flag;
+extern volatile sig_atomic_t exit_flag;
extern size_t max_request;
extern time_t kdc_warn_pwexpire;
extern struct dbinfo {
diff --git a/kerberosV/src/kdc/main.c b/kerberosV/src/kdc/main.c
index d63e3b8ba96..6ad713b7924 100644
--- a/kerberosV/src/kdc/main.c
+++ b/kerberosV/src/kdc/main.c
@@ -33,9 +33,9 @@
#include "kdc_locl.h"
-RCSID("$KTH: main.c,v 1.24 2000/12/31 07:46:14 assar Exp $");
+RCSID("$KTH: main.c,v 1.25 2001/02/20 01:44:50 assar Exp $");
-sig_atomic_t exit_flag = 0;
+volatile sig_atomic_t exit_flag = 0;
krb5_context context;
static RETSIGTYPE
@@ -48,7 +48,7 @@ int
main(int argc, char **argv)
{
krb5_error_code ret;
- set_progname(argv[0]);
+ setprogname(argv[0]);
ret = krb5_init_context(&context);
if (ret)
diff --git a/kerberosV/src/kpasswd/kpasswdd.c b/kerberosV/src/kpasswd/kpasswdd.c
index fe385ba162d..81aff7792de 100644
--- a/kerberosV/src/kpasswd/kpasswdd.c
+++ b/kerberosV/src/kpasswd/kpasswdd.c
@@ -32,7 +32,7 @@
*/
#include "kpasswd_locl.h"
-RCSID("$KTH: kpasswdd.c,v 1.49 2001/01/11 21:33:53 assar Exp $");
+RCSID("$KTH: kpasswdd.c,v 1.51 2001/05/14 06:18:56 assar Exp $");
#include <kadm5/admin.h>
@@ -41,7 +41,7 @@ RCSID("$KTH: kpasswdd.c,v 1.49 2001/01/11 21:33:53 assar Exp $");
static krb5_context context;
static krb5_log_facility *log_facility;
-static sig_atomic_t exit_flag = 0;
+static volatile sig_atomic_t exit_flag = 0;
static void
send_reply (int s,
@@ -138,7 +138,8 @@ reply_error (krb5_principal server,
&e_data,
NULL,
server,
- 0,
+ NULL,
+ NULL,
&error_data);
krb5_data_free (&e_data);
if (ret) {
@@ -366,7 +367,10 @@ process (krb5_principal server,
return;
}
- ret = krb5_sockaddr2address (sa, &other_addr);
+ krb5_auth_con_setflags (context, auth_context,
+ KRB5_AUTH_CONTEXT_DO_SEQUENCE);
+
+ ret = krb5_sockaddr2address (context, sa, &other_addr);
if (ret) {
krb5_warn (context, ret, "krb5_sockaddr2address");
goto out;
@@ -443,8 +447,7 @@ doit (krb5_keytab keytab, int port)
for (i = 0; i < n; ++i) {
int sa_size;
- krb5_addr2sockaddr (&addrs.val[i], sa, &sa_size, port);
-
+ krb5_addr2sockaddr (context, &addrs.val[i], sa, &sa_size, port);
sockets[i] = socket (sa->sa_family, SOCK_DGRAM, 0);
if (sockets[i] < 0)