(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:
@@ -975,8 +975,13 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
if (appres.destroytickets) {
|
if (appres.destroytickets) {
|
||||||
#ifdef KRB4
|
#ifdef KRB4
|
||||||
|
int fd;
|
||||||
|
|
||||||
dest_tkt(); /* Nuke old ticket file */
|
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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user