diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-04-10 13:05:23 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-04-10 13:05:23 +0000 |
commit | 689ec46450a3f373b583ebe98d124ab4a99ce3ef (patch) | |
tree | 2e86c1a862fce2da5162de7a3cd45fc8611d5a38 /source3/smbd/nttrans.c | |
parent | c3043695ae507b34580dc1287418ff5704b6f625 (diff) | |
download | samba-689ec46450a3f373b583ebe98d124ab4a99ce3ef.tar.gz samba-689ec46450a3f373b583ebe98d124ab4a99ce3ef.tar.bz2 samba-689ec46450a3f373b583ebe98d124ab4a99ce3ef.zip |
the bulk of the changes to get rid of fd_ptr and move print open
handling to printing/printing.c
most of this was just replacing things like fsp->fd_ptr->fd with fsp->fd
the changes in open.c are quite dramatic. Most of it is removing all
the functions that handled the fd multiplexing
(This used to be commit d1827a3648009fd0a0d165055015d9aeda7a1037)
Diffstat (limited to 'source3/smbd/nttrans.c')
-rw-r--r-- | source3/smbd/nttrans.c | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 1a43350e90..54e67f5593 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -754,18 +754,6 @@ int reply_ntcreate_and_X(connection_struct *conn, return(ERROR(ERRSRV,ERRnofids)); } - if (!check_name(fname,conn)) { - if((errno == ENOENT) && bad_path) { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } - file_free(fsp); - - restore_case_semantics(file_attributes); - - return(UNIXERROR(ERRDOS,ERRnoaccess)); - } - unixmode = unix_mode(conn,smb_attr | aARCH, fname); /* @@ -889,7 +877,7 @@ int reply_ntcreate_and_X(connection_struct *conn, return(ERROR(ERRDOS,ERRnoaccess)); } } else { - if (conn->vfs_ops.fstat(fsp->fd_ptr->fd,&sbuf) != 0) { + if (conn->vfs_ops.fstat(fsp->fd,&sbuf) != 0) { close_file(fsp,False); restore_case_semantics(file_attributes); return(ERROR(ERRDOS,ERRnoaccess)); @@ -1128,18 +1116,6 @@ static int call_nt_transact_create(connection_struct *conn, return(ERROR(ERRSRV,ERRnofids)); } - if (!check_name(fname,conn)) { - if((errno == ENOENT) && bad_path) { - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRbadpath; - } - file_free(fsp); - - restore_case_semantics(file_attributes); - - return(UNIXERROR(ERRDOS,ERRnoaccess)); - } - unixmode = unix_mode(conn,smb_attr | aARCH, fname); /* @@ -1244,7 +1220,7 @@ static int call_nt_transact_create(connection_struct *conn, return(ERROR(ERRDOS,ERRnoaccess)); } } else { - if (!fsp->stat_open && conn->vfs_ops.fstat(fsp->fd_ptr->fd,&sbuf) != 0) { + if (!fsp->stat_open && conn->vfs_ops.fstat(fsp->fd,&sbuf) != 0) { close_file(fsp,False); restore_case_semantics(file_attributes); return(ERROR(ERRDOS,ERRnoaccess)); @@ -1869,12 +1845,12 @@ static size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc) sid_copy( &group_sid, &global_sid_World); } else { - if(fsp->is_directory || fsp->fd_ptr == NULL) { + if(fsp->is_directory || fsp->fd == -1) { if(dos_stat(fsp->fsp_name, &sbuf) != 0) { return 0; } } else { - if(fsp->conn->vfs_ops.fstat(fsp->fd_ptr->fd,&sbuf) != 0) { + if(fsp->conn->vfs_ops.fstat(fsp->fd,&sbuf) != 0) { return 0; } } @@ -2391,10 +2367,10 @@ security descriptor.\n")); int ret; - if(fsp->fd_ptr == NULL) + if(fsp->fd == -1) ret = conn->vfs_ops.stat(dos_to_unix(fsp->fsp_name,False), &sbuf); else - ret = conn->vfs_ops.fstat(fsp->fd_ptr->fd,&sbuf); + ret = conn->vfs_ops.fstat(fsp->fd,&sbuf); if(ret != 0) { free_sec_desc(&psd); @@ -2444,10 +2420,10 @@ security descriptor.\n")); int ret; - if(fsp->fd_ptr == NULL) + if(fsp->fd == -1) ret = conn->vfs_ops.stat(dos_to_unix(fsp->fsp_name,False), &sbuf); else - ret = conn->vfs_ops.fstat(fsp->fd_ptr->fd,&sbuf); + ret = conn->vfs_ops.fstat(fsp->fd,&sbuf); if(ret != 0) return(UNIXERROR(ERRDOS,ERRnoaccess)); |