diff options
author | Samba Release Account <samba-bugs@samba.org> | 1997-07-24 17:25:11 +0000 |
---|---|---|
committer | Samba Release Account <samba-bugs@samba.org> | 1997-07-24 17:25:11 +0000 |
commit | 15ae50ca5203bc4c04567e400ba041a4d1757b2b (patch) | |
tree | ed7d0fcf569f9a793db2d37dd8b40b55d2c845d7 /source3/include | |
parent | 7020afbd03402f68113dfd60ec078b2a68b5be6f (diff) | |
download | samba-15ae50ca5203bc4c04567e400ba041a4d1757b2b.tar.gz samba-15ae50ca5203bc4c04567e400ba041a4d1757b2b.tar.bz2 samba-15ae50ca5203bc4c04567e400ba041a4d1757b2b.zip |
Makefile: Added UNIXWARE 2.x with shadow passwords from fja@extratech.com
client.c: Made prompt appear at debug level 0. Fixed strcasecmp redefinition.
Caused client to use set_blocking rather than making fcntl calls itself.
dir.c: Removed redundent snum parameters.
includes.h: Added SCO fixes.
loadparm.c: Made default 'files to hide' a null string.
nmbd.c: Removed O_NONBLOCK from pid file open for platforms that dont have it.
proto.h: Changed snum to cnum where needed. Changed is_xx_path to is_in_path
(now called via MACRO).
quotas.c: Swapped setuid/seteuid calls when restoring uid.
reply.c: Removed redundent snum parameters.
server.c: Changed snum to cnum where needed. Setup new veto_list, hide_list
namelists. Added standard_sub changes from
Stefaan A Eeckels <Stefaan.Eeckels@ecc.lu> and
Paul Rippin <pr3245@nopc.eurostat.cec.be>
shmem.c: Changed cast for sizeof to be int before negating.
smb.h: Added new veto_list, hide_list entries to connections.
Added IS_PRINT, IS_HIDDEN_PATH, IS_VETO_PATH macros.
trans2.c: Removed redundent snum parameters.
util.c: Added standard_sub_basic changes from
Stefaan A Eeckels <Stefaan.Eeckels@ecc.lu> and
Paul Rippin <pr3245@nopc.eurostat.cec.be>
Fixed up veto/hidden path processing so the paths are
pres-parsed and checked for wildcards (for speed).
Jeremy (jallison@whistle.com)
(This used to be commit 9afa36f7874cfd527aa6ef1e7965c1d35d46ab1f)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/includes.h | 25 | ||||
-rw-r--r-- | source3/include/proto.h | 15 | ||||
-rw-r--r-- | source3/include/smb.h | 15 |
3 files changed, 31 insertions, 24 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h index 7dcff54286..35112ff70b 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -666,38 +666,35 @@ char *mktemp(char *); /* No standard include */ #include <locale.h> #ifdef EVEREST #include <unistd.h> -#endif +#endif /* EVEREST */ #ifdef NETGROUP #include <rpcsvc/ypclnt.h> -#endif +#endif /* NETGROUP */ #ifdef SecureWare #include <sys/security.h> #include <sys/audit.h> #include <prot.h> #define crypt bigcrypt -#endif -#ifndef EVEREST - #define ftruncate(f,l) syscall(0x0a28,f,l) -#endif +#endif /* SecureWare */ #define SIGNAL_CAST (void (*)(int)) #define USE_WAITPID #define USE_GETCWD #define USE_SETSID #ifdef SCO3_2_2 -#define NO_EID -#else +#define setuid(u) setreuid(u,-1) +#define seteuid(u) setreuid(-1,u) +#else /* SCO3_2_2 */ #ifndef EVEREST +#define ftruncate(f,l) syscall(0x0a28,f,l) #define USE_IFREQ -#endif -#endif +#define NO_INITGROUPS +#endif /* EVEREST */ +#endif /* SCO3_2_2 */ #define STATFS4 #define NO_FSYNC -#ifndef EVEREST -#define NO_INITGROUPS -#endif #define HAVE_PATHCONF #define NO_GETRLIMIT -#endif +#endif /* SCO */ diff --git a/source3/include/proto.h b/source3/include/proto.h index e9994214fb..6d248e2333 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -74,13 +74,13 @@ void dptr_closecnum(int cnum); void dptr_idlecnum(int cnum); void dptr_closepath(char *path,int pid); int dptr_create(int cnum,char *path, BOOL expect_close,int pid); -BOOL dptr_fill(int snum, char *buf1,unsigned int key); +BOOL dptr_fill(char *buf1,unsigned int key); BOOL dptr_zero(char *buf); -void *dptr_fetch(int snum, char *buf,int *num); -void *dptr_fetch_lanman2(int snum, char *params,int dptr_num); -BOOL dir_check_ftype(int cnum,int mode,struct stat *st,int dirtype); +void *dptr_fetch(char *buf,int *num); +void *dptr_fetch_lanman2(char *params,int dptr_num); +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); -void *OpenDir(int snum, char *name, BOOL use_veto); +void *OpenDir(int cnum, char *name, BOOL use_veto); void CloseDir(void *p); char *ReadDirName(void *p); BOOL SeekDir(void *p,int pos); @@ -954,8 +954,9 @@ char *gidtoname(int gid); void BlockSignals(BOOL block,int signum); void ajt_panic(void); char *readdirname(void *p); -BOOL is_hidden_path(int snum, char *name); -BOOL is_vetoed_name(int snum, char *name); +BOOL is_in_path(char *name, name_compare_entry *namelist); +void set_namearray(name_compare_entry **ppname_array, char *namelist); +void free_namearray(name_compare_entry *name_array); BOOL fcntl_lock(int fd,int op,uint32 offset,uint32 count,int type); int file_lock(char *name,int timeout); void file_unlock(int fd); diff --git a/source3/include/smb.h b/source3/include/smb.h index 1d53942fa7..c7ff549fe5 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -339,6 +339,12 @@ struct uid_cache { typedef struct { + char *name; + BOOL is_wild; +} name_compare_entry; + +typedef struct +{ int service; BOOL force_user; struct uid_cache uid_cache; @@ -363,6 +369,8 @@ typedef struct time_t lastused; BOOL used; int num_files_open; + name_compare_entry *hide_list; /* Per-share list of files to return as hidden. */ + name_compare_entry *veto_list; /* Per-share list of files to veto (never show). */ } connection_struct; @@ -483,6 +491,7 @@ struct connect_record #define VALID_CNUM(cnum) (((cnum) >= 0) && ((cnum) < MAX_CONNECTIONS)) #define OPEN_CNUM(cnum) (VALID_CNUM(cnum) && Connections[cnum].open) #define IS_IPC(cnum) (VALID_CNUM(cnum) && Connections[cnum].ipc) +#define IS_PRINT(cnum) (VALID_CNUM(cnum) && Connections[cnum].printer) #define FNUM_OK(fnum,c) (OPEN_FNUM(fnum) && (c)==Files[fnum].cnum) #define CHECK_FNUM(fnum,c) if (!FNUM_OK(fnum,c)) \ @@ -512,6 +521,9 @@ struct connect_record #define MAP_HIDDEN(cnum) (OPEN_CNUM(cnum) && lp_map_hidden(SNUM(cnum))) #define MAP_SYSTEM(cnum) (OPEN_CNUM(cnum) && lp_map_system(SNUM(cnum))) #define MAP_ARCHIVE(cnum) (OPEN_CNUM(cnum) && lp_map_archive(SNUM(cnum))) +#define IS_HIDDEN_PATH(cnum,path) (is_in_path((path),Connections[(cnum)].hide_list)) +#define IS_VETO_PATH(cnum,path) (is_in_path((path),Connections[(cnum)].veto_list)) + #ifdef SMB_PASSWD #define SMBENCRYPT() (lp_encrypted_passwords()) #else @@ -916,7 +928,4 @@ enum case_handling {CASE_LOWER,CASE_UPPER}; /* Size of buffer to use when moving files across filesystems. */ #define COPYBUF_SIZE (8*1024) -/* service-based parameter - files are not visible, but are accessible */ -#define DEFAULT_FILES_TO_HIDE ".*" - /* _SMB_H */ |