summaryrefslogtreecommitdiff
path: root/source3/smbwrapper
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbwrapper')
-rw-r--r--source3/smbwrapper/smbw.c5
-rw-r--r--source3/smbwrapper/smbw.h1
-rw-r--r--source3/smbwrapper/smbw_dir.c2
3 files changed, 5 insertions, 3 deletions
diff --git a/source3/smbwrapper/smbw.c b/source3/smbwrapper/smbw.c
index 11192bedd7..e933fc3636 100644
--- a/source3/smbwrapper/smbw.c
+++ b/source3/smbwrapper/smbw.c
@@ -523,7 +523,7 @@ int smbw_open(const char *fname, int flags, mode_t mode)
goto failed;
}
file->srv = srv;
- file->fd = open("/dev/null", O_WRONLY);
+ file->fd = open(SMBW_DUMMY, O_WRONLY);
if (file->fd == -1) {
errno = EMFILE;
goto failed;
@@ -567,7 +567,8 @@ ssize_t smbw_read(int fd, void *buf, size_t count)
struct smbw_file *file;
int ret;
- DEBUG(4,("%s %d\n", __FUNCTION__, (int)count));
+ DEBUG(4,("%s %d\n",
+ __FUNCTION__, (int)count));
smbw_busy++;
diff --git a/source3/smbwrapper/smbw.h b/source3/smbwrapper/smbw.h
index 5fc864456e..af48061ff0 100644
--- a/source3/smbwrapper/smbw.h
+++ b/source3/smbwrapper/smbw.h
@@ -20,6 +20,7 @@
*/
#define SMBW_PREFIX "/smb/"
+#define SMBW_DUMMY "/dev/null"
#define SMBW_CLI_FD 512
#define SMBW_MAX_OPEN 8192
diff --git a/source3/smbwrapper/smbw_dir.c b/source3/smbwrapper/smbw_dir.c
index c437a53e1f..a127048793 100644
--- a/source3/smbwrapper/smbw_dir.c
+++ b/source3/smbwrapper/smbw_dir.c
@@ -175,7 +175,7 @@ int smbw_dir_open(const char *fname)
cur_dir = NULL;
- fd = open("/dev/null", O_WRONLY);
+ fd = open(SMBW_DUMMY, O_WRONLY);
if (fd == -1) {
errno = EMFILE;
goto failed;