From a83b802bada404e3b2eccf92c3499966deaad171 Mon Sep 17 00:00:00 2001 From: markm Date: Fri, 25 Aug 1995 22:52:32 +0000 Subject: 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 --- eBones/krb/tkt_string.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'eBones/krb/tkt_string.c') 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 @@ * . * * 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 +#include #include #include #include #include -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); -- cgit v1.1