diff options
author | Jeremy Allison <jra@samba.org> | 1998-09-28 21:43:48 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-09-28 21:43:48 +0000 |
commit | cf3a9741dc7427efb97eff09a3c197a906ce6767 (patch) | |
tree | a5ca09216db91089dd5c2be34751733c4dbff2be /source3/smbd | |
parent | cdaa53e3ef7e9bbb7dedaa82d54f730085b9250c (diff) | |
download | samba-cf3a9741dc7427efb97eff09a3c197a906ce6767.tar.gz samba-cf3a9741dc7427efb97eff09a3c197a906ce6767.tar.bz2 samba-cf3a9741dc7427efb97eff09a3c197a906ce6767.zip |
Changes to test in configure if capabilities are enabled on a system.
Changes to get Samba to compile cleanly with the IRIX compiler
with the options : -fullwarn -woff 1209,1174 (the -woff options
are to turn off warnings about unused function parameters and
controlling loop expressions being constants).
Split prototype generation as we hit a limit in IRIX nawk.
Removed "." code in smbd/filename.c (yet again :-).
Jeremy.
(This used to be commit e0567433bd72aec17bf5a54cc292701095d25f09)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/dir.c | 3 | ||||
-rw-r--r-- | source3/smbd/filename.c | 24 | ||||
-rw-r--r-- | source3/smbd/oplock.c | 4 | ||||
-rw-r--r-- | source3/smbd/password.c | 2 |
4 files changed, 14 insertions, 19 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 73db295548..03864334eb 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -428,7 +428,6 @@ BOOL get_dir_entry(connection_struct *conn,char *mask,int dirtype,char *fname, pstring pathreal; BOOL isrootdir; pstring filename; - BOOL matched; BOOL needslash; *path = *pathreal = *filename = 0; @@ -453,8 +452,6 @@ BOOL get_dir_entry(connection_struct *conn,char *mask,int dirtype,char *fname, if (dname == NULL) return(False); - matched = False; - pstrcpy(filename,dname); if ((strcmp(filename,mask) == 0) || diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 7cbb3392cb..ff4d682747 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -332,7 +332,7 @@ BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component, BOOL *bad_path, SMB_STRUCT_STAT *pst) { SMB_STRUCT_STAT st; - char *start, *end, *orig_start; + char *start, *end; pstring dirpath; pstring orig_path; int saved_errno; @@ -367,17 +367,6 @@ BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component, trim_string(name,"/","/"); /* - * If we trimmed down to a single '\0' character - * then we should use the "." directory to avoid - * searching the cache. - */ - - if(!*name) { - name[0] = '.'; - name[1] = '\0'; - } - - /* * Ensure saved_last_component is valid even if file exists. */ @@ -413,6 +402,15 @@ BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component, return(True); } + /* + * If we trimmed down to a single '\0' character + * then we will be using the "." directory. + * As we know this is valid we can return true here. + */ + + if(!*name) + return(True); + start = name; while (strncmp(start,"./",2) == 0) start += 2; @@ -479,7 +477,7 @@ BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component, * as is first, then trying to scan the directory for matching names. */ - for (orig_start = start; start ; start = (end?end+1:(char *)NULL)) { + for (; start ; start = (end?end+1:(char *)NULL)) { /* * Pinpoint the end of this section of the filename. */ diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index 27d802c151..d5c06312f5 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -420,8 +420,8 @@ should be %d).\n", msg_len, OPLOCK_BREAK_MSG_LEN)); dev = IVAL(msg_start,OPLOCK_BREAK_DEV_OFFSET); - tval.tv_sec = IVAL(msg_start, OPLOCK_BREAK_SEC_OFFSET); - tval.tv_usec = IVAL(msg_start, OPLOCK_BREAK_USEC_OFFSET); + tval.tv_sec = (time_t)IVAL(msg_start, OPLOCK_BREAK_SEC_OFFSET); + tval.tv_usec = (long)IVAL(msg_start, OPLOCK_BREAK_USEC_OFFSET); ptval = &tval; diff --git a/source3/smbd/password.c b/source3/smbd/password.c index 75934ec294..f542dbe608 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -75,7 +75,7 @@ void generate_next_challenge(char *challenge) /******************************************************************* set the last challenge sent, usually from a password server ********************************************************************/ -BOOL set_challenge(char *challenge) +BOOL set_challenge(unsigned char *challenge) { memcpy(saved_challenge,challenge,8); challenge_sent = True; |