diff options
author | assar <assar@FreeBSD.org> | 2000-07-20 05:43:55 +0000 |
---|---|---|
committer | assar <assar@FreeBSD.org> | 2000-07-20 05:43:55 +0000 |
commit | f816d255fad4e3881fb0ebdee93ab8d88b5aff73 (patch) | |
tree | be913c2e7588e5681b61c5e5849493b89d0e3ed2 /crypto | |
parent | 2f1d9ab5d22b9d04095dc2cb7118a434c042020d (diff) | |
download | FreeBSD-src-f816d255fad4e3881fb0ebdee93ab8d88b5aff73.zip FreeBSD-src-f816d255fad4e3881fb0ebdee93ab8d88b5aff73.tar.gz |
merge in syslog fixes, do not call syslog with variabel as format string
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/kerberosIV/appl/kauth/kauthd.c | 12 | ||||
-rw-r--r-- | crypto/kerberosIV/appl/kip/kipd.c | 4 | ||||
-rw-r--r-- | crypto/kerberosIV/appl/sample/sample_server.c | 6 |
3 files changed, 14 insertions, 8 deletions
diff --git a/crypto/kerberosIV/appl/kauth/kauthd.c b/crypto/kerberosIV/appl/kauth/kauthd.c index 8dae4d0..d0b61ec 100644 --- a/crypto/kerberosIV/appl/kauth/kauthd.c +++ b/crypto/kerberosIV/appl/kauth/kauthd.c @@ -1,3 +1,5 @@ +/* $FreeBSD$ */ + /* * Copyright (c) 1995, 1996, 1997, 1998 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). @@ -33,7 +35,7 @@ #include "kauth.h" -RCSID("$Id: kauthd.c,v 1.25 1999/12/02 16:58:31 joda Exp $"); +RCSID("$Id: kauthd.c,v 1.25.2.1 2000/06/28 19:07:58 assar Exp $"); krb_principal princ; static char locuser[SNAME_SZ]; @@ -128,7 +130,7 @@ doit(int sock) if( kuserok(&auth, locuser) != 0) { snprintf(buf, sizeof(buf), "%s cannot get tickets for %s", locuser, krb_unparse_name(&princ)); - syslog (LOG_ERR, buf); + syslog (LOG_ERR, "%s", buf); write_encrypted (sock, buf, strlen(buf), schedule, &auth.session, &thisaddr, &thataddr); return 1; @@ -136,7 +138,7 @@ doit(int sock) passwd = k_getpwnam (locuser); if (passwd == NULL) { snprintf (buf, sizeof(buf), "No user '%s'", locuser); - syslog (LOG_ERR, buf); + syslog (LOG_ERR, "%s", buf); write_encrypted (sock, buf, strlen(buf), schedule, &auth.session, &thisaddr, &thataddr); return 1; @@ -145,7 +147,7 @@ doit(int sock) initgroups(passwd->pw_name, passwd->pw_gid) || setuid(passwd->pw_uid)) { snprintf (buf, sizeof(buf), "Could not change user"); - syslog (LOG_ERR, buf); + syslog (LOG_ERR, "%s", buf); write_encrypted (sock, buf, strlen(buf), schedule, &auth.session, &thisaddr, &thataddr); return 1; @@ -182,7 +184,7 @@ doit(int sock) return 0; } else { snprintf (buf, sizeof(buf), "TGT failed: %s", krb_get_err_text(status)); - syslog (LOG_NOTICE, buf); + syslog (LOG_NOTICE, "%s", buf); write_encrypted (sock, buf, strlen(buf), schedule, &auth.session, &thisaddr, &thataddr); return 1; diff --git a/crypto/kerberosIV/appl/kip/kipd.c b/crypto/kerberosIV/appl/kip/kipd.c index 429f815..f0e74c9 100644 --- a/crypto/kerberosIV/appl/kip/kipd.c +++ b/crypto/kerberosIV/appl/kip/kipd.c @@ -1,3 +1,5 @@ +/* $FreeBSD$ */ + /* * Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). @@ -42,7 +44,7 @@ fatal (int fd, char *s) write (fd, &err, sizeof(err)); write (fd, s, strlen(s)+1); - syslog(LOG_ERR, s); + syslog(LOG_ERR, "%s", s); return err; } diff --git a/crypto/kerberosIV/appl/sample/sample_server.c b/crypto/kerberosIV/appl/sample/sample_server.c index 5442562..65b61ae 100644 --- a/crypto/kerberosIV/appl/sample/sample_server.c +++ b/crypto/kerberosIV/appl/sample/sample_server.c @@ -1,3 +1,5 @@ +/* $FreeBSD$ */ + /* * * Copyright 1987, 1988 by the Massachusetts Institute of Technology. @@ -18,7 +20,7 @@ #include "sample.h" -RCSID("$Id: sample_server.c,v 1.14 1999/11/13 06:28:49 assar Exp $"); +RCSID("$Id: sample_server.c,v 1.14.2.1 2000/06/28 19:08:00 assar Exp $"); static void usage (void) @@ -108,7 +110,7 @@ main(int argc, char **argv) snprintf(retbuf, sizeof(retbuf), "Kerberos error: %s\n", krb_get_err_text(status)); - syslog(LOG_ERR, retbuf); + syslog(LOG_ERR, "%s", retbuf); } else { /* Check the version string (KRB_SENDAUTH_VLEN chars) */ if (strncmp(version, SAMPLE_VERSION, KRB_SENDAUTH_VLEN)) { |