~ubuntu-branches/ubuntu/oneiric/openafs/oneiric-201305130334

« back to all changes in this revision

Viewing changes to src/auth/ktc.c

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hartman
  • Date: 2006-10-21 20:57:09 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20061021205709-y5keam1v20qxjwwo
Tags: 1.4.2-2
Upstream fix to prevent butc segfaulting.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#endif
18
18
 
19
19
RCSID
20
 
    ("$Header: /cvs/openafs/src/auth/ktc.c,v 1.15.2.1 2004/08/25 07:09:36 shadow Exp $");
 
20
    ("$Header: /cvs/openafs/src/auth/ktc.c,v 1.15.2.6 2006/10/06 12:44:40 shadow Exp $");
21
21
 
22
22
#if defined(UKERNEL)
23
23
#include "afs/sysincludes.h"
71
71
 
72
72
/* For malloc() */
73
73
#include <stdlib.h>
74
 
 
 
74
#include "ktc.h"
75
75
 
76
76
#ifdef  notdef
77
77
/* AFS_KERBEROS_ENV is now conditionally defined in the Makefile */
132
132
int afs_tf_save_cred(), afs_tf_close(), afs_tf_create();
133
133
int afs_tf_dest_tkt();
134
134
static void ktc_LocalCell();
135
 
char *ktc_tkt_string();
136
135
#endif /* AFS_KERBEROS_ENV */
137
136
 
138
137
#ifdef AFS_DUX40_ENV
1437
1436
static char krb_ticket_string[4096] = "";
1438
1437
 
1439
1438
char *
1440
 
ktc_tkt_string()
 
1439
ktc_tkt_string(void)
 
1440
{
 
1441
    return ktc_tkt_string_uid(getuid());
 
1442
}
 
1443
 
 
1444
char *
 
1445
ktc_tkt_string_uid(afs_uint32 uid)
1441
1446
{
1442
1447
    char *env;
1443
1448
 
1450
1455
        } else {
1451
1456
            /* 32 bits of signed integer will always fit in 11 characters
1452
1457
             * (including the sign), so no need to worry about overflow */
1453
 
            (void)sprintf(krb_ticket_string, "%s%d", TKT_ROOT, getuid());
 
1458
            (void)sprintf(krb_ticket_string, "%s%d", TKT_ROOT, uid);
1454
1459
        }
1455
1460
    }
1456
1461
    UNLOCK_GLOBAL_MUTEX;
1469
1474
 */
1470
1475
 
1471
1476
void
1472
 
ktc_set_tkt_string(val)
1473
 
     char *val;
 
1477
ktc_set_tkt_string(char * val)
1474
1478
{
1475
1479
 
1476
1480
    LOCK_GLOBAL_MUTEX;