summaryrefslogtreecommitdiffstats
path: root/eBones/krb/tkt_string.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1995-08-25 22:52:32 +0000
committermarkm <markm@FreeBSD.org>1995-08-25 22:52:32 +0000
commita83b802bada404e3b2eccf92c3499966deaad171 (patch)
tree45f2ba147600b7d47d9e9695cf572877c7fa4773 /eBones/krb/tkt_string.c
parent2d8492d7c86b21502ee9277e20ef1e6e931b7c44 (diff)
downloadFreeBSD-src-a83b802bada404e3b2eccf92c3499966deaad171.zip
FreeBSD-src-a83b802bada404e3b2eccf92c3499966deaad171.tar.gz
Start the eBones cleanup ball rolling.
These are the start of a lot of work to clean up the FreeBSD eBones code. these changes include, but are not limited to: - Create prototypes for all the library routines - Make all the libraries compile clean with -Wall set - Fix numerous small bugs shown up in the above process - Prepare the code for libdes's removal to secure/ - add register, registerd and make_keypair to the make Lots more will follow in days to come. OK'ed by: rgrimes
Diffstat (limited to 'eBones/krb/tkt_string.c')
-rw-r--r--eBones/krb/tkt_string.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/eBones/krb/tkt_string.c b/eBones/krb/tkt_string.c
index ba22db8..bbbdbc5 100644
--- a/eBones/krb/tkt_string.c
+++ b/eBones/krb/tkt_string.c
@@ -5,22 +5,23 @@
* <Copyright.MIT>.
*
* from: tkt_string.c,v 4.6 89/01/05 12:31:51 raeburn Exp $
- * $Id: tkt_string.c,v 1.2 1994/07/19 19:26:29 g89r4222 Exp $
+ * $Id: tkt_string.c,v 1.3 1995/07/18 16:39:52 mark Exp $
*/
+#if 0
#ifndef lint
static char *rcsid =
-"$Id: tkt_string.c,v 1.2 1994/07/19 19:26:29 g89r4222 Exp $";
+"$Id: tkt_string.c,v 1.3 1995/07/18 16:39:52 mark Exp $";
#endif /* lint */
+#endif
#include <stdio.h>
+#include <stdlib.h>
#include <sys/types.h>
#include <krb.h>
#include <string.h>
#include <sys/param.h>
-char *getenv();
-
/*
* This routine is used to generate the name of the file that holds
* the user's cache of server tickets and associated session keys.
@@ -43,14 +44,14 @@ char *tkt_string()
uid_t getuid();
if (!*krb_ticket_string) {
- if (env = getenv("KRBTKFILE")) {
+ if ((env = getenv("KRBTKFILE"))) {
(void) strncpy(krb_ticket_string, env,
sizeof(krb_ticket_string)-1);
krb_ticket_string[sizeof(krb_ticket_string)-1] = '\0';
} else {
/* 32 bits of signed integer will always fit in 11 characters
(including the sign), so no need to worry about overflow */
- (void) sprintf(krb_ticket_string, "%s%d",TKT_ROOT,getuid());
+ (void) sprintf(krb_ticket_string, "%s%ld",TKT_ROOT,getuid());
}
}
return krb_ticket_string;
@@ -67,9 +68,7 @@ char *tkt_string()
* and return an undesired ticket file name until this routine is called.
*/
-void
-krb_set_tkt_string(val)
-char *val;
+void krb_set_tkt_string(char *val)
{
(void) strncpy(krb_ticket_string, val, sizeof(krb_ticket_string)-1);
OpenPOWER on IntegriCloud