mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
Rolled back Lukes changes. Not quite ready for prime time.
Jeremy (jallison@whistle.com)
This commit is contained in:
parent
f3ee4620ea
commit
ed04ec7ab8
@ -73,13 +73,13 @@ void dptr_closecnum(int cnum);
|
|||||||
void dptr_idlecnum(int cnum);
|
void dptr_idlecnum(int cnum);
|
||||||
void dptr_closepath(char *path,int pid);
|
void dptr_closepath(char *path,int pid);
|
||||||
int dptr_create(int cnum,char *path, BOOL expect_close,int pid);
|
int dptr_create(int cnum,char *path, BOOL expect_close,int pid);
|
||||||
BOOL dptr_fill(int cnum, char *buf1,unsigned int key);
|
BOOL dptr_fill(char *buf1,unsigned int key);
|
||||||
BOOL dptr_zero(char *buf);
|
BOOL dptr_zero(char *buf);
|
||||||
void *dptr_fetch(int cnum, char *buf,int *num);
|
void *dptr_fetch(char *buf,int *num);
|
||||||
void *dptr_fetch_lanman2(int cnum, char *params,int dptr_num);
|
void *dptr_fetch_lanman2(char *params,int dptr_num);
|
||||||
BOOL dir_check_ftype(int cnum,int mode,struct stat *st,int dirtype);
|
BOOL dir_check_ftype(int cnum,int mode,struct stat *st,int dirtype);
|
||||||
BOOL get_dir_entry(int cnum,char *mask,int dirtype,char *fname,int *size,int *mode,time_t *date,BOOL check_descend);
|
BOOL get_dir_entry(int cnum,char *mask,int dirtype,char *fname,int *size,int *mode,time_t *date,BOOL check_descend);
|
||||||
void *OpenDir(int cnum, char *name);
|
void *OpenDir(char *name);
|
||||||
void CloseDir(void *p);
|
void CloseDir(void *p);
|
||||||
char *ReadDirName(void *p);
|
char *ReadDirName(void *p);
|
||||||
BOOL SeekDir(void *p,int pos);
|
BOOL SeekDir(void *p,int pos);
|
||||||
@ -141,6 +141,7 @@ char *lp_username_map(void);
|
|||||||
char *lp_character_set(void);
|
char *lp_character_set(void);
|
||||||
char *lp_logon_script(void);
|
char *lp_logon_script(void);
|
||||||
char *lp_logon_path(void);
|
char *lp_logon_path(void);
|
||||||
|
char *lp_veto_files(void);
|
||||||
char *lp_remote_announce(void);
|
char *lp_remote_announce(void);
|
||||||
char *lp_wins_server(void);
|
char *lp_wins_server(void);
|
||||||
char *lp_interfaces(void);
|
char *lp_interfaces(void);
|
||||||
@ -217,8 +218,6 @@ char *lp_readlist(int );
|
|||||||
char *lp_writelist(int );
|
char *lp_writelist(int );
|
||||||
char *lp_volume(int );
|
char *lp_volume(int );
|
||||||
char *lp_mangled_map(int );
|
char *lp_mangled_map(int );
|
||||||
char *lp_veto_files(int );
|
|
||||||
char *lp_hide_files(int );
|
|
||||||
BOOL lp_alternate_permissions(int );
|
BOOL lp_alternate_permissions(int );
|
||||||
BOOL lp_revalidate(int );
|
BOOL lp_revalidate(int );
|
||||||
BOOL lp_casesensitive(int );
|
BOOL lp_casesensitive(int );
|
||||||
@ -274,18 +273,12 @@ BOOL do_lock(int fnum,int cnum,uint32 count,uint32 offset,int *eclass,uint32 *ec
|
|||||||
BOOL do_unlock(int fnum,int cnum,uint32 count,uint32 offset,int *eclass,uint32 *ecode);
|
BOOL do_unlock(int fnum,int cnum,uint32 count,uint32 offset,int *eclass,uint32 *ecode);
|
||||||
BOOL start_share_mode_mgmt(void);
|
BOOL start_share_mode_mgmt(void);
|
||||||
BOOL stop_share_mode_mgmt(void);
|
BOOL stop_share_mode_mgmt(void);
|
||||||
BOOL lock_share_entry(int cnum, uint32 dev, uint32 inode, share_lock_token *ptok);
|
BOOL lock_share_entry(int cnum, uint32 dev, uint32 inode, share_lock_token *);
|
||||||
BOOL unlock_share_entry(int cnum, uint32 dev, uint32 inode, share_lock_token token);
|
BOOL unlock_share_entry(int cnum, uint32 dev, uint32 inode, share_lock_token);
|
||||||
int get_share_modes(int cnum, share_lock_token token, uint32 dev, uint32 inode,
|
int get_share_modes(int cnum, share_lock_token token, uint32 dev, uint32 inode,
|
||||||
min_share_mode_entry **old_shares);
|
min_share_mode_entry **old_shares);
|
||||||
void del_share_mode(share_lock_token token, int fnum);
|
void del_share_mode(share_lock_token token, int fnum);
|
||||||
BOOL set_share_mode(share_lock_token token, int fnum);
|
BOOL set_share_mode(share_lock_token token, int fnum);
|
||||||
BOOL lock_share_entry(int cnum, uint32 dev, uint32 inode, share_lock_token *ptok);
|
|
||||||
BOOL unlock_share_entry(int cnum, uint32 dev, uint32 inode, share_lock_token token);
|
|
||||||
int get_share_modes(int cnum, share_lock_token token, uint32 dev, uint32 inode,
|
|
||||||
min_share_mode_entry **old_shares);
|
|
||||||
void del_share_mode(share_lock_token token, int fnum);
|
|
||||||
BOOL set_share_mode(share_lock_token token,int fnum);
|
|
||||||
|
|
||||||
/*The following definitions come from mangle.c */
|
/*The following definitions come from mangle.c */
|
||||||
|
|
||||||
@ -309,6 +302,7 @@ int reply_sendend(char *inbuf,char *outbuf);
|
|||||||
|
|
||||||
/*The following definitions come from nameannounce.c */
|
/*The following definitions come from nameannounce.c */
|
||||||
|
|
||||||
|
void reset_announce_timer();
|
||||||
void announce_request(struct work_record *work, struct in_addr ip);
|
void announce_request(struct work_record *work, struct in_addr ip);
|
||||||
void do_announce_request(char *info, char *to_name, int announce_type,
|
void do_announce_request(char *info, char *to_name, int announce_type,
|
||||||
int from,
|
int from,
|
||||||
@ -326,7 +320,6 @@ void announce_my_servers_removed(void);
|
|||||||
void announce_server(struct subnet_record *d, struct work_record *work,
|
void announce_server(struct subnet_record *d, struct work_record *work,
|
||||||
char *name, char *comment, time_t ttl, int server_type);
|
char *name, char *comment, time_t ttl, int server_type);
|
||||||
void announce_host(time_t t);
|
void announce_host(time_t t);
|
||||||
void reset_announce_timer();
|
|
||||||
void announce_master(time_t t);
|
void announce_master(time_t t);
|
||||||
void announce_remote(time_t t);
|
void announce_remote(time_t t);
|
||||||
|
|
||||||
@ -334,7 +327,8 @@ void announce_remote(time_t t);
|
|||||||
|
|
||||||
void expire_browse_cache(time_t t);
|
void expire_browse_cache(time_t t);
|
||||||
struct browse_cache_record *add_browser_entry(char *name, int type, char *wg,
|
struct browse_cache_record *add_browser_entry(char *name, int type, char *wg,
|
||||||
time_t ttl, struct subnet_record *d,
|
time_t ttl,
|
||||||
|
struct subnet_record *d,
|
||||||
struct in_addr ip, BOOL local);
|
struct in_addr ip, BOOL local);
|
||||||
void do_browser_lists(time_t t);
|
void do_browser_lists(time_t t);
|
||||||
|
|
||||||
@ -724,12 +718,16 @@ int construct_reply(char *inbuf,char *outbuf,int size,int bufsize);
|
|||||||
|
|
||||||
/*The following definitions come from shmem.c */
|
/*The following definitions come from shmem.c */
|
||||||
|
|
||||||
BOOL smb_shm_create_hash_table( unsigned int size );
|
|
||||||
BOOL smb_shm_open( char *file_name, int size);
|
BOOL smb_shm_open( char *file_name, int size);
|
||||||
BOOL smb_shm_close( void );
|
BOOL smb_shm_close( void );
|
||||||
BOOL smb_shm_free(smb_shm_offset_t offset);
|
BOOL smb_shm_free(smb_shm_offset_t offset);
|
||||||
BOOL smb_shm_set_userdef_off(smb_shm_offset_t userdef_off);
|
BOOL smb_shm_set_userdef_off(smb_shm_offset_t userdef_off);
|
||||||
void * smb_shm_offset2addr(smb_shm_offset_t offset);
|
void * smb_shm_offset2addr(smb_shm_offset_t offset);
|
||||||
|
BOOL smb_shm_lock(void);
|
||||||
|
BOOL smb_shm_unlock(void);
|
||||||
|
smb_shm_offset_t smb_shm_alloc(int size);
|
||||||
|
smb_shm_offset_t smb_shm_addr2offset(void *addr);
|
||||||
|
smb_shm_offset_t smb_shm_get_userdef_off(void);
|
||||||
BOOL smb_shm_lock_hash_entry( unsigned int entry);
|
BOOL smb_shm_lock_hash_entry( unsigned int entry);
|
||||||
BOOL smb_shm_unlock_hash_entry( unsigned int entry );
|
BOOL smb_shm_unlock_hash_entry( unsigned int entry );
|
||||||
BOOL smb_shm_get_usage(int *bytes_free,
|
BOOL smb_shm_get_usage(int *bytes_free,
|
||||||
@ -948,9 +946,8 @@ char *gidtoname(int gid);
|
|||||||
void BlockSignals(BOOL block,int signum);
|
void BlockSignals(BOOL block,int signum);
|
||||||
void ajt_panic(void);
|
void ajt_panic(void);
|
||||||
char *readdirname(void *p);
|
char *readdirname(void *p);
|
||||||
BOOL is_vetoed_name(int snum, char *name);
|
BOOL is_vetoed_name(char *name);
|
||||||
BOOL is_hidden_path(int cnum, char *path);
|
BOOL is_vetoed_path(char *name);
|
||||||
BOOL is_vetoed_path(int cnum, char *path);
|
|
||||||
BOOL fcntl_lock(int fd,int op,uint32 offset,uint32 count,int type);
|
BOOL fcntl_lock(int fd,int op,uint32 offset,uint32 count,int type);
|
||||||
int file_lock(char *name,int timeout);
|
int file_lock(char *name,int timeout);
|
||||||
void file_unlock(int fd);
|
void file_unlock(int fd);
|
||||||
|
@ -915,11 +915,4 @@ enum case_handling {CASE_LOWER,CASE_UPPER};
|
|||||||
/* Size of buffer to use when moving files across filesystems. */
|
/* Size of buffer to use when moving files across filesystems. */
|
||||||
#define COPYBUF_SIZE (8*1024)
|
#define COPYBUF_SIZE (8*1024)
|
||||||
|
|
||||||
/* Default files that will be hidden, but accessible. intended
|
|
||||||
to replace the "hide dot files" parameter if the "hide files"
|
|
||||||
parameter moves to the service section instead of the global
|
|
||||||
section.
|
|
||||||
*/
|
|
||||||
#define DEFAULT_FILES_TO_HIDE ".*"
|
|
||||||
|
|
||||||
/* _SMB_H */
|
/* _SMB_H */
|
||||||
|
@ -3427,9 +3427,9 @@ char *readdirname(void *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL is_vetoed_name(int snum, char *name)
|
BOOL is_vetoed_name(char *name)
|
||||||
{
|
{
|
||||||
char *namelist = lp_veto_files(snum);
|
char *namelist = lp_veto_files();
|
||||||
char *nameptr = namelist;
|
char *nameptr = namelist;
|
||||||
char *name_end;
|
char *name_end;
|
||||||
|
|
||||||
@ -3469,8 +3469,9 @@ BOOL is_vetoed_name(int snum, char *name)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL is_in_path(char *name, char *namelist)
|
BOOL is_vetoed_path(char *name)
|
||||||
{
|
{
|
||||||
|
char *namelist = lp_veto_files();
|
||||||
char *nameptr = namelist;
|
char *nameptr = namelist;
|
||||||
char *sub;
|
char *sub;
|
||||||
char *name_end;
|
char *name_end;
|
||||||
@ -3521,22 +3522,6 @@ static BOOL is_in_path(char *name, char *namelist)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
used to make files hidden, but still accessible
|
|
||||||
****************************************************************************/
|
|
||||||
BOOL is_hidden_path(int cnum, char *path)
|
|
||||||
{
|
|
||||||
return is_in_path(path, lp_hide_files(cnum));
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
used to make files _completely_ inaccessible
|
|
||||||
****************************************************************************/
|
|
||||||
BOOL is_vetoed_path(int cnum, char *path)
|
|
||||||
{
|
|
||||||
return is_in_path(path, lp_veto_files(cnum));
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
routine to do file locking
|
routine to do file locking
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -129,6 +129,7 @@ typedef struct
|
|||||||
char *szCharacterSet;
|
char *szCharacterSet;
|
||||||
char *szLogonScript;
|
char *szLogonScript;
|
||||||
char *szLogonPath;
|
char *szLogonPath;
|
||||||
|
char *szVetoFiles;
|
||||||
char *szSmbrun;
|
char *szSmbrun;
|
||||||
char *szWINSserver;
|
char *szWINSserver;
|
||||||
char *szInterfaces;
|
char *szInterfaces;
|
||||||
@ -212,8 +213,6 @@ typedef struct
|
|||||||
char *szMagicScript;
|
char *szMagicScript;
|
||||||
char *szMagicOutput;
|
char *szMagicOutput;
|
||||||
char *szMangledMap;
|
char *szMangledMap;
|
||||||
char *szVetoFiles;
|
|
||||||
char *szHideFiles;
|
|
||||||
char *comment;
|
char *comment;
|
||||||
char *force_user;
|
char *force_user;
|
||||||
char *force_group;
|
char *force_group;
|
||||||
@ -291,8 +290,6 @@ static service sDefault =
|
|||||||
NULL, /* szMagicScript */
|
NULL, /* szMagicScript */
|
||||||
NULL, /* szMagicOutput */
|
NULL, /* szMagicOutput */
|
||||||
NULL, /* szMangledMap */
|
NULL, /* szMangledMap */
|
||||||
NULL, /* szVetoFiles */
|
|
||||||
DEFAULT_FILES_TO_HIDE, /* szHideFiles */
|
|
||||||
NULL, /* comment */
|
NULL, /* comment */
|
||||||
NULL, /* force user */
|
NULL, /* force user */
|
||||||
NULL, /* force group */
|
NULL, /* force group */
|
||||||
@ -397,6 +394,7 @@ struct parm_struct
|
|||||||
{"socket options", P_GSTRING, P_GLOBAL, user_socket_options, NULL},
|
{"socket options", P_GSTRING, P_GLOBAL, user_socket_options, NULL},
|
||||||
{"netbios name", P_UGSTRING,P_GLOBAL, myname, NULL},
|
{"netbios name", P_UGSTRING,P_GLOBAL, myname, NULL},
|
||||||
{"smbrun", P_STRING, P_GLOBAL, &Globals.szSmbrun, NULL},
|
{"smbrun", P_STRING, P_GLOBAL, &Globals.szSmbrun, NULL},
|
||||||
|
{"veto files", P_STRING, P_GLOBAL, &Globals.szVetoFiles, NULL},
|
||||||
{"log file", P_STRING, P_GLOBAL, &Globals.szLogFile, NULL},
|
{"log file", P_STRING, P_GLOBAL, &Globals.szLogFile, NULL},
|
||||||
{"config file", P_STRING, P_GLOBAL, &Globals.szConfigFile, NULL},
|
{"config file", P_STRING, P_GLOBAL, &Globals.szConfigFile, NULL},
|
||||||
{"smb passwd file", P_STRING, P_GLOBAL, &Globals.szSMBPasswdFile, NULL},
|
{"smb passwd file", P_STRING, P_GLOBAL, &Globals.szSMBPasswdFile, NULL},
|
||||||
@ -509,8 +507,6 @@ struct parm_struct
|
|||||||
{"set directory", P_BOOLREV, P_LOCAL, &sDefault.bNo_set_dir, NULL},
|
{"set directory", P_BOOLREV, P_LOCAL, &sDefault.bNo_set_dir, NULL},
|
||||||
{"status", P_BOOL, P_LOCAL, &sDefault.status, NULL},
|
{"status", P_BOOL, P_LOCAL, &sDefault.status, NULL},
|
||||||
{"hide dot files", P_BOOL, P_LOCAL, &sDefault.bHideDotFiles, NULL},
|
{"hide dot files", P_BOOL, P_LOCAL, &sDefault.bHideDotFiles, NULL},
|
||||||
{"veto files", P_STRING, P_LOCAL, &sDefault.szVetoFiles, NULL},
|
|
||||||
{"hide files", P_STRING, P_LOCAL, &sDefault.szHideFiles, NULL},
|
|
||||||
{"guest only", P_BOOL, P_LOCAL, &sDefault.bGuest_only, NULL},
|
{"guest only", P_BOOL, P_LOCAL, &sDefault.bGuest_only, NULL},
|
||||||
{"only guest", P_BOOL, P_LOCAL, &sDefault.bGuest_only, NULL},
|
{"only guest", P_BOOL, P_LOCAL, &sDefault.bGuest_only, NULL},
|
||||||
{"guest ok", P_BOOL, P_LOCAL, &sDefault.bGuest_ok, NULL},
|
{"guest ok", P_BOOL, P_LOCAL, &sDefault.bGuest_ok, NULL},
|
||||||
@ -799,6 +795,7 @@ FN_GLOBAL_STRING(lp_username_map,&Globals.szUsernameMap)
|
|||||||
FN_GLOBAL_STRING(lp_character_set,&Globals.szCharacterSet)
|
FN_GLOBAL_STRING(lp_character_set,&Globals.szCharacterSet)
|
||||||
FN_GLOBAL_STRING(lp_logon_script,&Globals.szLogonScript)
|
FN_GLOBAL_STRING(lp_logon_script,&Globals.szLogonScript)
|
||||||
FN_GLOBAL_STRING(lp_logon_path,&Globals.szLogonPath)
|
FN_GLOBAL_STRING(lp_logon_path,&Globals.szLogonPath)
|
||||||
|
FN_GLOBAL_STRING(lp_veto_files,&Globals.szVetoFiles)
|
||||||
FN_GLOBAL_STRING(lp_remote_announce,&Globals.szRemoteAnnounce)
|
FN_GLOBAL_STRING(lp_remote_announce,&Globals.szRemoteAnnounce)
|
||||||
FN_GLOBAL_STRING(lp_wins_server,&Globals.szWINSserver)
|
FN_GLOBAL_STRING(lp_wins_server,&Globals.szWINSserver)
|
||||||
FN_GLOBAL_STRING(lp_interfaces,&Globals.szInterfaces)
|
FN_GLOBAL_STRING(lp_interfaces,&Globals.szInterfaces)
|
||||||
@ -878,8 +875,6 @@ FN_LOCAL_STRING(lp_readlist,readlist)
|
|||||||
FN_LOCAL_STRING(lp_writelist,writelist)
|
FN_LOCAL_STRING(lp_writelist,writelist)
|
||||||
FN_LOCAL_STRING(lp_volume,volume)
|
FN_LOCAL_STRING(lp_volume,volume)
|
||||||
FN_LOCAL_STRING(lp_mangled_map,szMangledMap)
|
FN_LOCAL_STRING(lp_mangled_map,szMangledMap)
|
||||||
FN_LOCAL_STRING(lp_veto_files,szVetoFiles)
|
|
||||||
FN_LOCAL_STRING(lp_hide_files,szHideFiles)
|
|
||||||
|
|
||||||
FN_LOCAL_BOOL(lp_alternate_permissions,bAlternatePerm)
|
FN_LOCAL_BOOL(lp_alternate_permissions,bAlternatePerm)
|
||||||
FN_LOCAL_BOOL(lp_revalidate,bRevalidate)
|
FN_LOCAL_BOOL(lp_revalidate,bRevalidate)
|
||||||
|
@ -108,7 +108,7 @@ static void dptr_idleoldest(void)
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
get the dir ptr for a dir index
|
get the dir ptr for a dir index
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
static void *dptr_get(int cnum, int key,uint32 lastused)
|
static void *dptr_get(int key,uint32 lastused)
|
||||||
{
|
{
|
||||||
if (dirptrs[key].valid) {
|
if (dirptrs[key].valid) {
|
||||||
if (lastused) dirptrs[key].lastused = lastused;
|
if (lastused) dirptrs[key].lastused = lastused;
|
||||||
@ -116,7 +116,7 @@ static void *dptr_get(int cnum, int key,uint32 lastused)
|
|||||||
if (dptrs_open >= MAXDIR)
|
if (dptrs_open >= MAXDIR)
|
||||||
dptr_idleoldest();
|
dptr_idleoldest();
|
||||||
DEBUG(4,("Reopening dptr key %d\n",key));
|
DEBUG(4,("Reopening dptr key %d\n",key));
|
||||||
if ((dirptrs[key].ptr = OpenDir(cnum, dirptrs[key].path)))
|
if ((dirptrs[key].ptr = OpenDir(dirptrs[key].path)))
|
||||||
dptrs_open++;
|
dptrs_open++;
|
||||||
}
|
}
|
||||||
return(dirptrs[key].ptr);
|
return(dirptrs[key].ptr);
|
||||||
@ -259,7 +259,7 @@ static BOOL start_dir(int cnum,char *directory)
|
|||||||
if (! *directory)
|
if (! *directory)
|
||||||
directory = ".";
|
directory = ".";
|
||||||
|
|
||||||
Connections[cnum].dirptr = OpenDir(cnum, directory);
|
Connections[cnum].dirptr = OpenDir(directory);
|
||||||
if (Connections[cnum].dirptr) {
|
if (Connections[cnum].dirptr) {
|
||||||
dptrs_open++;
|
dptrs_open++;
|
||||||
string_set(&Connections[cnum].dirpath,directory);
|
string_set(&Connections[cnum].dirpath,directory);
|
||||||
@ -345,10 +345,10 @@ int dptr_create(int cnum,char *path, BOOL expect_close,int pid)
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
fill the 5 byte server reserved dptr field
|
fill the 5 byte server reserved dptr field
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
BOOL dptr_fill(int cnum, char *buf1,unsigned int key)
|
BOOL dptr_fill(char *buf1,unsigned int key)
|
||||||
{
|
{
|
||||||
unsigned char *buf = (unsigned char *)buf1;
|
unsigned char *buf = (unsigned char *)buf1;
|
||||||
void *p = dptr_get(cnum, key,0);
|
void *p = dptr_get(key,0);
|
||||||
uint32 offset;
|
uint32 offset;
|
||||||
if (!p) {
|
if (!p) {
|
||||||
DEBUG(1,("filling null dirptr %d\n",key));
|
DEBUG(1,("filling null dirptr %d\n",key));
|
||||||
@ -373,10 +373,10 @@ BOOL dptr_zero(char *buf)
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
fetch the dir ptr and seek it given the 5 byte server field
|
fetch the dir ptr and seek it given the 5 byte server field
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
void *dptr_fetch(int cnum, char *buf,int *num)
|
void *dptr_fetch(char *buf,int *num)
|
||||||
{
|
{
|
||||||
unsigned int key = *(unsigned char *)buf;
|
unsigned int key = *(unsigned char *)buf;
|
||||||
void *p = dptr_get(cnum, key,dircounter++);
|
void *p = dptr_get(key,dircounter++);
|
||||||
uint32 offset;
|
uint32 offset;
|
||||||
if (!p) {
|
if (!p) {
|
||||||
DEBUG(3,("fetched null dirptr %d\n",key));
|
DEBUG(3,("fetched null dirptr %d\n",key));
|
||||||
@ -393,9 +393,9 @@ void *dptr_fetch(int cnum, char *buf,int *num)
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
fetch the dir ptr and seek it given the lanman2 parameter block
|
fetch the dir ptr and seek it given the lanman2 parameter block
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
void *dptr_fetch_lanman2(int cnum, char *params,int dptr_num)
|
void *dptr_fetch_lanman2(char *params,int dptr_num)
|
||||||
{
|
{
|
||||||
void *p = dptr_get(cnum, dptr_num,dircounter++);
|
void *p = dptr_get(dptr_num,dircounter++);
|
||||||
uint32 resume_key = SVAL(params,6);
|
uint32 resume_key = SVAL(params,6);
|
||||||
BOOL uses_resume_key = BITSETW(params+10,2);
|
BOOL uses_resume_key = BITSETW(params+10,2);
|
||||||
BOOL continue_bit = BITSETW(params+10,3);
|
BOOL continue_bit = BITSETW(params+10,3);
|
||||||
@ -520,7 +520,7 @@ typedef struct
|
|||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
open a directory
|
open a directory
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
void *OpenDir(int cnum, char *name)
|
void *OpenDir(char *name)
|
||||||
{
|
{
|
||||||
Dir *dirp;
|
Dir *dirp;
|
||||||
char *n;
|
char *n;
|
||||||
@ -539,7 +539,7 @@ void *OpenDir(int cnum, char *name)
|
|||||||
while ((n = readdirname(p))) {
|
while ((n = readdirname(p))) {
|
||||||
int l = strlen(n)+1;
|
int l = strlen(n)+1;
|
||||||
/* If it's a vetoed file, pretend it doesn't even exist */
|
/* If it's a vetoed file, pretend it doesn't even exist */
|
||||||
if(is_vetoed_name(cnum, n))
|
if(is_vetoed_name(n))
|
||||||
continue;
|
continue;
|
||||||
if (used + l > dirp->mallocsize) {
|
if (used + l > dirp->mallocsize) {
|
||||||
int s = MAX(used+l,used+2000);
|
int s = MAX(used+l,used+2000);
|
||||||
|
@ -222,11 +222,6 @@ int dos_mode(int cnum,char *path,struct stat *sbuf)
|
|||||||
result |= aHIDDEN;
|
result |= aHIDDEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_hidden_path(SNUM(cnum), path))
|
|
||||||
{
|
|
||||||
result |= aHIDDEN;
|
|
||||||
}
|
|
||||||
|
|
||||||
return(result);
|
return(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -366,7 +361,7 @@ static BOOL scan_directory(char *path, char *name,int snum,BOOL docache)
|
|||||||
check_mangled_stack(name);
|
check_mangled_stack(name);
|
||||||
|
|
||||||
/* open the directory */
|
/* open the directory */
|
||||||
if (!(cur_dir = OpenDir(snum, path)))
|
if (!(cur_dir = OpenDir(path)))
|
||||||
{
|
{
|
||||||
DEBUG(3,("scan dir didn't open dir [%s]\n",path));
|
DEBUG(3,("scan dir didn't open dir [%s]\n",path));
|
||||||
return(False);
|
return(False);
|
||||||
@ -796,7 +791,7 @@ BOOL check_name(char *name,int cnum)
|
|||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
|
||||||
if( is_vetoed_path(SNUM(cnum), name))
|
if( is_vetoed_path(name))
|
||||||
{
|
{
|
||||||
DEBUG(5,("file path name %s vetoed\n",name));
|
DEBUG(5,("file path name %s vetoed\n",name));
|
||||||
return(0);
|
return(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user