summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1997-08-13 20:16:32 +0000
committerSamba Release Account <samba-bugs@samba.org>1997-08-13 20:16:32 +0000
commit1dc37c83506a434840a04c49e423cd9d2223fab4 (patch)
treedc01e6d497fc2963f4c8b5bb7e4de17b722b1f19
parent927d1875f0c09fe7b2e1c1bc4b1af2c0b8de0f7c (diff)
downloadsamba-1dc37c83506a434840a04c49e423cd9d2223fab4.tar.gz
samba-1dc37c83506a434840a04c49e423cd9d2223fab4.tar.xz
samba-1dc37c83506a434840a04c49e423cd9d2223fab4.zip
includes.h: Fixed S_IFLNK for old DEC ultrix.
ipc.c: Finally :-) fixed responses to NetServerEnum2 when SV_TYPE_ALL given. Jeremy (jallison@whistle.com)
-rw-r--r--source/include/includes.h4
-rw-r--r--source/smbd/ipc.c10
2 files changed, 12 insertions, 2 deletions
diff --git a/source/include/includes.h b/source/include/includes.h
index 35112ff70bb..03c2d461e6a 100644
--- a/source/include/includes.h
+++ b/source/include/includes.h
@@ -1105,6 +1105,10 @@ extern char *sys_errlist[];
#define S_ISDIR(x) ((S_IFDIR & x)!=0)
#endif
+#if !defined(S_ISLNK) && defined(S_IFLNK)
+#define S_ISLNK(x) ((S_IFLNK & x)!=0)
+#endif
+
#ifdef UFC_CRYPT
#define crypt ufc_crypt
#endif
diff --git a/source/smbd/ipc.c b/source/smbd/ipc.c
index 89dd9f511ba..d6d2f289aa4 100644
--- a/source/smbd/ipc.c
+++ b/source/smbd/ipc.c
@@ -982,11 +982,17 @@ static BOOL api_RNetServerEnum(int cnum, uint16 vuid, char *param, char *data,
int i,missed;
fstring domain;
BOOL domain_request;
- BOOL local_request = servertype & SV_TYPE_LOCAL_LIST_ONLY;
+ BOOL local_request;
- if (servertype == SV_TYPE_ALL) servertype &= ~SV_TYPE_DOMAIN_ENUM;
+ /* If someone sets all the bits they don't really mean to set
+ DOMAIN_ENUM and LOCAL_LIST_ONLY, they just want all the
+ known servers. */
+
+ if (servertype == SV_TYPE_ALL)
+ servertype &= ~(SV_TYPE_DOMAIN_ENUM|SV_TYPE_LOCAL_LIST_ONLY);
domain_request = ((servertype & SV_TYPE_DOMAIN_ENUM) != 0);
+ local_request = ((servertype & SV_TYPE_LOCAL_LIST_ONLY) != 0);
p += 8;