(main): create place-holder ticket file with open(O_EXCL | O_CREAT)

instead of creat


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5065 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1998-07-07 23:37:34 +00:00
parent 16ce55a9bc
commit 29c5cba17e

View File

@@ -975,8 +975,13 @@ main (int argc, char **argv)
if (appres.destroytickets) {
#ifdef KRB4
int fd;
dest_tkt(); /* Nuke old ticket file */
creat(TKT_FILE, 0600); /* but keep a place holder */
/* but keep a place holder */
fd = open (TKT_FILE, O_WRONLY | O_CREAT | O_EXCL, 0600);
if (fd >= 0)
close (fd);
#endif
}