diff options
author | Andrew Tridgell <tridge@samba.org> | 1997-10-09 06:36:04 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1997-10-09 06:36:04 +0000 |
commit | e5494e2c093fecd4b493ab925f7c7d30b79bc98d (patch) | |
tree | 55dff2810371497a1ac87002ac5cf6ac498c64b0 /source3/smbd | |
parent | 1cb2d37d5dff87c73de31aea6a2f4fe2a66b7d39 (diff) | |
download | samba-e5494e2c093fecd4b493ab925f7c7d30b79bc98d.tar.gz samba-e5494e2c093fecd4b493ab925f7c7d30b79bc98d.tar.bz2 samba-e5494e2c093fecd4b493ab925f7c7d30b79bc98d.zip |
bracket some macros
change MAX_PASSWORD_LENGTH to MAX_PASS_LEN to prevent conflict on some
systems
add #ifdef around soft link dependent code (for systems that don't
have soft links)
(This used to be commit e10ba4b97a219e87b62d32834bf15ed2e323ed2e)
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)); |