summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-03-28 12:51:17 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-04-05 02:39:08 +0200
commitb74fe73a6fb5862121235f18bc1dfe538e6ceaed (patch)
tree34a3f09ad3f0565a90fe13e735daecb44e779795
parentd166b798529dab4538054d0b68797c0cc17f34de (diff)
downloadsamba-b74fe73a6fb5862121235f18bc1dfe538e6ceaed.tar.gz
samba-b74fe73a6fb5862121235f18bc1dfe538e6ceaed.tar.bz2
samba-b74fe73a6fb5862121235f18bc1dfe538e6ceaed.zip
build: Remove sys_fopen wrapper
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/lib/smbconf/testsuite.c2
-rw-r--r--source3/lib/system.c10
-rw-r--r--source3/passdb/pdb_smbpasswd.c6
-rw-r--r--source3/smbd/quotas.c2
-rw-r--r--source3/web/swat.c2
6 files changed, 6 insertions, 17 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index e603d0d839..654735a483 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -336,7 +336,6 @@ int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf,
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);
diff --git a/source3/lib/smbconf/testsuite.c b/source3/lib/smbconf/testsuite.c
index 9e679362a3..5638fd2454 100644
--- a/source3/lib/smbconf/testsuite.c
+++ b/source3/lib/smbconf/testsuite.c
@@ -183,7 +183,7 @@ static bool create_conf_file(const char *filename)
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));
diff --git a/source3/lib/system.c b/source3/lib/system.c
index f22215d2a1..421beb53fd 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -584,16 +584,6 @@ int sys_fallocate(int fd, enum vfs_fallocate_mode mode, SMB_OFF_T offset, SMB_OF
#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 */
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c
index 7f82c1f7cd..5fda363950 100644
--- a/source3/passdb/pdb_smbpasswd.c
+++ b/source3/passdb/pdb_smbpasswd.c
@@ -237,14 +237,14 @@ creating file %s\n", pfile));
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 {
@@ -762,7 +762,7 @@ static bool mod_smbfilepwd_entry(struct smbpasswd_privates *smbpasswd_state, con
}
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));
diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c
index c2616157e4..caf02445dc 100644
--- a/source3/smbd/quotas.c
+++ b/source3/smbd/quotas.c
@@ -807,7 +807,7 @@ bool disk_quotas(const char *path,
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;
}
diff --git a/source3/web/swat.c b/source3/web/swat.c
index 0e17b015e9..1e676a5aec 100644
--- a/source3/web/swat.c
+++ b/source3/web/swat.c
@@ -561,7 +561,7 @@ static int save_reload(int snum)
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");