bool fake_dir_create_times);
int sys_posix_fallocate(int fd, SMB_OFF_T offset, SMB_OFF_T len);
int sys_fallocate(int fd, enum vfs_fallocate_mode mode, SMB_OFF_T offset, SMB_OFF_T len);
-FILE *sys_fopen(const char *path, const char *type);
void kernel_flock(int fd, uint32 share_mode, uint32 access_mask);
SMB_STRUCT_DIR *sys_opendir(const char *name);
SMB_STRUCT_DIR *sys_fdopendir(int fd);
FILE *f;
printf("TEST: creating file\n");
- f = sys_fopen(filename, "w");
+ f = fopen(filename, "w");
if (!f) {
printf("failure: failed to open %s for writing: %s\n",
filename, strerror(errno));
#endif
}
-/*******************************************************************
- An fopen() wrapper.
-********************************************************************/
-
-FILE *sys_fopen(const char *path, const char *type)
-{
- return fopen(path, type);
-}
-
-
#if HAVE_KERNEL_SHARE_MODES
#ifndef LOCK_MAND
#define LOCK_MAND 32 /* This is a mandatory flock */
for(race_loop = 0; race_loop < 5; race_loop++) {
DEBUG(10, ("startsmbfilepwent_internal: opening file %s\n", pfile));
- if((fp = sys_fopen(pfile, open_mode)) == NULL) {
+ if((fp = fopen(pfile, open_mode)) == NULL) {
/*
* If smbpasswd file doesn't exist, then create new one. This helps to avoid
* confusing error msg when adding user account first time.
*/
if (errno == ENOENT) {
- if ((fp = sys_fopen(pfile, "a+")) != NULL) {
+ if ((fp = fopen(pfile, "a+")) != NULL) {
DEBUG(0, ("startsmbfilepwent_internal: file %s did not \
exist. File successfully created.\n", pfile));
} else {
}
DEBUG(10, ("mod_smbfilepwd_entry: opening file %s\n", pfile));
- fp = sys_fopen(pfile, "r+");
+ fp = fopen(pfile, "r+");
if (fp == NULL) {
DEBUG(0, ("mod_smbfilepwd_entry: unable to open file %s\n", pfile));
DEBUG(5,("disk_quotas: looking for path \"%s\" devno=%x\n",
path, (unsigned int)devno));
#if defined(SUNOS5)
- if ((fd = sys_fopen(MNTTAB, "r")) == NULL) {
+ if ((fd = fopen(MNTTAB, "r")) == NULL) {
return false;
}
FILE *f;
struct stat st;
- f = sys_fopen(get_dyn_CONFIGFILE(),"w");
+ f = fopen(get_dyn_CONFIGFILE(),"w");
if (!f) {
printf(_("failed to open %s for writing"), get_dyn_CONFIGFILE());
printf("\n");