summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-03-16 18:31:09 +0000
committerJeremy Allison <jra@samba.org>1998-03-16 18:31:09 +0000
commit39372d9e20803d32c0c5b87226a72b007978baad (patch)
treee798a11c8aaea618e29b0c05f76e631f8492eda0
parent7bccd2c360a270df227c140aeecb943d8d187855 (diff)
downloadsamba-39372d9e20803d32c0c5b87226a72b007978baad.tar.gz
samba-39372d9e20803d32c0c5b87226a72b007978baad.tar.xz
samba-39372d9e20803d32c0c5b87226a72b007978baad.zip
includes.h: Addition of NetBSD 1.3 fix, fix for HPUX 9.x, 10.x zombie
problem. password.c: Fix for Thursby to stop Dave clients failing in share mode security (this was their bug - they were interpreting the uid field in share mode which is explicitly denied by the spec but it's easier for us to fix it than them :-). Jeremy.
-rw-r--r--source/include/includes.h17
-rw-r--r--source/smbd/password.c4
2 files changed, 16 insertions, 5 deletions
diff --git a/source/include/includes.h b/source/include/includes.h
index 94bf23cef5d..c9a515af9ac 100644
--- a/source/include/includes.h
+++ b/source/include/includes.h
@@ -492,16 +492,22 @@ char *mktemp(char *); /* No standard include */
#endif
-#ifdef NETBSD
-#include <strings.h>
+#ifdef NETBSD
+#ifdef NetBSD1_3
+#include <string.h>
+#ifdef ALLOW_CHANGE_PASSWORD
+#include <termios.h>
+#endif /* ALLOW_CHANGE_PASSWORD */
+#else /* NetBSD1_3 */
+#include <strings.h>
+#endif /* NetBSD1_3 */
#include <netinet/tcp.h>
/* you may not need this */
-#define NO_GETSPNAM
+#define NO_GETSPNAM
#define SIGNAL_CAST (void (*)())
#define USE_DIRECT
#define REPLACE_INNETGR
-#endif
-
+#endif
#ifdef FreeBSD
@@ -598,6 +604,7 @@ char *mktemp(char *); /* No standard include */
/* Ken Weiss <krweiss@ucdavis.edu> tells us that SIGCLD_IGNORE is
not good for HPUX */
/* #define SIGCLD_IGNORE */
+#define USE_SIGPROCMASK /* Needed to stop zombie processes on HPUX 9.x and 10.x.*/
#endif /* HPUX */
diff --git a/source/smbd/password.c b/source/smbd/password.c
index 212d931e877..c0e89100eab 100644
--- a/source/smbd/password.c
+++ b/source/smbd/password.c
@@ -243,6 +243,10 @@ uint16 register_vuid(int uid,int gid, char *name,BOOL guest)
user_struct *vuser;
struct passwd *pwfile; /* for getting real name from passwd file */
+ /* Ensure no vuid gets registered in share level security. */
+ if(lp_security() == SEC_SHARE)
+ return UID_FIELD_INVALID;
+
#if 0
/*
* After observing MS-Exchange services writing to a Samba share