summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c34
-rw-r--r--source4/ntvfs/ipc/vfs_ipc.c14
-rw-r--r--source4/ntvfs/posix/pvfs_util.c2
-rw-r--r--source4/ntvfs/simple/vfs_simple.c34
-rw-r--r--source4/ntvfs/sysdep/inotify.c6
-rw-r--r--source4/ntvfs/sysdep/sys_lease_linux.c4
6 files changed, 47 insertions, 47 deletions
diff --git a/source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c b/source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c
index 2a8c69e220..949b6dbbb7 100644
--- a/source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c
+++ b/source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c
@@ -150,7 +150,7 @@ static NTSTATUS cifspsx_unlink(struct ntvfs_module_context *ntvfs,
/* ignoring wildcards ... */
if (unlink(unix_path) == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
return NT_STATUS_OK;
@@ -179,7 +179,7 @@ static NTSTATUS cifspsx_chkpath(struct ntvfs_module_context *ntvfs,
unix_path = cifspsx_unix_path(ntvfs, req, cp->chkpath.in.path);
if (stat(unix_path, &st) == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
if (!S_ISDIR(st.st_mode)) {
@@ -294,7 +294,7 @@ static NTSTATUS cifspsx_qpathinfo(struct ntvfs_module_context *ntvfs,
DEBUG(19,("cifspsx_qpathinfo: file %s\n", unix_path));
if (stat(unix_path, &st) == -1) {
DEBUG(19,("cifspsx_qpathinfo: file %s errno=%d\n", unix_path, errno));
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
DEBUG(19,("cifspsx_qpathinfo: file %s, stat done\n", unix_path));
return cifspsx_map_fileinfo(ntvfs, req, info, &st, unix_path);
@@ -320,7 +320,7 @@ static NTSTATUS cifspsx_qfileinfo(struct ntvfs_module_context *ntvfs,
}
if (fstat(f->fd, &st) == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
return cifspsx_map_fileinfo(ntvfs, req,info, &st, f->name);
@@ -389,13 +389,13 @@ static NTSTATUS cifspsx_open(struct ntvfs_module_context *ntvfs,
case NTCREATEX_DISP_CREATE:
if (mkdir(unix_path, 0755) == -1) {
DEBUG(9,("cifspsx_open: mkdir %s errno=%d\n", unix_path, errno));
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
break;
case NTCREATEX_DISP_OPEN_IF:
if (mkdir(unix_path, 0755) == -1 && errno != EEXIST) {
DEBUG(9,("cifspsx_open: mkdir %s errno=%d\n", unix_path, errno));
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
break;
}
@@ -404,13 +404,13 @@ static NTSTATUS cifspsx_open(struct ntvfs_module_context *ntvfs,
do_open:
fd = open(unix_path, flags, 0644);
if (fd == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
if (fstat(fd, &st) == -1) {
DEBUG(9,("cifspsx_open: fstat errno=%d\n", errno));
close(fd);
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
status = ntvfs_handle_new(ntvfs, req, &handle);
@@ -459,7 +459,7 @@ static NTSTATUS cifspsx_mkdir(struct ntvfs_module_context *ntvfs,
unix_path = cifspsx_unix_path(ntvfs, req, md->mkdir.in.path);
if (mkdir(unix_path, 0777) == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
return NT_STATUS_OK;
@@ -478,7 +478,7 @@ static NTSTATUS cifspsx_rmdir(struct ntvfs_module_context *ntvfs,
unix_path = cifspsx_unix_path(ntvfs, req, rd->in.path);
if (rmdir(unix_path) == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
return NT_STATUS_OK;
@@ -502,7 +502,7 @@ static NTSTATUS cifspsx_rename(struct ntvfs_module_context *ntvfs,
unix_path2 = cifspsx_unix_path(ntvfs, req, ren->rename.in.pattern2);
if (rename(unix_path1, unix_path2) == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
return NT_STATUS_OK;
@@ -541,7 +541,7 @@ static NTSTATUS cifspsx_read(struct ntvfs_module_context *ntvfs,
rd->readx.in.maxcnt,
rd->readx.in.offset);
if (ret == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
rd->readx.out.nread = ret;
@@ -577,7 +577,7 @@ static NTSTATUS cifspsx_write(struct ntvfs_module_context *ntvfs,
wr->writex.in.count,
wr->writex.in.offset);
if (ret == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
wr->writex.out.nwritten = ret;
@@ -648,7 +648,7 @@ static NTSTATUS cifspsx_close(struct ntvfs_module_context *ntvfs,
}
if (close(f->fd) == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
DLIST_REMOVE(p->open_files, f);
@@ -738,7 +738,7 @@ static NTSTATUS cifspsx_setfileinfo(struct ntvfs_module_context *ntvfs,
case RAW_SFILEINFO_END_OF_FILE_INFORMATION:
if (ftruncate(f->fd,
info->end_of_file_info.in.size) == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
break;
case RAW_SFILEINFO_SETATTRE:
@@ -784,7 +784,7 @@ static NTSTATUS cifspsx_fsinfo(struct ntvfs_module_context *ntvfs,
if (sys_fsusage(p->connectpath,
&fs->generic.out.blocks_free,
&fs->generic.out.blocks_total) == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
fs->generic.out.block_size = 512;
@@ -824,7 +824,7 @@ static NTSTATUS cifspsx_fsattr(struct ntvfs_module_context *ntvfs,
}
if (stat(p->connectpath, &st) == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
unix_to_nt_time(&fs->generic.out.create_time, st.st_ctime);
diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c
index 185e72cfb0..fc9ff4fb12 100644
--- a/source4/ntvfs/ipc/vfs_ipc.c
+++ b/source4/ntvfs/ipc/vfs_ipc.c
@@ -353,7 +353,7 @@ static void ipc_open_done(struct tevent_req *subreq)
&p->allocation_size);
TALLOC_FREE(subreq);
if (ret == -1) {
- status = map_nt_error_from_unix(sys_errno);
+ status = map_nt_error_from_unix_common(sys_errno);
goto reply;
}
@@ -602,7 +602,7 @@ static void ipc_read_done(struct tevent_req *subreq)
ret = tstream_readv_pdu_queue_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);
if (ret == -1) {
- status = map_nt_error_from_unix(sys_errno);
+ status = map_nt_error_from_unix_common(sys_errno);
goto reply;
}
@@ -687,7 +687,7 @@ static void ipc_write_done(struct tevent_req *subreq)
ret = tstream_writev_queue_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);
if (ret == -1) {
- status = map_nt_error_from_unix(sys_errno);
+ status = map_nt_error_from_unix_common(sys_errno);
goto reply;
}
@@ -1009,7 +1009,7 @@ static void ipc_trans_writev_done(struct tevent_req *subreq)
status = NT_STATUS_PIPE_DISCONNECTED;
goto reply;
} else if (ret == -1) {
- status = map_nt_error_from_unix(sys_errno);
+ status = map_nt_error_from_unix_common(sys_errno);
goto reply;
}
@@ -1045,7 +1045,7 @@ static void ipc_trans_readv_done(struct tevent_req *subreq)
ret = tstream_readv_pdu_queue_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);
if (ret == -1) {
- status = map_nt_error_from_unix(sys_errno);
+ status = map_nt_error_from_unix_common(sys_errno);
goto reply;
}
@@ -1215,7 +1215,7 @@ static void ipc_ioctl_writev_done(struct tevent_req *subreq)
ret = tstream_writev_queue_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);
if (ret == -1) {
- status = map_nt_error_from_unix(sys_errno);
+ status = map_nt_error_from_unix_common(sys_errno);
goto reply;
}
@@ -1251,7 +1251,7 @@ static void ipc_ioctl_readv_done(struct tevent_req *subreq)
ret = tstream_readv_pdu_queue_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);
if (ret == -1) {
- status = map_nt_error_from_unix(sys_errno);
+ status = map_nt_error_from_unix_common(sys_errno);
goto reply;
}
diff --git a/source4/ntvfs/posix/pvfs_util.c b/source4/ntvfs/posix/pvfs_util.c
index 8dedf13a63..c6c6eaa13c 100644
--- a/source4/ntvfs/posix/pvfs_util.c
+++ b/source4/ntvfs/posix/pvfs_util.c
@@ -40,7 +40,7 @@ bool pvfs_has_wildcard(const char *str)
NTSTATUS pvfs_map_errno(struct pvfs_state *pvfs, int unix_errno)
{
NTSTATUS status;
- status = map_nt_error_from_unix(unix_errno);
+ status = map_nt_error_from_unix_common(unix_errno);
DEBUG(10,(__location__ " mapped unix errno %d -> %s\n", unix_errno, nt_errstr(status)));
return status;
}
diff --git a/source4/ntvfs/simple/vfs_simple.c b/source4/ntvfs/simple/vfs_simple.c
index 03bf76634d..7ae41db521 100644
--- a/source4/ntvfs/simple/vfs_simple.c
+++ b/source4/ntvfs/simple/vfs_simple.c
@@ -147,7 +147,7 @@ static NTSTATUS svfs_unlink(struct ntvfs_module_context *ntvfs,
/* ignoring wildcards ... */
if (unlink(unix_path) == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
return NT_STATUS_OK;
@@ -176,7 +176,7 @@ static NTSTATUS svfs_chkpath(struct ntvfs_module_context *ntvfs,
unix_path = svfs_unix_path(ntvfs, req, cp->chkpath.in.path);
if (stat(unix_path, &st) == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
if (!S_ISDIR(st.st_mode)) {
@@ -291,7 +291,7 @@ static NTSTATUS svfs_qpathinfo(struct ntvfs_module_context *ntvfs,
DEBUG(19,("svfs_qpathinfo: file %s\n", unix_path));
if (stat(unix_path, &st) == -1) {
DEBUG(19,("svfs_qpathinfo: file %s errno=%d\n", unix_path, errno));
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
DEBUG(19,("svfs_qpathinfo: file %s, stat done\n", unix_path));
return svfs_map_fileinfo(ntvfs, req, info, &st, unix_path);
@@ -317,7 +317,7 @@ static NTSTATUS svfs_qfileinfo(struct ntvfs_module_context *ntvfs,
}
if (fstat(f->fd, &st) == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
return svfs_map_fileinfo(ntvfs, req,info, &st, f->name);
@@ -386,13 +386,13 @@ static NTSTATUS svfs_open(struct ntvfs_module_context *ntvfs,
case NTCREATEX_DISP_CREATE:
if (mkdir(unix_path, 0755) == -1) {
DEBUG(9,("svfs_open: mkdir %s errno=%d\n", unix_path, errno));
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
break;
case NTCREATEX_DISP_OPEN_IF:
if (mkdir(unix_path, 0755) == -1 && errno != EEXIST) {
DEBUG(9,("svfs_open: mkdir %s errno=%d\n", unix_path, errno));
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
break;
}
@@ -401,13 +401,13 @@ static NTSTATUS svfs_open(struct ntvfs_module_context *ntvfs,
do_open:
fd = open(unix_path, flags, 0644);
if (fd == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
if (fstat(fd, &st) == -1) {
DEBUG(9,("svfs_open: fstat errno=%d\n", errno));
close(fd);
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
status = ntvfs_handle_new(ntvfs, req, &handle);
@@ -456,7 +456,7 @@ static NTSTATUS svfs_mkdir(struct ntvfs_module_context *ntvfs,
unix_path = svfs_unix_path(ntvfs, req, md->mkdir.in.path);
if (mkdir(unix_path, 0777) == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
return NT_STATUS_OK;
@@ -475,7 +475,7 @@ static NTSTATUS svfs_rmdir(struct ntvfs_module_context *ntvfs,
unix_path = svfs_unix_path(ntvfs, req, rd->in.path);
if (rmdir(unix_path) == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
return NT_STATUS_OK;
@@ -499,7 +499,7 @@ static NTSTATUS svfs_rename(struct ntvfs_module_context *ntvfs,
unix_path2 = svfs_unix_path(ntvfs, req, ren->rename.in.pattern2);
if (rename(unix_path1, unix_path2) == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
return NT_STATUS_OK;
@@ -538,7 +538,7 @@ static NTSTATUS svfs_read(struct ntvfs_module_context *ntvfs,
rd->readx.in.maxcnt,
rd->readx.in.offset);
if (ret == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
rd->readx.out.nread = ret;
@@ -574,7 +574,7 @@ static NTSTATUS svfs_write(struct ntvfs_module_context *ntvfs,
wr->writex.in.count,
wr->writex.in.offset);
if (ret == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
wr->writex.out.nwritten = ret;
@@ -645,7 +645,7 @@ static NTSTATUS svfs_close(struct ntvfs_module_context *ntvfs,
}
if (close(f->fd) == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
DLIST_REMOVE(p->open_files, f);
@@ -735,7 +735,7 @@ static NTSTATUS svfs_setfileinfo(struct ntvfs_module_context *ntvfs,
case RAW_SFILEINFO_END_OF_FILE_INFORMATION:
if (ftruncate(f->fd,
info->end_of_file_info.in.size) == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
break;
case RAW_SFILEINFO_SETATTRE:
@@ -781,7 +781,7 @@ static NTSTATUS svfs_fsinfo(struct ntvfs_module_context *ntvfs,
if (sys_fsusage(p->connectpath,
&fs->generic.out.blocks_free,
&fs->generic.out.blocks_total) == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
fs->generic.out.block_size = 512;
@@ -821,7 +821,7 @@ static NTSTATUS svfs_fsattr(struct ntvfs_module_context *ntvfs,
}
if (stat(p->connectpath, &st) == -1) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
unix_to_nt_time(&fs->generic.out.create_time, st.st_ctime);
diff --git a/source4/ntvfs/sysdep/inotify.c b/source4/ntvfs/sysdep/inotify.c
index 42aac0b097..28ea32e8a0 100644
--- a/source4/ntvfs/sysdep/inotify.c
+++ b/source4/ntvfs/sysdep/inotify.c
@@ -258,7 +258,7 @@ static NTSTATUS inotify_setup(struct sys_notify_context *ctx)
if (in->fd == -1) {
DEBUG(0,("Failed to init inotify - %s\n", strerror(errno)));
talloc_free(in);
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
in->ctx = ctx;
in->watches = NULL;
@@ -274,7 +274,7 @@ static NTSTATUS inotify_setup(struct sys_notify_context *ctx)
}
DEBUG(0,("Failed to tevent_add_fd() - %s\n", strerror(errno)));
talloc_free(in);
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
tevent_fd_set_auto_close(fde);
@@ -373,7 +373,7 @@ static NTSTATUS inotify_watch(struct sys_notify_context *ctx,
wd = inotify_add_watch(in->fd, e->path, mask);
if (wd == -1) {
e->filter = filter;
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
w = talloc(in, struct inotify_watch_context);
diff --git a/source4/ntvfs/sysdep/sys_lease_linux.c b/source4/ntvfs/sysdep/sys_lease_linux.c
index c0fb4335d9..3b0605b73b 100644
--- a/source4/ntvfs/sysdep/sys_lease_linux.c
+++ b/source4/ntvfs/sysdep/sys_lease_linux.c
@@ -131,13 +131,13 @@ static NTSTATUS linux_lease_setup(struct sys_lease_context *ctx,
ret = fcntl(*fd, F_SETSIG, LINUX_LEASE_RT_SIGNAL);
if (ret == -1) {
talloc_free(p);
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
ret = fcntl(*fd, F_SETLEASE, F_WRLCK);
if (ret == -1) {
talloc_free(p);
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
DLIST_ADD(leases, p);