diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/reply.c | 10 | ||||
-rw-r--r-- | source3/smbd/server.c | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index fa641931eb..2a3679553c 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -252,7 +252,7 @@ int reply_tcon_and_X(char *inbuf,char *outbuf,int length,int bufsize) if ((SVAL(inbuf,smb_vwv2) & 0x1) != 0) close_cnum(SVAL(inbuf,smb_tid),vuid); - if (passlen > MAX_PASSWORD_LENGTH) { + if (passlen > MAX_PASS_LEN) { overflow_attack(passlen); } @@ -388,7 +388,7 @@ int reply_sesssetup_and_X(char *inbuf,char *outbuf,int length,int bufsize) if (Protocol < PROTOCOL_NT1) { smb_apasslen = SVAL(inbuf,smb_vwv7); - if (smb_apasslen > MAX_PASSWORD_LENGTH) + if (smb_apasslen > MAX_PASS_LEN) { overflow_attack(smb_apasslen); } @@ -423,12 +423,12 @@ int reply_sesssetup_and_X(char *inbuf,char *outbuf,int length,int bufsize) if (passlen1 != 24 && passlen2 != 24) doencrypt = False; - if (passlen1 > MAX_PASSWORD_LENGTH) { + if (passlen1 > MAX_PASS_LEN) { overflow_attack(passlen1); } - passlen1 = MIN(passlen1, MAX_PASSWORD_LENGTH); - passlen2 = MIN(passlen2, MAX_PASSWORD_LENGTH); + passlen1 = MIN(passlen1, MAX_PASS_LEN); + passlen2 = MIN(passlen2, MAX_PASS_LEN); if(doencrypt) { /* Save the lanman2 password and the NT md4 password. */ diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 2b906a7641..e4d433c06f 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -214,10 +214,12 @@ int dos_mode(int cnum,char *path,struct stat *sbuf) if (S_ISDIR(sbuf->st_mode)) result = aDIR | (result & aRONLY); +#ifdef S_ISLNK #if LINKS_READ_ONLY if (S_ISLNK(sbuf->st_mode) && S_ISDIR(sbuf->st_mode)) result |= aRONLY; #endif +#endif /* hide files with a name starting with a . */ if (lp_hide_dot_files(SNUM(cnum))) @@ -863,6 +865,7 @@ BOOL check_name(char *name,int cnum) /* Patch from David Clerc <David.Clerc@cui.unige.ch> University of Geneva */ +#ifdef S_ISLNK if (!lp_symlinks(SNUM(cnum))) { struct stat statbuf; @@ -873,6 +876,7 @@ BOOL check_name(char *name,int cnum) ret=0; } } +#endif if (!ret) DEBUG(5,("check_name on %s failed\n",name)); |