summaryrefslogtreecommitdiffstats
path: root/source3/smbd/nttrans.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-02-15 19:36:47 +0000
committerJeremy Allison <jra@samba.org>2000-02-15 19:36:47 +0000
commit3cf31a194f5721b67b1255e3f168d4bc87d433fc (patch)
treef9e3ef842e2bad4d7fb0142f685962e125176b23 /source3/smbd/nttrans.c
parent8688933c7feb87179c178a30e4fc42970fe1da8f (diff)
downloadsamba-3cf31a194f5721b67b1255e3f168d4bc87d433fc.tar.gz
samba-3cf31a194f5721b67b1255e3f168d4bc87d433fc.tar.xz
samba-3cf31a194f5721b67b1255e3f168d4bc87d433fc.zip
Added replacement functions sys_popen and sys_pclose. These are based
on the glibc source code and are safer than the traditional popen as they don't use a shell to exec the requested command. Now we have these functions they can be tightened up (environment etc.) as required to make a safe popen. It should now be safe to add the environement variable loading code to loadparm.c Jeremy. (This used to be commit b52e92b09d4ca3b66e534f520468dee27065d048)
Diffstat (limited to 'source3/smbd/nttrans.c')
-rw-r--r--source3/smbd/nttrans.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index d9ad16e7d3c..e94e603661a 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -843,15 +843,13 @@ int reply_ntcreate_and_X(connection_struct *conn,
}
if(fsp->is_directory) {
- if(fsp->conn->vfs_ops.stat(dos_to_unix(fsp->fsp_name, False),
- &sbuf) != 0) {
+ if(conn->vfs_ops.stat(dos_to_unix(fsp->fsp_name, False), &sbuf) != 0) {
close_file(fsp,True);
restore_case_semantics(file_attributes);
return(ERROR(ERRDOS,ERRnoaccess));
}
} else {
- if (fsp->conn->vfs_ops.fstat(fsp->fd_ptr->fd,&sbuf)
- != 0) {
+ if (conn->vfs_ops.fstat(fsp->fd_ptr->fd,&sbuf) != 0) {
close_file(fsp,False);
restore_case_semantics(file_attributes);
return(ERROR(ERRDOS,ERRnoaccess));