Re: Thanks for fixing oplock.c for Linux 2.0 in 2_2 CVS

2002-06-01 Thread Jeremy Allison

On Fri, May 31, 2002 at 05:50:58PM -0700, Matt Seitz wrote:
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 The only thing would be to completely disallow
 connection timeouts for Win9x clients - I'm not sure
 this is what we want.
 
 Perhaps timeouts could be prevented for a 9x client when an oplock is
 present?  Or have two timeouts:  a shorter (soft) timeout when an oplock is
 not present and a longer (hard) timeout even when an oplock is present?

No, you can't time out at all. Remeber, as soon as you
time out and drop the connection (TCP RST or FIN) you're
dead - the client will exhibit this bug.

There is no way around this with different timeouts, it's
very simple - drop a connection to a Win9x client, suffer
an oplock break bug in the client. No other way around this
client bug.

Jeremy.




help

2002-06-01 Thread momo456




hello i search a wins hook script for 
samba
could you send me an examples of this 
file
thank you


Samba 2.2.4 with TNG-Domain Controller: Groups not working - help urgentlyrequired!

2002-06-01 Thread martin.hechenberger

Hi,

When I join a 2.2.4 fileserver to a TNG domain controller, everything 
seems to work fine. Winbind gives me users and domain groups, files are 
accessible, etc.

But when I trie to modify acls for a folder/file (via security-tab), i get 
domain searchlist, but when i add a domain group, windows tells me that 
there would be no name to display ... (sorry, originally german error 
message).

 rpcclient -S 2.2.4-box -U % -c 'lookupname DOMAIN\group' from TNG gives

cmd_lsa_lookup_names: FAILED: NT_STATUS_NONE_MAPPED.

compiled --with-acls --with-quotas --with-winbind

Directly on a Windows box all groups can be added to acls correctly.

Filesystem is xfs. Kernel 2.4.18. 

Thank you in advance

Martin

_

MPREIS Warenvertriebs GmbH
Martin Hechenberger, EDV-Entwicklung
Landesstrasse 16, A-6176 Völs
Tel.: +43(512) 300 808
Fax.: +43(512) 3131 808
EMail :   [EMAIL PROTECTED]
Web:www.mpreis.at
_




VFS problem

2002-06-01 Thread Jim Myers

I'm trying to write a VFS module that uses the conn-vfs_private problem.
It appears this field is never referenced in existing Samba code and is NOT
initialized in vfs.c:vfs_init_custom.

It appears to me that this function needs the following line added:
  conn-vfs_private = NULL;

However there is a further design problem. There is no way for a custom VFS
to properly initialize and cleanup as there is no first-time call that
allows access to the conn structure, nor is there a cleanup call to free
any memory pointed to by vfs_private.

I would think it would be could to add the conn structure as a parameter to
the custom VFS init function: vfs_init and and a new cleanup call as well
so the associated memory could be freed.

Jim Myers
IBM Almaden Research Center
B3-239, 408-927-2013





[PATCH] Clean up samba-2.2 for POSIX-96

2002-06-01 Thread Paul_GreenVOS

At Jeremy's request, here is a version of the POSIX-96 cleanup
patches for the Samba 2.2 branch.

This is exactly the same set of source files and changes as I
submitted yesterday for the 3.0 branch.  The only differences
are due to slight differences in the files between 2.2 and 3.0.

Patch is against 2.2.4.

Tested by successfully rebuilding all of 2.2.4 here on Stratus
VOS.

### START OF PATCH ###

diff -urp oldsamba/source/configure.in newsamba/source/configure.in
--- oldsamba/source/configure.inSat Jun  1 07:56:36 2002
+++ newsamba/source/configure.inSat Jun  1 07:56:50 2002
@@ -422,8 +422,9 @@ AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS(arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h)
 AC_CHECK_HEADERS(unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h)
 AC_CHECK_HEADERS(compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h)
+AC_CHECK_HEADERS(stdlib.h string.h strings.h syslog.h sys/file.h)
 AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h 
sys/mode.h)
-AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h 
stdlib.h sys/socket.h)
+AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h sys/socket.h)
 AC_CHECK_HEADERS(syslog.h sys/syslog.h sys/mount.h sys/vfs.h sys/fs/s5param.h 
sys/filsys.h termios.h termio.h)
 AC_CHECK_HEADERS(sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h 
sys/sockio.h)
 AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h dlfcn.h synch.h 
pthread.h nsswitch.h)
diff -urp oldsamba/source/include/includes.h newsamba/source/include/includes.h
--- oldsamba/source/include/includes.h  Sat Jun  1 07:47:53 2002
+++ newsamba/source/include/includes.h  Sat Jun  1 07:58:05 2002
@@ -205,10 +205,14 @@
 #include netinet/in.h
 #include arpa/inet.h
 #include netdb.h
+
 #ifdef HAVE_SYSLOG_H
 #include syslog.h
 #endif
+
+#ifdef HAVE_SYS_FILE_H
 #include sys/file.h
+#endif
 
 #ifdef HAVE_NETINET_TCP_H
 #include netinet/tcp.h
diff -urp oldsamba/source/lib/interfaces.c newsamba/source/lib/interfaces.c
--- oldsamba/source/lib/interfaces.cSat Jun  1 14:40:17 2002
+++ newsamba/source/lib/interfaces.cSat Jun  1 14:40:52 2002
@@ -45,7 +45,9 @@
 #include net/if.h
 
 #ifndef SIOCGIFCONF
+#ifdef HAVE_SYS_SOCKIO_H
 #include sys/sockio.h
+#endif
 #endif
 
 #ifdef AUTOCONF_TEST
diff -urp oldsamba/source/lib/util_sock.c newsamba/source/lib/util_sock.c
--- oldsamba/source/lib/util_sock.c Thu May 23 15:54:34 2002
+++ newsamba/source/lib/util_sock.c Thu May 23 15:57:12 2002
@@ -931,7 +931,7 @@ static BOOL matchname(char *remotehost,s

/* Look up the host address in the address list we just got. */
for (i = 0; hp-h_addr_list[i]; i++) {
-   if (memcmp(hp-h_addr_list[i], (caddr_t)  addr, sizeof(addr)) == 0)
+   if (memcmp(hp-h_addr_list[i], (void *)  addr, sizeof(addr)) == 0)
return True;
}

diff -urp oldsamba/source/libsmb/clifile.c newsamba/source/libsmb/clifile.c
--- oldsamba/source/libsmb/clifile.cThu May 23 15:54:46 2002
+++ newsamba/source/libsmb/clifile.cThu May 23 15:57:27 2002
@@ -77,7 +77,7 @@ static BOOL cli_link_internal(struct cli
 
 uint32  unix_perms_to_wire(mode_t perms)
 {
-uint ret = 0;
+uint32 ret = 0;
 
 ret |= ((perms  S_IXOTH) ?  UNIX_X_OTH : 0);
 ret |= ((perms  S_IWOTH) ?  UNIX_W_OTH : 0);
@@ -95,7 +95,7 @@ uint32  unix_perms_to_wire(mode_t perms)
 ret |= ((perms  S_ISGID) ?  UNIX_SET_GID : 0);
 #endif
 #ifdef S_ISUID
-ret |= ((perms  S_ISVTX) ?  UNIX_SET_UID : 0);
+ret |= ((perms  S_ISUID) ?  UNIX_SET_UID : 0);
 #endif
 return ret;
 }
diff -urp oldsamba/source/nsswitch/winbind_nss_config.h 
newsamba/source/nsswitch/winbind_nss_config.h
--- oldsamba/source/nsswitch/winbind_nss_config.h   Thu May 23 15:55:08 2002
+++ newsamba/source/nsswitch/winbind_nss_config.h   Thu May 23 15:58:17 2002
@@ -38,6 +38,10 @@
 #include unistd.h
 #endif
 
+#ifdef HAVE_SYS_SELECT_H
+#include sys/select.h
+#endif
+
 #ifdef HAVE_SYS_SOCKET_H
 #include sys/socket.h
 #endif
diff -urp oldsamba/source/pam_smbpass/general.h newsamba/source/pam_smbpass/general.h
--- oldsamba/source/pam_smbpass/general.h   Sat Jun  1 09:02:05 2002
+++ newsamba/source/pam_smbpass/general.h   Sat Jun  1 09:03:00 2002
@@ -11,11 +11,14 @@
 
 #include stdio.h
 #include stdlib.h
-#include syslog.h
 #include unistd.h
 #include sys/types.h
 #include sys/stat.h
 #include sys/wait.h
+
+#ifdef HAVE_SYSLOG_H
+#include syslog.h
+#endif
 
 /*
  * here is the string to inform the user that the new passwords they
diff -urp oldsamba/source/rpc_server/srv_spoolss_nt.c 
newsamba/source/rpc_server/srv_spoolss_nt.c
--- oldsamba/source/rpc_server/srv_spoolss_nt.c Thu May 23 15:55:38 2002
+++ newsamba/source/rpc_server/srv_spoolss_nt.c Thu May 23 15:59:14 2002
@@ -7886,7 +7886,7 @@ static WERROR getprintprocessordirectory