summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/client/client.c2
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/lib/dbwrap/dbwrap_file.c4
-rw-r--r--source3/lib/recvfile.c2
-rw-r--r--source3/lib/smbrun.c2
-rw-r--r--source3/lib/system.c9
-rw-r--r--source3/lib/util.c2
-rw-r--r--source3/modules/vfs_default.c2
-rw-r--r--source3/passdb/pdb_smbpasswd.c8
9 files changed, 11 insertions, 21 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 0d60103f26..f10e56348c 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -1110,7 +1110,7 @@ static int do_get(const char *rname, const char *lname_in, bool reget)
if (reget) {
handle = sys_open(lname, O_WRONLY|O_CREAT, 0644);
if (handle >= 0) {
- start = sys_lseek(handle, 0, SEEK_END);
+ start = lseek(handle, 0, SEEK_END);
if (start == -1) {
d_printf("Error seeking local file\n");
return 1;
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 430cfeb8cf..b3ab9714e6 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);
-SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence);
SMB_OFF_T sys_ftell(FILE *fp);
int sys_creat(const char *path, mode_t mode);
int sys_open(const char *path, int oflag, mode_t mode);
diff --git a/source3/lib/dbwrap/dbwrap_file.c b/source3/lib/dbwrap/dbwrap_file.c
index 8e513b5ad2..5b0da3a810 100644
--- a/source3/lib/dbwrap/dbwrap_file.c
+++ b/source3/lib/dbwrap/dbwrap_file.c
@@ -199,8 +199,8 @@ static struct db_record *db_file_fetch_locked(struct db_context *db,
static NTSTATUS db_file_store_root(int fd, TDB_DATA data)
{
- if (sys_lseek(fd, 0, SEEK_SET) != 0) {
- DEBUG(0, ("sys_lseek failed: %s\n", strerror(errno)));
+ if (lseek(fd, 0, SEEK_SET) != 0) {
+ DEBUG(0, ("lseek failed: %s\n", strerror(errno)));
return map_nt_error_from_unix(errno);
}
diff --git a/source3/lib/recvfile.c b/source3/lib/recvfile.c
index c74cdd5a67..6c8a1a3b57 100644
--- a/source3/lib/recvfile.c
+++ b/source3/lib/recvfile.c
@@ -63,7 +63,7 @@ static ssize_t default_sys_recvfile(int fromfd,
}
if (tofd != -1 && offset != (SMB_OFF_T)-1) {
- if (sys_lseek(tofd, offset, SEEK_SET) == -1) {
+ if (lseek(tofd, offset, SEEK_SET) == -1) {
if (errno != ESPIPE) {
return -1;
}
diff --git a/source3/lib/smbrun.c b/source3/lib/smbrun.c
index b38dee1665..0ecdc0d683 100644
--- a/source3/lib/smbrun.c
+++ b/source3/lib/smbrun.c
@@ -132,7 +132,7 @@ static int smbrun_internal(const char *cmd, int *outfd, bool sanitize)
/* Reset the seek pointer. */
if (outfd) {
- sys_lseek(*outfd, 0, SEEK_SET);
+ lseek(*outfd, 0, SEEK_SET);
}
#if defined(WIFEXITED) && defined(WEXITSTATUS)
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 1e2c30db2f..08d13e6f2b 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -585,15 +585,6 @@ int sys_fallocate(int fd, enum vfs_fallocate_mode mode, SMB_OFF_T offset, SMB_OF
}
/*******************************************************************
- An lseek() wrapper.
-********************************************************************/
-
-SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence)
-{
- return lseek(fd, offset, whence);
-}
-
-/*******************************************************************
An ftell() wrapper.
********************************************************************/
diff --git a/source3/lib/util.c b/source3/lib/util.c
index d6e8ed8090..dcc02b5baf 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -347,7 +347,7 @@ ssize_t write_data_at_offset(int fd, const char *buffer, size_t N, SMB_OFF_T pos
return (ssize_t)total;
#else
/* Use lseek and write_data. */
- if (sys_lseek(fd, pos, SEEK_SET) == -1) {
+ if (lseek(fd, pos, SEEK_SET) == -1) {
if (errno != ESPIPE) {
return -1;
}
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index f5a64759be..35073143c0 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -634,7 +634,7 @@ static SMB_OFF_T vfswrap_lseek(vfs_handle_struct *handle, files_struct *fsp, SMB
/* Cope with 'stat' file opens. */
if (fsp->fh->fd != -1)
- result = sys_lseek(fsp->fh->fd, offset, whence);
+ result = lseek(fsp->fh->fd, offset, whence);
/*
* We want to maintain the fiction that we can seek
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c
index 789374a75f..4c7ff57f6c 100644
--- a/source3/passdb/pdb_smbpasswd.c
+++ b/source3/passdb/pdb_smbpasswd.c
@@ -678,9 +678,9 @@ static NTSTATUS add_smbfilepwd_entry(struct smbpasswd_privates *smbpasswd_state,
*/
fd = fileno(fp);
- if((offpos = sys_lseek(fd, 0, SEEK_END)) == -1) {
+ if((offpos = lseek(fd, 0, SEEK_END)) == -1) {
NTSTATUS result = map_nt_error_from_unix(errno);
- DEBUG(0, ("add_smbfilepwd_entry(sys_lseek): Failed to add entry for user %s to file %s. \
+ DEBUG(0, ("add_smbfilepwd_entry(lseek): Failed to add entry for user %s to file %s. \
Error was %s\n", newpwd->smb_name, pfile, strerror(errno)));
endsmbfilepwent(fp, &smbpasswd_state->pw_file_lock_depth);
return result;
@@ -1039,7 +1039,7 @@ This is no longer supported.!\n", pwd->smb_name));
fd = fileno(fp);
- if (sys_lseek(fd, pwd_seekpos - 1, SEEK_SET) != pwd_seekpos - 1) {
+ if (lseek(fd, pwd_seekpos - 1, SEEK_SET) != pwd_seekpos - 1) {
DEBUG(0, ("mod_smbfilepwd_entry: seek fail on file %s.\n", pfile));
pw_file_unlock(lockfd,&smbpasswd_state->pw_file_lock_depth);
fclose(fp);
@@ -1061,7 +1061,7 @@ This is no longer supported.!\n", pwd->smb_name));
return False;
}
- if (sys_lseek(fd, pwd_seekpos, SEEK_SET) != pwd_seekpos) {
+ if (lseek(fd, pwd_seekpos, SEEK_SET) != pwd_seekpos) {
DEBUG(0, ("mod_smbfilepwd_entry: seek fail on file %s.\n", pfile));
pw_file_unlock(lockfd,&smbpasswd_state->pw_file_lock_depth);
fclose(fp);