krbfileio.c (505d05c7) krbfileio.c (159d09a2)
1/*
1/*
2 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
2 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
4 */
5
3 * Use is subject to license terms.
4 */
5
6#pragma ident "%Z%%M% %I% %E% SMI"
7
8
9#include "k5-int.h"
10#include <sys/file.h>
11#include <fcntl.h>
12
13#ifndef O_BINARY
6
7
8#include "k5-int.h"
9#include <sys/file.h>
10#include <fcntl.h>
11
12#ifndef O_BINARY
14#define O_BINARY 0
13#define O_BINARY 0
15#endif
16
17krb5_error_code
18krb5_create_secure_file(krb5_context context, const char *pathname)
14#endif
15
16krb5_error_code
17krb5_create_secure_file(krb5_context context, const char *pathname)
19
20{
21 int fd;
22 int open_flag;
23
24 open_flag = O_CREAT|O_EXCL|O_TRUNC|O_RDWR;
25
26 /*
27 * Make sure file name is reserved.

--- 26 unchanged lines hidden ---
18{
19 int fd;
20 int open_flag;
21
22 open_flag = O_CREAT|O_EXCL|O_TRUNC|O_RDWR;
23
24 /*
25 * Make sure file name is reserved.

--- 26 unchanged lines hidden ---