diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/dir.c | 4 | ||||
-rw-r--r-- | source3/smbd/open.c | 4 | ||||
-rw-r--r-- | source3/smbd/oplock.c | 4 | ||||
-rw-r--r-- | source3/smbd/reply.c | 28 | ||||
-rw-r--r-- | source3/smbd/server.c | 2 | ||||
-rw-r--r-- | source3/smbd/service.c | 10 | ||||
-rw-r--r-- | source3/smbd/uid.c | 10 |
7 files changed, 31 insertions, 31 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index db2de23f6d..dcf1d158b4 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -518,7 +518,7 @@ void *OpenDir(connection_struct *conn, char *name, BOOL use_veto) { Dir *dirp; char *n; - void *p = dos_opendir(name); + DIR *p = dos_opendir(name); int used=0; if (!p) return(NULL); @@ -530,7 +530,7 @@ void *OpenDir(connection_struct *conn, char *name, BOOL use_veto) dirp->pos = dirp->numentries = dirp->mallocsize = 0; dirp->data = dirp->current = NULL; - while ((n = readdirname(p))) + while ((n = dos_readdirname(p))) { int l = strlen(n)+1; diff --git a/source3/smbd/open.c b/source3/smbd/open.c index d7cef6d63b..dd1ece7fe1 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -550,7 +550,7 @@ static void mmap_open_file(files_struct *fsp) #if WITH_MMAP /* mmap it if read-only */ if (!fsp->can_write) { - fsp->mmap_size = file_size(fsp->fsp_name); + fsp->mmap_size = dos_file_size(fsp->fsp_name); if (fsp->mmap_size < MAX_MMAP_SIZE) { fsp->mmap_ptr = (char *)sys_mmap(NULL,fsp->mmap_size, PROT_READ,MAP_SHARED,fsp->fd_ptr->fd,(SMB_OFF_T)0); @@ -727,7 +727,7 @@ void open_file_shared(files_struct *fsp,connection_struct *conn,char *fname,int int deny_mode = GET_DENY_MODE(share_mode); BOOL allow_share_delete = GET_ALLOW_SHARE_DELETE(share_mode); SMB_STRUCT_STAT sbuf; - BOOL file_existed = file_exist(fname,&sbuf); + BOOL file_existed = dos_file_exist(fname,&sbuf); BOOL share_locked = False; BOOL fcbopen = False; int token; diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index f61b025227..bc2d46bb95 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -665,7 +665,7 @@ static BOOL oplock_break(SMB_DEV_T dev, SMB_INO_T inode, struct timeval *tval) */ saved_conn = fsp->conn; saved_vuid = current_user.vuid; - GetWd(saved_dir); + dos_GetWd(saved_dir); unbecome_user(); /* Save the chain fnum. */ file_chain_save(); @@ -749,7 +749,7 @@ static BOOL oplock_break(SMB_DEV_T dev, SMB_INO_T inode, struct timeval *tval) exit_server("unable to re-become user"); } /* Including the directory. */ - ChDir(saved_dir); + dos_ChDir(saved_dir); /* Restore the chain fnum. */ file_chain_restore(); diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 12bf098a94..1abb084124 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -809,7 +809,7 @@ int reply_chkpth(connection_struct *conn, char *inbuf,char *outbuf, int dum_size if(VALID_STAT(st)) ok = S_ISDIR(st.st_mode); else - ok = directory_exist(name,NULL); + ok = dos_directory_exist(name,NULL); } if (!ok) @@ -944,7 +944,7 @@ int reply_setatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size mode = SVAL(inbuf,smb_vwv0); mtime = make_unix_date3(inbuf+smb_vwv1); - if (VALID_STAT_OF_DIR(st) || directory_exist(fname,NULL)) + if (VALID_STAT_OF_DIR(st) || dos_directory_exist(fname,NULL)) mode |= aDIR; if (check_name(fname,conn)) ok = (file_chmod(conn,fname,mode,NULL) == 0); @@ -1757,7 +1757,7 @@ int reply_unlink(connection_struct *conn, char *inbuf,char *outbuf, int dum_size if (can_delete(directory,conn,dirtype) && !dos_unlink(directory)) count++; if (!count) - exists = file_exist(directory,NULL); + exists = dos_file_exist(directory,NULL); } else { void *dirptr = NULL; char *dname; @@ -3274,7 +3274,7 @@ int rename_internals(connection_struct *conn, /* * NT SMB specific flag - rename can overwrite * file with the same name so don't check for - * file_exist(). + * dos_file_exist(). */ if(resolve_wildcards(directory,newname) && can_rename(directory,conn) && @@ -3283,7 +3283,7 @@ int rename_internals(connection_struct *conn, } else { if (resolve_wildcards(directory,newname) && can_rename(directory,conn) && - !file_exist(newname,NULL) && + !dos_file_exist(newname,NULL) && !dos_rename(directory,newname)) count++; } @@ -3291,8 +3291,8 @@ int rename_internals(connection_struct *conn, DEBUG(3,("rename_internals: %s doing rename on %s -> %s\n",(count != 0) ? "succeeded" : "failed", directory,newname)); - if (!count) exists = file_exist(directory,NULL); - if (!count && exists && file_exist(newname,NULL)) { + if (!count) exists = dos_file_exist(directory,NULL); + if (!count && exists && dos_file_exist(newname,NULL)) { exists = True; error = ERRrename; } @@ -3333,8 +3333,8 @@ int rename_internals(connection_struct *conn, continue; } - if (!replace_if_exists && file_exist(destname,NULL)) { - DEBUG(6,("file_exist %s\n", destname)); + if (!replace_if_exists && dos_file_exist(destname,NULL)) { + DEBUG(6,("dos_file_exist %s\n", destname)); error = 183; continue; } @@ -3408,7 +3408,7 @@ static BOOL copy_file(char *src,char *dest1,connection_struct *conn, int ofun, pstrcat(dest,p); } - if (!file_exist(src,&st)) + if (!dos_file_exist(src,&st)) return(False); fsp1 = file_new(); @@ -3501,7 +3501,7 @@ int reply_copy(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, unix_convert(name,conn,0,&bad_path1,NULL); unix_convert(newname,conn,0,&bad_path2,NULL); - target_is_directory = directory_exist(newname,NULL); + target_is_directory = dos_directory_exist(newname,NULL); if ((flags&1) && target_is_directory) { return(ERROR(ERRDOS,ERRbadfile)); @@ -3511,7 +3511,7 @@ int reply_copy(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, return(ERROR(ERRDOS,ERRbadpath)); } - if ((flags&(1<<5)) && directory_exist(name,NULL)) { + if ((flags&(1<<5)) && dos_directory_exist(name,NULL)) { /* wants a tree copy! XXXX */ DEBUG(3,("Rejecting tree copy\n")); return(ERROR(ERRSRV,ERRerror)); @@ -3538,7 +3538,7 @@ int reply_copy(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, if (resolve_wildcards(directory,newname) && copy_file(directory,newname,conn,ofun, count,target_is_directory)) count++; - if (!count) exists = file_exist(directory,NULL); + if (!count) exists = dos_file_exist(directory,NULL); } else { void *dirptr = NULL; char *dname; @@ -3613,7 +3613,7 @@ int reply_setdir(connection_struct *conn, char *inbuf,char *outbuf, int dum_size if (strlen(newdir) == 0) { ok = True; } else { - ok = directory_exist(newdir,NULL); + ok = dos_directory_exist(newdir,NULL); if (ok) { string_set(&conn->connectpath,newdir); } diff --git a/source3/smbd/server.c b/source3/smbd/server.c index acde9eebf3..d0178508d9 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -553,7 +553,7 @@ static void usage(char *pname) so set our umask to 0 */ umask(0); - GetWd(OriginalDir); + dos_GetWd(OriginalDir); init_uid(); diff --git a/source3/smbd/service.c b/source3/smbd/service.c index cedac1c76f..b4a1115867 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -54,8 +54,8 @@ BOOL become_service(connection_struct *conn,BOOL do_chdir) snum = SNUM(conn); if (do_chdir && - ChDir(conn->connectpath) != 0 && - ChDir(conn->origpath) != 0) { + dos_ChDir(conn->connectpath) != 0 && + dos_ChDir(conn->origpath) != 0) { DEBUG(0,("chdir (%s) failed\n", conn->connectpath)); return(False); @@ -430,7 +430,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int return NULL; } - if (ChDir(conn->connectpath) != 0) { + if (dos_ChDir(conn->connectpath) != 0) { DEBUG(0,("Can't change directory to %s (%s)\n", conn->connectpath,strerror(errno))); unbecome_user(); @@ -453,9 +453,9 @@ connection_struct *make_connection(char *service,char *user,char *password, int { pstring s; pstrcpy(s,conn->connectpath); - GetWd(s); + dos_GetWd(s); string_set(&conn->connectpath,s); - ChDir(conn->connectpath); + dos_ChDir(conn->connectpath); } #endif diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index 7c951b461a..f76fa49d56 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -54,7 +54,7 @@ void init_uid(void) current_user.conn = NULL; current_user.vuid = UID_FIELD_INVALID; - ChDir(OriginalDir); + dos_ChDir(OriginalDir); } @@ -303,7 +303,7 @@ BOOL unbecome_user(void ) if (!current_user.conn) return(False); - ChDir(OriginalDir); + dos_ChDir(OriginalDir); if (initial_uid == 0) { @@ -336,7 +336,7 @@ BOOL unbecome_user(void ) current_user.uid = initial_uid; current_user.gid = initial_gid; - if (ChDir(OriginalDir) != 0) + if (dos_ChDir(OriginalDir) != 0) DEBUG( 0, ( "chdir(%s) failed in unbecome_user\n", OriginalDir ) ); DEBUG(5,("unbecome_user now uid=(%d,%d) gid=(%d,%d)\n", @@ -366,7 +366,7 @@ void become_root(BOOL save_dir) DEBUG(0,("ERROR: become root depth is non zero\n")); } if (save_dir) - GetWd(become_root_dir); + dos_GetWd(become_root_dir); current_user_saved = current_user; become_root_depth = 1; @@ -415,7 +415,7 @@ void unbecome_root(BOOL restore_dir) } if (restore_dir) - ChDir(become_root_dir); + dos_ChDir(become_root_dir); current_user = current_user_saved; |