]> git.pld-linux.org Git - packages/samba.git/commitdiff
This commit was manufactured by cvs2git to create branch
authorcvs2git <feedback@pld-linux.org>
Wed, 26 Nov 2003 15:14:34 +0000 (15:14 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
'unlabeled-1.164.2'.

Sprout from master 2003-11-26 15:14:34 UTC Arkadiusz Miƛkiewicz <arekm@maven.pl> '- merged version from SAMBA_3'
Delete:
    samba-2.2.8a+IPv6-20030712.diff
    samba-CIFS-extensions.patch
    samba-DESTDIR-fix.patch
    samba-DESTDIR.patch
    samba-allow-suid.patch
    samba-autoconf.patch
    samba-cap.patch
    samba-config.patch
    samba-debug-0-suxorz.patch
    samba-manpages_PLD_fixes.patch
    samba-nmbd_socket.patch
    samba-nocups.patch
    samba-pam_smbpass.patch
    samba-quota.patch
    samba-smbadduser.patch
    samba-smbprint.patch
    samba-srv_spoolss_nt.patch
    samba-statfs-workaround.patch
    samba-vfs.patch
    samba.logrotate
    samba.pamd
    samba.sysconfig
    samba3-smbtorture.patch
    smb.conf
    smb.init
    swat.inetd

26 files changed:
samba-2.2.8a+IPv6-20030712.diff [deleted file]
samba-CIFS-extensions.patch [deleted file]
samba-DESTDIR-fix.patch [deleted file]
samba-DESTDIR.patch [deleted file]
samba-allow-suid.patch [deleted file]
samba-autoconf.patch [deleted file]
samba-cap.patch [deleted file]
samba-config.patch [deleted file]
samba-debug-0-suxorz.patch [deleted file]
samba-manpages_PLD_fixes.patch [deleted file]
samba-nmbd_socket.patch [deleted file]
samba-nocups.patch [deleted file]
samba-pam_smbpass.patch [deleted file]
samba-quota.patch [deleted file]
samba-smbadduser.patch [deleted file]
samba-smbprint.patch [deleted file]
samba-srv_spoolss_nt.patch [deleted file]
samba-statfs-workaround.patch [deleted file]
samba-vfs.patch [deleted file]
samba.logrotate [deleted file]
samba.pamd [deleted file]
samba.sysconfig [deleted file]
samba3-smbtorture.patch [deleted file]
smb.conf [deleted file]
smb.init [deleted file]
swat.inetd [deleted file]

diff --git a/samba-2.2.8a+IPv6-20030712.diff b/samba-2.2.8a+IPv6-20030712.diff
deleted file mode 100644 (file)
index 3163d42..0000000
+++ /dev/null
@@ -1,2902 +0,0 @@
-diff -ur samba-2.2.8a/source/acconfig.h samba-2.2.8a+IPv6-20030712/source/acconfig.h
---- samba-2.2.8a/source/acconfig.h     2003-02-28 10:56:06.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/acconfig.h       2003-07-12 22:28:29.000000000 -0400
-@@ -59,6 +59,7 @@
- #undef WITH_SYSLOG
- #undef WITH_PROFILE
- #undef WITH_SSL
-+#undef HAVE_INET6
- #undef WITH_LDAP
- #undef WITH_NISPLUS
- #undef WITH_TDBPWD
-diff -ur samba-2.2.8a/source/client/client.c samba-2.2.8a+IPv6-20030712/source/client/client.c
---- samba-2.2.8a/source/client/client.c        2003-03-14 16:34:47.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/client/client.c  2003-07-12 22:28:29.000000000 -0400
-@@ -30,7 +30,7 @@
- struct cli_state *cli;
- extern BOOL in_client;
- extern BOOL AllowDebugChange;
--static int port = SMB_PORT;
-+static int port = 0;
- pstring cur_dir = "\\";
- pstring cd_path = "";
- static pstring service;
-@@ -80,7 +80,7 @@
- static BOOL recurse = False;
- BOOL lowercase = False;
--struct in_addr dest_ip;
-+char dest_ip[512];
- #define SEPARATORS " \t\n\r"
-@@ -2153,8 +2153,8 @@
-       struct cli_state *c;
-       struct nmb_name called, calling;
-       const char *server_n;
--      struct in_addr ip;
-       fstring servicename;
-+      struct sockaddr_list *salist;
-       char *sharename;
-       
-       /* make a copy so we don't modify the global string 'service' */
-@@ -2170,21 +2170,18 @@
-       server_n = server;
-       
--      zero_ip(&ip);
--
-       make_nmb_name(&calling, global_myname, 0x0);
-       make_nmb_name(&called , server, name_type);
-  again:
--      zero_ip(&ip);
--      if (have_ip) ip = dest_ip;
--
--      /* have to open a new connection */
--      if (!(c=cli_initialise(NULL)) || (cli_set_port(c, port) == 0) ||
--          !cli_connect(c, server_n, &ip)) {
--              DEBUG(0,("Connection to %s failed\n", server_n));
--              return NULL;
--      }
-+      salist = resolve_name_smb(have_ip ? dest_ip : server_n, port);
-+  
-+      /* have to open a new connection */
-+      if (!(c=cli_initialise(NULL)) || !cli_connect(c, server_n, salist)) {
-+              DEBUG(0,("Connection to %s failed\n", server_n));
-+              free_sockaddr_list(salist);
-+              return NULL;
-+      }
-       c->protocol = max_protocol;
-       if (timeout_msec)
-@@ -2429,29 +2426,19 @@
- static int do_message_op(void)
- {
--      struct in_addr ip;
-       struct nmb_name called, calling;
--
--      zero_ip(&ip);
-+      struct sockaddr_list *salist;
-       make_nmb_name(&calling, global_myname, 0x0);
-       make_nmb_name(&called , desthost, name_type);
--      zero_ip(&ip);
--      if (have_ip)
--              ip = dest_ip;
--      else if (name_type != 0x20) {
--              /* We must do our own resolve name here as the nametype is #0x3, not #0x20. */
--              if (!resolve_name(desthost, &ip, name_type)) {
--                      DEBUG(0,("Cannot resolve name %s#0x%x\n", desthost, name_type));
--                      return 1;
--              }
--      }
--
--      if (!(cli=cli_initialise(NULL)) || (cli_set_port(cli, port) == 0) || !cli_connect(cli, desthost, &ip)) {
--              DEBUG(0,("Connection to %s failed\n", desthost));
--              return 1;
--      }
-+      salist = resolve_name_smb(have_ip ? dest_ip : desthost, port);
-+  
-+      if (!(cli=cli_initialise(NULL)) || !cli_connect(cli, desthost, salist)) {
-+              DEBUG(0,("Connection to %s failed\n", desthost));
-+              free_sockaddr_list(salist);
-+              return 1;
-+      }
-       if (!cli_session_request(cli, &calling, &called)) {
-               DEBUG(0,("session request failed\n"));
-@@ -2682,9 +2669,7 @@
-                       break;
-               case 'I':
-                       {
--                              dest_ip = *interpret_addr2(optarg);
--                              if (is_zero_ip(dest_ip))
--                                      exit(1);
-+                              strncpy(dest_ip, optarg, sizeof(dest_ip));
-                               have_ip = True;
-                       }
-                       break;
-diff -ur samba-2.2.8a/source/client/smbmount.c samba-2.2.8a+IPv6-20030712/source/client/smbmount.c
---- samba-2.2.8a/source/client/smbmount.c      2002-04-30 09:26:19.000000000 -0400
-+++ samba-2.2.8a+IPv6-20030712/source/client/smbmount.c        2003-07-12 22:28:29.000000000 -0400
-@@ -41,9 +41,9 @@
- static pstring service;
- static pstring options;
--static struct in_addr dest_ip;
-+static char dest_ip[512];
- static BOOL have_ip;
--static int smb_port = 139;
-+static int smb_port = 0;
- static BOOL got_pass;
- static uid_t mount_uid;
- static gid_t mount_gid;
-@@ -116,8 +116,8 @@
- {
-       struct cli_state *c;
-       struct nmb_name called, calling;
-+      struct sockaddr_list *salist;
-       char *server_n;
--      struct in_addr ip;
-       pstring server;
-       char *share;
-@@ -141,16 +141,15 @@
-       make_nmb_name(&called , server, 0x20);
-  again:
--      zero_ip(&ip);
--      if (have_ip) ip = dest_ip;
-+      salist = resolve_name_smb(have_ip ? dest_ip : server_n, smb_port);
-       /* have to open a new connection */
--      if (!(c=cli_initialise(NULL)) || (cli_set_port(c, smb_port) == 0) ||
--          !cli_connect(c, server_n, &ip)) {
--              DEBUG(0,("%d: Connection to %s failed\n", getpid(), server_n));
--              if (c) {
--                      cli_shutdown(c);
--              }
-+      if (!(c=cli_initialise(NULL)) || !cli_connect(c, server_n, salist)) {
-+              DEBUG(0,("%d: Connection to %s failed\n", getpid(), server_n));
-+              free_sockaddr_list(salist);
-+              if (c) {
-+                      cli_shutdown(c);
-+              }
-               return NULL;
-       }
-@@ -744,11 +743,7 @@
-                       } else if(!strcmp(opts, "debug")) {
-                               DEBUGLEVEL = val;
-                       } else if(!strcmp(opts, "ip")) {
--                              dest_ip = *interpret_addr2(opteq+1);
--                              if (is_zero_ip(dest_ip)) {
--                                      fprintf(stderr,"Can't resolve address %s\n", opteq+1);
--                                      exit(1);
--                              }
-+                              strncpy(dest_ip, optarg, sizeof(dest_ip));
-                               have_ip = True;
-                       } else if(!strcmp(opts, "workgroup")) {
-                               pstrcpy(workgroup,opteq+1);
-diff -ur samba-2.2.8a/source/client/smbspool.c samba-2.2.8a+IPv6-20030712/source/client/smbspool.c
---- samba-2.2.8a/source/client/smbspool.c      2003-02-28 10:56:18.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/client/smbspool.c        2003-07-12 22:28:29.000000000 -0400
-@@ -279,7 +279,6 @@
-   struct cli_state    *c;             /* New connection */
-   struct nmb_name     called,         /* NMB name of server */
-                       calling;        /* NMB name of client */
--  struct in_addr      ip;             /* IP address of server */
-   pstring             myname;         /* Client name */
-@@ -289,8 +288,6 @@
-   get_myname(myname);  
--  zero_ip(&ip);
--
-   make_nmb_name(&calling, myname, 0x0);
-   make_nmb_name(&called, server, 0x20);
-@@ -304,14 +301,7 @@
-     return (NULL);
-   }
--  if (!cli_set_port(c, SMB_PORT))
--  {
--    fputs("ERROR: cli_set_port() failed...\n", stderr);
--    cli_shutdown(c);
--    return (NULL);
--  }
--
--  if (!cli_connect(c, server, &ip))
-+  if (!cli_connect(c, server, NULL))
-   {
-     fputs("ERROR: cli_connect() failed...\n", stderr);
-     cli_shutdown(c);
-diff -ur samba-2.2.8a/source/configure.in samba-2.2.8a+IPv6-20030712/source/configure.in
---- samba-2.2.8a/source/configure.in   2003-02-28 10:56:18.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/configure.in     2003-07-12 22:28:29.000000000 -0400
-@@ -2282,6 +2282,53 @@
- )
- #################################################
-+# check for IPv6 support
-+AC_MSG_CHECKING(whether to use IPv6)
-+AC_ARG_WITH(ipv6,
-+[  --with-ipv6             Include IPv6 support (default=no)],
-+[ case "$withval" in
-+  yes)
-+    AC_MSG_RESULT(yes)
-+    AC_DEFINE(HAVE_INET6)
-+
-+    AC_CACHE_CHECK(for struct sockaddr_in6,samba_cv_struct_sockaddr_in6,
-+      AC_TRY_COMPILE(
-+              [#include <sys/types.h>
-+              #include <sys/socket.h>
-+              #include <netinet/in.h>],
-+              [struct sockaddr_in6 sin6;
-+              sin6.sin6_port = 0;],
-+              [samba_cv_struct_sockaddr_in6=yes],
-+              [samba_cv_struct_sockaddr_in6=no]))
-+    if test "$samba_cv_struct_sockaddr_in6" != yes ; then
-+      AC_MSG_ERROR([This system does not have IPv6 support.  Reconfigure without the --with-ipv6 flag.])
-+    fi
-+
-+    AC_CHECK_FUNC(getaddrinfo,,
-+      AC_MSG_ERROR([IPv6 functionality requires getaddrinfo.  Reconfigure without the --with-ipv6 flag.]))
-+
-+    dnl This can't check for member names because we're not sure what they
-+    dnl might be.  Doesn't matter - we only need it defined for sizeof.
-+    AC_CACHE_CHECK(for struct sockaddr_storage,samba_cv_struct_sockaddr_storage,
-+      AC_TRY_COMPILE(
-+              [#include <sys/types.h>
-+              #include <sys/socket.h>
-+              #include <netinet/in.h>],
-+              [struct sockaddr_storage ss;],
-+              [samba_cv_struct_sockaddr_storage=yes],
-+              [samba_cv_struct_sockaddr_storage=no]))
-+    if test "$samba_cv_struct_sockaddr_storage" != yes ; then
-+      AC_MSG_ERROR([IPv6 functionality requires the sockaddr_storage structure.  Reconfigure without the --with-ipv6 flag.])
-+    fi
-+    ;;
-+  *)
-+    AC_MSG_RESULT(no)
-+    ;;
-+  esac],
-+  AC_MSG_RESULT(no)
-+)
-+
-+#################################################
- # check for syslog logging
- AC_MSG_CHECKING(whether to use syslog logging)
- AC_ARG_WITH(syslog,
-diff -ur samba-2.2.8a/source/include/client.h samba-2.2.8a+IPv6-20030712/source/include/client.h
---- samba-2.2.8a/source/include/client.h       2003-03-14 16:34:47.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/include/client.h 2003-07-12 22:28:29.000000000 -0400
-@@ -58,7 +58,7 @@
- };
- struct cli_state {
--      int port;
-+      int default_port;
-       int fd;
-       int smb_rw_error; /* Copy of last read or write error. */
-       uint16 cnum;
-@@ -89,7 +89,8 @@
-       struct nmb_name called;
-       struct nmb_name calling;
-       fstring full_dest_host_name;
--      struct in_addr dest_ip;
-+      struct sockaddr_list *dest_addrs;
-+      struct sockaddr_list *connected_addr;
-       struct pwd_info pwd;
-       unsigned char cryptkey[8];
-diff -ur samba-2.2.8a/source/include/config.h.in samba-2.2.8a+IPv6-20030712/source/include/config.h.in
---- samba-2.2.8a/source/include/config.h.in    2003-02-28 10:56:18.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/include/config.h.in      2003-07-12 22:28:29.000000000 -0400
-@@ -125,6 +125,7 @@
- #undef WITH_SYSLOG
- #undef WITH_PROFILE
- #undef WITH_SSL
-+#undef HAVE_INET6
- #undef WITH_LDAP
- #undef WITH_NISPLUS
- #undef WITH_TDBPWD
-diff -ur samba-2.2.8a/source/include/nameserv.h samba-2.2.8a+IPv6-20030712/source/include/nameserv.h
---- samba-2.2.8a/source/include/nameserv.h     2002-05-18 09:40:11.000000000 -0400
-+++ samba-2.2.8a+IPv6-20030712/source/include/nameserv.h       2003-07-12 22:28:29.000000000 -0400
-@@ -129,6 +129,17 @@
- #define FIND_SELF_NAME  1
- /*
-+ * Linked-list structure for storing resolved IP addresses.
-+ */
-+
-+struct sockaddr_list {
-+      struct sockaddr_list *next;
-+      int pfamily;
-+      int len;
-+      struct sockaddr *addr;
-+};
-+
-+/*
-  * The different name types that can be in namelists.
-  *
-  * SELF_NAME should only be on the broadcast and unicast subnets.
-diff -ur samba-2.2.8a/source/include/proto.h samba-2.2.8a+IPv6-20030712/source/include/proto.h
---- samba-2.2.8a/source/include/proto.h        2003-03-14 16:34:47.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/include/proto.h  2003-07-12 22:28:29.000000000 -0400
-@@ -203,9 +203,10 @@
- BOOL cli_negprot(struct cli_state *cli);
- BOOL cli_session_request(struct cli_state *cli,
-                        struct nmb_name *calling, struct nmb_name *called);
--BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip);
-+BOOL cli_connect(struct cli_state *cli, const char *host,
-+                      struct sockaddr_list *salist);
- BOOL cli_establish_connection(struct cli_state *cli, 
--                              const char *dest_host, struct in_addr *dest_ip,
-+                              char *dest_host, struct sockaddr_list *salist,
-                               struct nmb_name *calling, struct nmb_name *called,
-                               const char *service, const char *service_type,
-                               BOOL do_shutdown, BOOL do_tcon);
-@@ -215,8 +216,8 @@
-                            const char *service, const char *service_type,
-                            const char *user, const char *domain, 
-                            const char *password, int pass_len) ;
--BOOL attempt_netbios_session_request(struct cli_state *cli, const char *srchost, const char *desthost,
--                                     struct in_addr *pdest_ip);
-+BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost,
-+              char *desthost);
- /* The following definitions come from libsmb/cli_dfs.c  */
-@@ -723,12 +724,12 @@
- BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr);
- void endlmhosts(FILE *fp);
- BOOL name_register_wins(const char *name, int name_type);
--BOOL name_resolve_bcast(const char *name, int name_type,
--                      struct in_addr **return_ip_list, int *return_count);
--BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type);
--BOOL resolve_name_2(const char *name, struct in_addr **return_ip, int *count, int name_type);
--BOOL resolve_srv_name(const char* srv_name, fstring dest_host,
--                                struct in_addr *ip);
-+struct sockaddr_list *name_resolve_bcast(const char *name, int name_type);
-+BOOL resolve_name_netbios(const char *name, struct in_addr *return_ip,
-+              int name_type);
-+struct sockaddr_list *resolve_name_smb(const char *name, int port);
-+struct sockaddr_list *resolve_srv_name(const char* srv_name,
-+              fstring dest_host, int port);
- BOOL find_master_ip(char *group, struct in_addr *master_ip);
- BOOL lookup_dc_name(const char *srcname, const char *domain, 
-                   struct in_addr *dc_ip, char *ret_name);
-@@ -1155,8 +1156,21 @@
- void safe_free(void *p);
- BOOL get_myname(char *my_name);
- int interpret_protocol(char *str,int def);
-+BOOL is_ipv4address(const char *str);
- BOOL is_ipaddress(const char *str);
- uint32 interpret_addr(const char *str);
-+struct sockaddr *get_numeric_addr(const char *str);
-+BOOL sa_host_equal(struct sockaddr *a, struct sockaddr *b);
-+int get_sockaddr_port(struct sockaddr *sa);
-+void set_sockaddr_port(struct sockaddr *sa, int port);
-+struct sockaddr_list *set_default_ports(struct sockaddr_list *salist);
-+BOOL is_directsmb(struct sockaddr *sa);
-+char *print_sockaddr(struct sockaddr *sa);
-+void make_sockaddr_in(struct sockaddr *sa, struct in_addr *addr);
-+void free_sockaddr_list(struct sockaddr_list *salist);
-+struct sockaddr_list *make_sin_list(struct in_addr *addr, int count);
-+struct sockaddr_list *make_singlet_list(struct in_addr *addr, int port);
-+struct sockaddr_list *make_sa_list(struct addrinfo *ai);
- struct in_addr *interpret_addr2(const char *str);
- BOOL is_zero_ip(struct in_addr ip);
- void zero_ip(struct in_addr *ip);
-@@ -1311,7 +1325,8 @@
- BOOL send_smb(int fd,char *buffer);
- BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type);
- int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind );
--int open_socket_out(int type, struct in_addr *addr, int port ,int timeout);
-+int open_socket_out(struct sockaddr_list *addrs,
-+              struct sockaddr_list **connected_addr, int timeout);
- void client_setfd(int fd);
- char *client_name(void);
- char *client_addr(void);
-@@ -4507,10 +4522,6 @@
-                 char *inbuf,char *outbuf, int dum_size, 
-                 int dum_buffsize);
--/* The following definitions come from smbd/noquotas.c  */
--
--BOOL disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize);
--
- /* The following definitions come from smbd/notify.c  */
- void remove_pending_change_notify_requests_by_fid(files_struct *fsp);
-@@ -4643,6 +4654,16 @@
- void check_reload(int t);
- void smbd_process(void);
-+/* The following definitions come from smbd/quotas.c  */
-+
-+BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
-+BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
-+BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
-+BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
-+BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
-+BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
-+BOOL disk_quotas_vxfs(const pstring name, char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
-+
- /* The following definitions come from smbd/reply.c  */
- int reply_special(char *inbuf,char *outbuf);
-diff -ur samba-2.2.8a/source/include/smb.h samba-2.2.8a+IPv6-20030712/source/include/smb.h
---- samba-2.2.8a/source/include/smb.h  2003-03-14 16:34:47.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/include/smb.h    2003-07-12 22:28:29.000000000 -0400
-@@ -486,7 +486,8 @@
-       char *user; /* name of user who *opened* this connection */
-       uid_t uid; /* uid of user who *opened* this connection */
-       gid_t gid; /* gid of user who *opened* this connection */
--      char client_address[18]; /* String version of client IP address. */
-+      char client_address[50]; /* String version of client IP address.
-+                                * Nice and long for IPv6 addresses... */
-       uint16 vuid; /* vuid of user who *opened* this connection, or UID_FIELD_INVALID */
-diff -ur samba-2.2.8a/source/lib/access.c samba-2.2.8a+IPv6-20030712/source/lib/access.c
---- samba-2.2.8a/source/lib/access.c   2003-03-14 16:34:47.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/lib/access.c     2003-07-12 22:28:29.000000000 -0400
-@@ -18,7 +18,7 @@
- #define ALLONES  ((uint32)0xFFFFFFFF)
- /* masked_match - match address against netnumber/netmask */
--static int masked_match(char *tok, char *slash, char *s)
-+static BOOL masked_match_ipv4(char *tok, char *slash, char *s)
- {
-       uint32 net;
-       uint32 mask;
-@@ -43,6 +43,54 @@
-       return ((addr & mask) == net);
- }
-+#ifdef HAVE_INET6
-+static BOOL masked_match_ipv6(char *tok, char *slash, char *s)
-+{
-+      struct in6_addr net, addr;
-+      unsigned char *n = (unsigned char *)&net;
-+      unsigned char *a = (unsigned char *)&addr;
-+      int ret, len, i, mask;
-+
-+      if(inet_pton(AF_INET6, s, &addr) <= 0)
-+      {
-+              DEBUG(0,("access: unable to parse remote address: %s\n", s));
-+              return False;
-+      }
-+      *slash = '\0';
-+      ret = inet_pton(AF_INET6, tok, &net);
-+      *slash = '/';
-+      len = atoi(slash + 1);
-+      if(ret <= 0 || len < 0 || len > 128
-+                      || (len == 0 && strcmp(slash + 1, "0")))
-+      {
-+              DEBUG(0,("access: bad net/mask access control: %s\n", tok));
-+              return False;
-+      }
-+      for(i = 0; i < len; i += 8)
-+      {
-+
-+              if( len - i < 8 )
-+                      mask = ~((1 << (8 - (len - i))) - 1);
-+              else
-+                      mask = ~0;
-+              DEBUG(3,("len=%d i=%d mask=%02x *n=%02x *a=%02x *a&mask=%02x\n",
-+                                      len, i, mask, *n, *a, *a & mask));
-+              if(*(n++) != (*(a++) & mask)) return False;
-+      }
-+      return True;
-+}
-+#endif
-+
-+static BOOL masked_match(char *tok, char *slash, char *s)
-+{
-+      if(is_ipv4address(s)) return masked_match_ipv4(tok, slash, s);
-+#ifdef HAVE_INET6
-+      return masked_match_ipv6(tok, slash, s);
-+#else
-+      return False;
-+#endif
-+}
-+
- /* string_match - match string against token */
- static int string_match(char *tok,char *s, char *invalid_char)
- {
-@@ -113,8 +161,13 @@
-       } else if (tok[(tok_len = strlen(tok)) - 1] == '.') {   /* network */
-               if (strncmp(tok, s, tok_len) == 0)
-                       return (True);
-+#ifdef HAVE_INET6
-+      } else if (tok[(tok_len = strlen(tok)) - 1] == ':') { /* IPv6 network */
-+              if (strncasecmp(tok, s, tok_len) == 0)
-+                      return (True);
-+#endif
-       } else if ((cut = strchr(tok, '/')) != 0) {     /* netnumber/netmask */
--              if (isdigit((int)s[0]) && masked_match(tok, cut, s))
-+              if (isxdigit((int)s[0]) && masked_match(tok, cut, s))
-                       return (True);
-       } else if (strchr(tok, '*') != 0) {
-               *invalid_char = '*';
-@@ -208,9 +261,13 @@
-       client[1] = caddr;  
-       /* if it is loopback then always allow unless specifically denied */
-+#ifdef HAVE_INET6
-+      if (strcmp(caddr, "127.0.0.1") == 0 || strcmp(caddr, "::1") == 0) {
-+#else
-       if (strcmp(caddr, "127.0.0.1") == 0) {
-+#endif
-               /*
--               * If 127.0.0.1 matches both allow and deny then allow.
-+               * If 127.0.0.1 or ::1 matches both allow and deny then allow.
-                * Patch from Steve Langasek vorlon@netexpress.net.
-                */
-               if (deny_list && 
-diff -ur samba-2.2.8a/source/lib/util.c samba-2.2.8a+IPv6-20030712/source/lib/util.c
---- samba-2.2.8a/source/lib/util.c     2003-03-14 16:34:47.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/lib/util.c       2003-07-12 22:28:29.000000000 -0400
-@@ -745,11 +745,11 @@
-  Return true if a string could be a pure IP address.
- ****************************************************************************/
--BOOL is_ipaddress(const char *str)
-+BOOL is_ipv4address(const char *str)
- {
-   BOOL pure_address = True;
-   int i;
--  
-+
-   for (i=0; pure_address && str[i]; i++)
-     if (!(isdigit((int)str[i]) || str[i] == '.'))
-       pure_address = False;
-@@ -760,6 +760,26 @@
-   return pure_address;
- }
-+BOOL is_ipaddress(const char *str)
-+{
-+#ifdef HAVE_INET6
-+  /* First we see if the address is an IPv6 address */
-+  if (strchr(str, ':'))
-+  {
-+      int i;
-+
-+      /* It contains a colon; it probably is */
-+      for (i=0; str[i]; i++)
-+              if (!(isxdigit((int)str[i]) || str[i] == '.' || str[i] == ':'))
-+                      return False;
-+
-+      return True;
-+  }
-+#endif
-+
-+  return is_ipv4address(str);
-+}
-+
- /****************************************************************************
- interpret an internet address or name into an IP address in 4 byte form
- ****************************************************************************/
-@@ -794,6 +814,204 @@
-   return(res);
- }
-+struct sockaddr *get_numeric_addr(const char *str)
-+{
-+#ifdef HAVE_INET6
-+      struct sockaddr *sa;
-+      struct addrinfo *ai, hints;
-+
-+      memset(&hints, 0, sizeof(hints));
-+      hints.ai_socktype = SOCK_STREAM;
-+      hints.ai_flags = AI_NUMERICHOST;
-+      if(getaddrinfo(str, NULL, &hints, &ai) || ! ai) return NULL;
-+      sa = (struct sockaddr *)malloc(ai->ai_addrlen);
-+      memcpy(sa, ai->ai_addr, ai->ai_addrlen);
-+      freeaddrinfo(ai);
-+      return sa;
-+#else
-+      struct sockaddr *sa;
-+      struct in_addr addr;
-+
-+      if(inet_aton(str, &addr))
-+      {
-+              sa = (struct sockaddr *)malloc(sizeof(struct sockaddr_in));
-+              make_sockaddr_in(sa, &addr);
-+              return sa;
-+      }
-+      return NULL;
-+#endif
-+}
-+
-+BOOL sa_host_equal(struct sockaddr *a, struct sockaddr *b)
-+{
-+#ifdef HAVE_INET6
-+      if(a->sa_family == AF_INET6 && b->sa_family == AF_INET6)
-+      {
-+              return IN6_ARE_ADDR_EQUAL(
-+                      &((struct sockaddr_in6 *)a)->sin6_addr,
-+                      &((struct sockaddr_in6 *)b)->sin6_addr);
-+      } else
-+#endif
-+      if(a->sa_family == AF_INET && b->sa_family == AF_INET)
-+      {
-+              return ((struct sockaddr_in *)a)->sin_addr.s_addr
-+                      == ((struct sockaddr_in *)b)->sin_addr.s_addr;
-+      }
-+      return False;
-+}
-+
-+int get_sockaddr_port(struct sockaddr *sa)
-+{
-+#ifdef HAVE_INET6
-+      if(sa->sa_family==AF_INET6)
-+              return ntohs(((struct sockaddr_in6 *)sa)->sin6_port);
-+      else
-+#endif
-+      if(sa->sa_family==AF_INET)
-+              return ntohs(((struct sockaddr_in *)sa)->sin_port);
-+      else
-+              return 0;
-+}
-+
-+void set_sockaddr_port(struct sockaddr *sa, int port)
-+{
-+#ifdef HAVE_INET6
-+      if(sa->sa_family==AF_INET6)
-+              ((struct sockaddr_in6 *)sa)->sin6_port = htons(port);
-+      else
-+#endif
-+      if(sa->sa_family==AF_INET)
-+              ((struct sockaddr_in *)sa)->sin_port = htons(port);
-+}
-+
-+struct sockaddr_list *set_default_ports(struct sockaddr_list *salist)
-+{
-+      struct sockaddr_list *cur;
-+
-+      for(cur = salist; cur; cur = cur->next)
-+      {
-+              set_sockaddr_port(cur->addr, 445);
-+              if(cur->addr->sa_family == AF_INET)
-+              {
-+                      struct sockaddr_list *sc;
-+
-+                      sc = (struct sockaddr_list *)
-+                              malloc(sizeof(struct sockaddr_list));
-+                      sc->next = cur->next;
-+                      cur->next = sc;
-+                      sc->pfamily = cur->pfamily;
-+                      sc->len = cur->len;
-+                      sc->addr = (struct sockaddr *)malloc(sc->len);
-+                      memcpy(sc->addr, cur->addr, cur->len);
-+                      set_sockaddr_port(sc->addr, 139);
-+                      cur = sc;
-+              }
-+      }
-+      return salist;
-+}
-+
-+
-+BOOL is_directsmb(struct sockaddr *sa)
-+{
-+      BOOL ret = sa->sa_family != AF_INET
-+              || ((struct sockaddr_in *)sa)->sin_port == htons(445);
-+      DEBUG(4,("connection is%s direct SMB\n", ret ? "" : " not"));
-+      return ret;
-+}
-+
-+char *print_sockaddr(struct sockaddr *sa)
-+{
-+#ifdef HAVE_INET6
-+      static char addr[64];
-+
-+      if(sa->sa_family == AF_INET6)
-+      {
-+              inet_ntop(AF_INET6, &((struct sockaddr_in6 *)sa)->sin6_addr,
-+                              addr, sizeof(addr));
-+              return addr;
-+      } else
-+#endif
-+      if(sa->sa_family == AF_INET)
-+              return inet_ntoa(((struct sockaddr_in *)sa)->sin_addr);
-+      else return NULL;
-+}
-+
-+void make_sockaddr_in(struct sockaddr *sa, struct in_addr *addr)
-+{
-+      memset(sa, 0, sizeof(struct sockaddr_in));
-+      ((struct sockaddr_in *)sa)->sin_family = AF_INET;
-+      ((struct sockaddr_in *)sa)->sin_port = 0;
-+      memcpy(&((struct sockaddr_in *)sa)->sin_addr, addr,
-+                      sizeof(struct in_addr));
-+}
-+
-+void free_sockaddr_list(struct sockaddr_list *salist)
-+{
-+      struct sockaddr_list *next;
-+
-+      while(salist)
-+      {
-+              next = salist->next;
-+              SAFE_FREE(salist->addr);
-+              SAFE_FREE(salist);
-+              salist = next;
-+      }
-+}
-+
-+struct sockaddr_list *make_sin_list(struct in_addr *addr, int count)
-+{
-+      int i;
-+      struct sockaddr_list *top = NULL, *last = NULL, *sc;
-+
-+      for(i = 0; i<count; ++i)
-+      {
-+              sc = (struct sockaddr_list *)
-+                      malloc(sizeof(struct sockaddr_list));
-+              if(i==0) top = sc;
-+              else last->next = sc;
-+              last = sc;
-+              sc->next = NULL;
-+              sc->pfamily = PF_INET;
-+              sc->len = sizeof(struct sockaddr_in);
-+              sc->addr = (struct sockaddr *)
-+                      malloc(sizeof(struct sockaddr_in));
-+              make_sockaddr_in(sc->addr, &addr[i]);
-+      }
-+      return top;
-+}
-+
-+struct sockaddr_list *make_singlet_list(struct in_addr *addr, int port)
-+{
-+      struct sockaddr_list *salist;
-+
-+      salist = make_sin_list(addr, 1);
-+      if(port) set_sockaddr_port(salist->addr, port);
-+      else salist = set_default_ports(salist);
-+      return salist;
-+}
-+
-+#ifdef HAVE_INET6
-+struct sockaddr_list *make_sa_list(struct addrinfo *ai)
-+{
-+      struct sockaddr_list *top = NULL, *last = NULL, *sc;
-+
-+      for(; ai; ai = ai->ai_next)
-+      {
-+              sc = (struct sockaddr_list *)
-+                      malloc(sizeof(struct sockaddr_list));
-+              if(top==NULL) top = sc;
-+              else last->next = sc;
-+              last = sc;
-+              sc->next = NULL;
-+              sc->pfamily = ai->ai_family;
-+              sc->len = ai->ai_addrlen;
-+              sc->addr = (struct sockaddr *)malloc(ai->ai_addrlen);
-+              memcpy(sc->addr, ai->ai_addr, ai->ai_addrlen);
-+      }
-+      return top;
-+}
-+#endif
-+
- /*******************************************************************
-   a convenient addition to interpret_addr()
-   ******************************************************************/
-@@ -1394,7 +1612,7 @@
-               return True;
-       /* maybe its an IP address? */
--      if (is_ipaddress(s))
-+      if (is_ipv4address(s))
-       {
-               struct iface_struct nics[MAX_INTERFACES];
-               int i, n;
-diff -ur samba-2.2.8a/source/lib/util_sock.c samba-2.2.8a+IPv6-20030712/source/lib/util_sock.c
---- samba-2.2.8a/source/lib/util_sock.c        2003-03-14 16:34:47.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/lib/util_sock.c  2003-07-12 22:28:29.000000000 -0400
-@@ -819,67 +819,94 @@
-   create an outgoing socket. timeout is in milliseconds.
-   **************************************************************************/
--int open_socket_out(int type, struct in_addr *addr, int port ,int timeout)
-+int open_socket_out(struct sockaddr_list *addrs,
-+              struct sockaddr_list **connected_addr, int timeout)
- {
--  struct sockaddr_in sock_out;
--  int res,ret;
--  int connect_loop = 250; /* 250 milliseconds */
--  int loops = (timeout) / connect_loop;
--
--  /* create a socket to write to */
--  res = socket(PF_INET, type, 0);
--  if (res == -1) 
--    { DEBUG(0,("socket error\n")); return -1; }
--
--  if (type != SOCK_STREAM) return(res);
--  
--  memset((char *)&sock_out,'\0',sizeof(sock_out));
--  putip((char *)&sock_out.sin_addr,(char *)addr);
--  
--  sock_out.sin_port = htons( port );
--  sock_out.sin_family = PF_INET;
--
--  /* set it non-blocking */
--  set_blocking(res,False);
--
--  DEBUG(3,("Connecting to %s at port %d\n",inet_ntoa(*addr),port));
--  
--  /* and connect it to the destination */
--connect_again:
--  ret = connect(res,(struct sockaddr *)&sock_out,sizeof(sock_out));
--
--  /* Some systems return EAGAIN when they mean EINPROGRESS */
--  if (ret < 0 && (errno == EINPROGRESS || errno == EALREADY ||
--        errno == EAGAIN) && loops--) {
--    msleep(connect_loop);
--    goto connect_again;
--  }
--
--  if (ret < 0 && (errno == EINPROGRESS || errno == EALREADY ||
--         errno == EAGAIN)) {
--      DEBUG(1,("timeout connecting to %s:%d\n",inet_ntoa(*addr),port));
--      close(res);
--      return -1;
--  }
-+      struct sockaddr_list *sl;
-+      int res,ret;
-+      int connect_loop = 250; /* 250 milliseconds */
-+      int loops = (timeout) / connect_loop;
-+
-+      if(connected_addr) *connected_addr = NULL;
-+
-+      for(sl = addrs; sl; sl = sl->next)
-+      {
-+              /* create a socket to write to */
-+              res = socket(sl->pfamily, SOCK_STREAM, 0);
-+              if (res == -1) 
-+              {
-+                      /* If there are more addresses available, then we
-+                       * are probably running on a platform without IPv6
-+                       * support in the kernel, and we just tried
-+                       * connecting to an IPv6 address.  Don't complain
-+                       * until we're out of addresses. */
-+
-+                      if(!sl->next) DEBUG(0,("socket error\n"));
-+                      continue;
-+              }
-+
-+              /* set it non-blocking */
-+              set_blocking(res,False);
-+
-+              DEBUG(3,("Connecting to %s at port %d\n",
-+                      print_sockaddr(sl->addr), get_sockaddr_port(sl->addr)));
-+              
-+              /* and connect it to the destination */
-+      connect_again:
-+              ret = connect(res,sl->addr,sl->len);
-+
-+              /* Some systems return EAGAIN when they mean EINPROGRESS */
-+              if (ret < 0 && (errno == EINPROGRESS || errno == EALREADY ||
-+                                      errno == EAGAIN) && loops--) {
-+                      msleep(connect_loop);
-+                      goto connect_again;
-+              }
-+
-+              if (ret < 0 && (errno == EINPROGRESS || errno == EALREADY ||
-+                                       errno == EAGAIN)) {
-+                      DEBUG(1,("timeout connecting to [%s]:%d\n",
-+                              print_sockaddr(sl->addr),
-+                              get_sockaddr_port(sl->addr)));
-+                      close(res);
-+                      if(sl->next) {
-+                              DEBUG(1,("attempting next address...\n"));
-+                              continue;
-+                      } else return -1;
-+              }
- #ifdef EISCONN
--  if (ret < 0 && errno == EISCONN) {
--    errno = 0;
--    ret = 0;
--  }
-+              if (ret < 0 && errno == EISCONN) {
-+                      errno = 0;
-+                      ret = 0;
-+              }
- #endif
--  if (ret < 0) {
--    DEBUG(2,("error connecting to %s:%d (%s)\n",
--           inet_ntoa(*addr),port,strerror(errno)));
--    close(res);
--    return -1;
--  }
-+              if (ret < 0) {
-+                      /* If we got connection refused or host unreachable,
-+                       * we may be trying to connect to an IPv6 host but
-+                       * this system isn't configured for IPv6.  If we have
-+                       * more addresses, don't complain about this one --
-+                       * just try the next ones. */
-+
-+                      BOOL can_ignore = sl->next &&
-+                              (errno == ECONNREFUSED || errno == ENETUNREACH);
-+                      DEBUG(can_ignore ? 3 : 2,
-+                              ("error connecting to [%s]:%d (%s)\n",
-+                              print_sockaddr(sl->addr),
-+                              get_sockaddr_port(sl->addr),
-+                              strerror(errno)));
-+                      close(res);
-+                      continue;
-+              }
--  /* set it blocking again */
--  set_blocking(res,True);
-+              /* set it blocking again */
-+              set_blocking(res,True);
--  return res;
-+              if(connected_addr) *connected_addr = sl;
-+
-+              return res;
-+      }
-+      return -1;
- }
- /* the following 3 client_*() functions are nasty ways of allowing
-@@ -906,9 +933,63 @@
-  matchname - determine if host name matches IP address. Used to
-  confirm a hostname lookup to prevent spoof attacks
-  ******************************************************************/
--static BOOL matchname(char *remotehost,struct in_addr  addr)
-+#ifdef HAVE_INET6
-+static BOOL addr_equal(struct sockaddr *a, struct sockaddr *b)
- {
-+      if(a->sa_family == AF_INET6 && b->sa_family == AF_INET6)
-+      {
-+              struct sockaddr_in6 *a6 = (struct sockaddr_in6 *)a;
-+              struct sockaddr_in6 *b6 = (struct sockaddr_in6 *)b;
-+
-+              return !memcmp(&a6->sin6_addr, &b6->sin6_addr, 16);
-+      }
-+      if(a->sa_family == AF_INET && b->sa_family == AF_INET)
-+      {
-+              struct sockaddr_in *a4 = (struct sockaddr_in *)a;
-+              struct sockaddr_in *b4 = (struct sockaddr_in *)b;
-+
-+              return a4->sin_addr.s_addr == b4->sin_addr.s_addr;
-+      }
-+      return False;
-+}
-+#endif
-+
-+/*******************************************************************
-+ matchname - determine if host name matches IP address. Used to
-+ confirm a hostname lookup to prevent spoof attacks
-+ ******************************************************************/
-+static BOOL matchname(char *remotehost, struct sockaddr *can)
-+{
-+#ifdef HAVE_INET6
-+      struct addrinfo *ai, hints, *cur;
-+
-+      memset(&hints, 0, sizeof(hints));
-+      hints.ai_socktype = SOCK_STREAM;
-+      if(getaddrinfo(remotehost, NULL, &hints, &ai)){
-+              DEBUG(0,("getaddrinfo(%s): lookup failure.\n", remotehost));
-+              return False;
-+      }
-+      for( cur = ai; cur; cur = cur->ai_next )
-+              if(addr_equal(cur->ai_addr, can))
-+              {
-+                      freeaddrinfo(ai);
-+                      return True;
-+              }
-+
-+      /*
-+       * The host name does not map to the original host address. Perhaps
-+       * someone has compromised a name server. More likely someone botched
-+       * it, but that could be dangerous, too.
-+       */
-+      
-+      DEBUG(0,("host name/address mismatch: %s != %s\n",
-+               print_sockaddr(can), remotehost));
-+
-+      freeaddrinfo(ai);
-+      return False;
-+#else
-       struct hostent *hp;
-+      struct in_addr addr = ((struct sockaddr_in *)can)->sin_addr;
-       int     i;
-       
-       if ((hp = sys_gethostbyname(remotehost)) == 0) {
-@@ -946,6 +1027,56 @@
-       DEBUG(0,("host name/address mismatch: %s != %s\n",
-                inet_ntoa(addr), hp->h_name));
-       return False;
-+#endif
-+}
-+
-+/*******************************************************************
-+ return a sockaddr describing the remote endpoint
-+ ******************************************************************/
-+static BOOL get_socket_sa(int fd, struct sockaddr **sa, int *len)
-+{
-+      if (fd == -1) {
-+              return False;
-+      }
-+
-+#ifdef HAVE_INET6
-+      *len = sizeof(struct sockaddr_storage);
-+#else
-+      *len = sizeof(struct sockaddr);
-+#endif
-+
-+      *sa = (struct sockaddr *)malloc(*len);
-+
-+      if (getpeername(fd, *sa, len) < 0) {
-+              DEBUG(0,("getpeername failed. Error was %s\n", strerror(errno) ));
-+              SAFE_FREE(*sa);
-+              *sa = NULL;
-+              return False;
-+      }
-+
-+#ifdef HAVE_INET6
-+      if((*sa)->sa_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(
-+                              &((struct sockaddr_in6 *)(*sa))->sin6_addr))
-+      {
-+              struct sockaddr_in *newsin;
-+              struct in_addr addr;
-+              int port = ((struct sockaddr_in6 *)(*sa))->sin6_port;
-+
-+              DEBUG(5,("converting IPv6-mapped address %s\n",
-+                                      print_sockaddr(*sa)));
-+              memcpy(&addr, &((struct sockaddr_in6 *)
-+                                      (*sa))->sin6_addr + 12, 4);
-+              SAFE_FREE(*sa);
-+              *len = sizeof(struct sockaddr_in);
-+              *sa = (struct sockaddr *)malloc(*len);
-+              newsin = (struct sockaddr_in *)(*sa);
-+              newsin->sin_family = AF_INET;
-+              newsin->sin_port = port;
-+              newsin->sin_addr = addr;
-+      }
-+#endif
-+
-+      return True;
- }
-  
-@@ -955,34 +1086,60 @@
- char *get_socket_name(int fd)
- {
-       static pstring name_buf;
--      static fstring addr_buf;
--      struct hostent *hp;
--      struct in_addr addr;
-+      struct sockaddr *sa;
-       char *p;
-+      int len;
-       
--      p = get_socket_addr(fd);
--
--      /* it might be the same as the last one - save some DNS work */
--      if (strcmp(p, addr_buf) == 0) return name_buf;
--
-       pstrcpy(name_buf,"UNKNOWN");
-       if (fd == -1) return name_buf;
--      fstrcpy(addr_buf, p);
-+      if(!get_socket_sa(fd, &sa, &len)) return name_buf;
-+      p = print_sockaddr(sa);
--      addr = *interpret_addr2(p);
--      
--      /* Look up the remote host name. */
--      if ((hp = gethostbyaddr((char *)&addr.s_addr, sizeof(addr.s_addr), AF_INET)) == 0) {
--              DEBUG(1,("Gethostbyaddr failed for %s\n",p));
--              pstrcpy(name_buf, p);
--      } else {
--              pstrcpy(name_buf,(char *)hp->h_name);
--              if (!matchname(name_buf, addr)) {
--                      DEBUG(0,("Matchname failed on %s %s\n",name_buf,p));
--                      pstrcpy(name_buf,"UNKNOWN");
-+#ifdef HAVE_INET6
-+      {
-+              char hostbuf[NI_MAXHOST];
-+
-+              if(getnameinfo(sa, len, hostbuf, NI_MAXHOST, NULL, 0, 0)) {
-+                      DEBUG(1,("Getnameinfo failed for %s\n",p));
-+                      pstrcpy(name_buf, p);
-+              } else {
-+                      if (matchname(hostbuf, sa))
-+                              pstrcpy(name_buf, hostbuf);
-+                      else {
-+                              DEBUG(0,("Matchname failed on %s %s\n",
-+                                                      name_buf, p));
-+                              pstrcpy(name_buf,p);
-+                      }
-+              }
-+      }
-+#else
-+      {
-+              struct hostent *hp;
-+              struct sockaddr_in *nsin = (struct sockaddr_in *)sa;
-+
-+              if(sa->sa_family != AF_INET)
-+              {
-+                      SAFE_FREE(sa);
-+                      return name_buf;
-+              }
-+
-+              /* Look up the remote host name. */
-+              if ((hp = gethostbyaddr((char *)&nsin->sin_addr.s_addr,
-+                              sizeof(nsin->sin_addr.s_addr), AF_INET)) == 0) {
-+                      DEBUG(1,("Gethostbyaddr failed for %s\n",p));
-+                      pstrcpy(name_buf, p);
-+              } else {
-+                      pstrcpy(name_buf,(char *)hp->h_name);
-+                      if (!matchname(name_buf, sa)) {
-+                              DEBUG(0,("Matchname failed on %s %s\n",
-+                                                      name_buf, p));
-+                              pstrcpy(name_buf,p);
-+                      }
-               }
-       }
-+#endif
-+      SAFE_FREE(sa);
-       alpha_strcpy(name_buf, name_buf, "_-.", sizeof(name_buf));
-       if (strstr(name_buf,"..")) {
-@@ -997,24 +1154,18 @@
-  ******************************************************************/
- char *get_socket_addr(int fd)
- {
--      struct sockaddr sa;
--      struct sockaddr_in *sockin = (struct sockaddr_in *) (&sa);
--      socklen_t length = sizeof(sa);
-       static fstring addr_buf;
-+      struct sockaddr *sa;
-+      int len;
-       fstrcpy(addr_buf,"0.0.0.0");
--      if (fd == -1) {
--              return addr_buf;
-+      if(get_socket_sa(fd, &sa, &len))
-+      {
-+              fstrcpy(addr_buf,print_sockaddr(sa));
-+              SAFE_FREE(sa);
-       }
-       
--      if (getpeername(fd, &sa, &length) < 0) {
--              DEBUG(0,("getpeername failed. Error was %s\n", strerror(errno) ));
--              return addr_buf;
--      }
--      
--      fstrcpy(addr_buf,(char *)inet_ntoa(sockin->sin_addr));
--      
-       return addr_buf;
- }
-diff -ur samba-2.2.8a/source/lib/wins_srv.c samba-2.2.8a+IPv6-20030712/source/lib/wins_srv.c
---- samba-2.2.8a/source/lib/wins_srv.c 2003-03-14 16:34:47.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/lib/wins_srv.c   2003-07-12 22:28:29.000000000 -0400
-@@ -155,7 +155,7 @@
-       else
-         {
-         /* Add server to list. */
--        if( is_ipaddress( wins_id_bufr ) )
-+        if( is_ipv4address( wins_id_bufr ) )
-           entry->ip_addr = *interpret_addr2( wins_id_bufr );
-         else
-           entry->ip_addr = *interpret_addr2( "0.0.0.0" );
-diff -ur samba-2.2.8a/source/libsmb/cliconnect.c samba-2.2.8a+IPv6-20030712/source/libsmb/cliconnect.c
---- samba-2.2.8a/source/libsmb/cliconnect.c    2003-03-14 16:34:48.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/libsmb/cliconnect.c      2003-07-12 22:28:29.000000000 -0400
-@@ -638,8 +638,8 @@
-       int len = 4;
-       extern pstring user_socket_options;
--      /* 445 doesn't have session request */
--      if (cli->port == 445) return True;
-+      /* Direct SMB doesn't have session request */
-+      if (is_directsmb(cli->connected_addr->addr)) return True;
-       /* send a session request (RFC 1002) */
-       memcpy(&(cli->calling), calling, sizeof(*calling));
-@@ -690,9 +690,12 @@
-               */
-               int port = (CVAL(cli->inbuf,8)<<8)+CVAL(cli->inbuf,9);
-               /* SESSION RETARGET */
--              putip((char *)&cli->dest_ip,cli->inbuf+4);
--
--              cli->fd = open_socket_out(SOCK_STREAM, &cli->dest_ip, port, LONG_CONNECT_TIMEOUT);
-+              struct in_addr addr;
-+              putip((char *)&addr,cli->inbuf+4);
-+              if(cli->dest_addrs) free_sockaddr_list(cli->dest_addrs);
-+              cli->dest_addrs = make_singlet_list(&addr, port);
-+              cli->fd = open_socket_out(cli->dest_addrs,
-+                              &cli->connected_addr, LONG_CONNECT_TIMEOUT);
-               if (cli->fd == -1)
-                       return False;
-@@ -736,10 +739,11 @@
-  Open the client sockets.
- ****************************************************************************/
--BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip)
-+BOOL cli_connect(struct cli_state *cli, const char *host,
-+                      struct sockaddr_list *salist)
- {
-       extern pstring user_socket_options;
--      int name_type = 0x20;
-+      BOOL free_on_error = False;
-       char *p;
-       /* reasonable default hostname */
-@@ -747,45 +751,44 @@
-               host = "*SMBSERVER";
-       fstrcpy(cli->desthost, host);
--      
--      /* allow hostnames of the form NAME#xx and do a netbios lookup */
--      if ((p = strchr(cli->desthost, '#'))) {
--              name_type = strtol(p+1, NULL, 16);              
--              *p = 0;
--      }
--      
--      if (!ip || is_zero_ip(*ip)) {
--              if (!resolve_name(cli->desthost, &cli->dest_ip, name_type)) {
--                      return False;
-+
-+      /* At this point, cli->dest_addrs should be empty */
-+      if(cli->dest_addrs) free_sockaddr_list(cli->dest_addrs);
-+
-+      if(!salist) {
-+              free_on_error = True;
-+              if ((p = strchr(cli->desthost, '#'))) {
-+                      struct in_addr ip;
-+                      int name_type = strtol(p+1, NULL, 16);          
-+
-+                      *p = 0;
-+                      if(!resolve_name_netbios(cli->desthost, &ip, name_type))
-+                              return False;
-+                      salist = make_singlet_list(&ip, 139);
-+              } else {
-+                      if(!(salist = resolve_name_smb(cli->desthost,
-+                                                      cli->default_port)))
-+                              return False;
-               }
--              if (ip)
--                      *ip = cli->dest_ip;
--      } else {
--              cli->dest_ip = *ip;
-       }
--
-+      
-       if (getenv("LIBSMB_PROG")) {
-               cli->fd = sock_exec(getenv("LIBSMB_PROG"));
-       } else {
--              /* try 445 first, then 139 */
--              int port = cli->port?cli->port:445;
--              cli->fd = open_socket_out(SOCK_STREAM, &cli->dest_ip, 
--                                        port, cli->timeout);
--              if (cli->fd == -1 && cli->port == 0) {
--                      port = 139;
--                      cli->fd = open_socket_out(SOCK_STREAM, &cli->dest_ip, 
--                                                port, cli->timeout);
--              }
--              if (cli->fd != -1) cli->port = port;
-+              cli->fd = open_socket_out(salist, &cli->connected_addr, 
-+                                        cli->timeout);
-       }
-       if (cli->fd == -1) {
-               DEBUG(1,("Error connecting to %s (%s)\n",
--                       inet_ntoa(*ip),strerror(errno)));
-+                      print_sockaddr(salist->addr),strerror(errno)));
-+              if(free_on_error) free_sockaddr_list(salist);
-               return False;
-       }
-       set_socket_options(cli->fd,user_socket_options);
-+      cli->dest_addrs = salist;
-+
-       return True;
- }
-@@ -794,13 +797,14 @@
- ****************************************************************************/
- BOOL cli_establish_connection(struct cli_state *cli, 
--                              const char *dest_host, struct in_addr *dest_ip,
-+                              char *dest_host, struct sockaddr_list *salist,
-                               struct nmb_name *calling, struct nmb_name *called,
-                               const char *service, const char *service_type,
-                               BOOL do_shutdown, BOOL do_tcon)
- {
-       DEBUG(5,("cli_establish_connection: %s connecting to %s (%s) - %s [%s]\n",
--                        nmb_namestr(calling), nmb_namestr(called), inet_ntoa(*dest_ip),
-+                        nmb_namestr(calling), nmb_namestr(called),
-+                        salist ? print_sockaddr(salist->addr) : "unspecified",
-                     cli->user_name, cli->domain));
-       /* establish connection */
-@@ -809,9 +813,12 @@
-               return False;
-       if (cli->fd == -1) {
--              if (!cli_connect(cli, dest_host, dest_ip)) {
-+              if (!cli_connect(cli, dest_host, salist))
-+              {
-                       DEBUG(1,("cli_establish_connection: failed to connect to %s (%s)\n",
--                                        nmb_namestr(called), inet_ntoa(*dest_ip)));
-+                                nmb_namestr(called),
-+                                salist ? print_sockaddr(salist->addr)
-+                                      : "unknown"));
-                       return False;
-               }
-       }
-@@ -944,7 +951,7 @@
-       struct nmb_name calling;
-       struct nmb_name called;
-       struct cli_state *cli;
--      struct in_addr ip;
-+      struct sockaddr_list *salist;
-       
-       if (!output_cli)
-               DEBUG(0, ("output_cli is NULL!?!"));
-@@ -964,14 +971,14 @@
-               return NT_STATUS_UNSUCCESSFUL;
-       }
--      ip = *dest_ip;
-+      salist = make_singlet_list(dest_ip, port);
-       
-       DEBUG(3,("Connecting to host=%s share=%s\n", dest_host, service));
-       
--      if (!cli_connect(cli, dest_host, &ip)) {
-+      if (!cli_connect(cli, dest_host, salist)) {
-               DEBUG(1,("cli_establish_connection: failed to connect to %s (%s)\n",
-                        nmb_namestr(&called), inet_ntoa(*dest_ip)));
--              cli_shutdown(cli);
-+              free_sockaddr_list(salist);
-               return NT_STATUS_UNSUCCESSFUL;
-       }
-@@ -1031,9 +1038,10 @@
-  Attempt a NetBIOS session request, falling back to *SMBSERVER if needed.
- ****************************************************************************/
--BOOL attempt_netbios_session_request(struct cli_state *cli, const char *srchost, const char *desthost,
--                                     struct in_addr *pdest_ip)
-+BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost,
-+              char *desthost)
- {
-+      struct sockaddr_list *dest_addrs_cache = cli->dest_addrs;
-       struct nmb_name calling, called;
-       make_nmb_name(&calling, srchost, 0x0);
-@@ -1076,9 +1084,11 @@
-                * for this purpose. JRA. Based on work by "Kim R. Pedersen" <krp@filanet.dk>.
-                */
-+              cli->dest_addrs = NULL; /* we cached it, so it shouldn't free */
-               cli_close_connection(cli);
--              if (!cli_initialise(cli) || !cli_connect(cli, desthost, pdest_ip) ||
-+              if (!cli_initialise(cli) ||
-+                      !cli_connect(cli, desthost, dest_addrs_cache) ||
-                               !cli_session_request(cli, &calling, &smbservername)) {
-                       DEBUG(0,("attempt_netbios_session_request: %s rejected the session for name *SMBSERVER with error %s\n", 
-                               desthost, cli_errstr(cli) ));
-diff -ur samba-2.2.8a/source/libsmb/clidgram.c samba-2.2.8a+IPv6-20030712/source/libsmb/clidgram.c
---- samba-2.2.8a/source/libsmb/clidgram.c      2003-03-14 16:34:48.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/libsmb/clidgram.c        2003-07-12 22:28:29.000000000 -0400
-@@ -147,7 +147,7 @@
-   struct sockaddr_in sock_out;
-   socklen_t name_size;
--  if (!resolve_name(send_to_name, &sendto_ip, 0x1d)) {
-+  if (!resolve_name_netbios(send_to_name, &sendto_ip, 0x1d)) {
-     DEBUG(0, ("Could not resolve name: %s<1D>\n", send_to_name));
-     return False;
-@@ -156,17 +156,15 @@
-   my_ip.s_addr = inet_addr("0.0.0.0");
-  
--  if (!resolve_name(myname, &my_ip, 0x00)) { /* FIXME: Call others here */
-+  if (!resolve_name_netbios(myname, &my_ip, 0x00)) { /* FIXME: Call others here */
-     DEBUG(0, ("Could not resolve name: %s<00>\n", myname));
-   }
--  if ((dgram_sock = open_socket_out(SOCK_DGRAM, &sendto_ip, 138, LONG_CONNECT_TIMEOUT)) < 0) {
--
--    DEBUG(4, ("open_sock_out failed ..."));
-+  if ((dgram_sock = socket(PF_INET, SOCK_DGRAM, 0)) < 0) {
-+    DEBUG(0, ("socket failed (%s)", strerror(errno)));
-     return False;
--
-   }
-   /* Make it a broadcast socket ... */
-diff -ur samba-2.2.8a/source/libsmb/clientgen.c samba-2.2.8a+IPv6-20030712/source/libsmb/clientgen.c
---- samba-2.2.8a/source/libsmb/clientgen.c     2002-12-10 09:58:15.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/libsmb/clientgen.c       2003-07-12 22:28:29.000000000 -0400
-@@ -24,12 +24,15 @@
- #include "includes.h"
- /****************************************************************************
-- Change the port number used to call on.
-+ Change the default port number used to call on.
-+
-+ This should only truly be used if we're operating on a non-standard
-+ port.  The default behavior is to first try port 445, then 139.
- ****************************************************************************/
- int cli_set_port(struct cli_state *cli, int port)
- {
--      cli->port = port;
-+      cli->default_port = port;
-       return port;
- }
-@@ -186,7 +189,9 @@
-       ZERO_STRUCTP(cli);
--      cli->port = 0;
-+      cli->default_port = 0;
-+      cli->dest_addrs = NULL;
-+      cli->connected_addr = NULL;
-       cli->fd = -1;
-       cli->cnum = -1;
-       cli->pid = (uint16)sys_getpid();
-@@ -243,6 +248,9 @@
-       SAFE_FREE(cli->outbuf);
-       SAFE_FREE(cli->inbuf);
-+      if (cli->dest_addrs)
-+             free_sockaddr_list(cli->dest_addrs);
-+
-       if (cli->mem_ctx) {
-               talloc_destroy(cli->mem_ctx);
-               cli->mem_ctx = NULL;
-diff -ur samba-2.2.8a/source/libsmb/cli_lsarpc.c samba-2.2.8a+IPv6-20030712/source/libsmb/cli_lsarpc.c
---- samba-2.2.8a/source/libsmb/cli_lsarpc.c    2002-06-06 17:31:33.000000000 -0400
-+++ samba-2.2.8a+IPv6-20030712/source/libsmb/cli_lsarpc.c      2003-07-12 22:28:29.000000000 -0400
-@@ -1064,6 +1064,7 @@
- {
-       extern pstring global_myname;
-       struct cli_state cli;
-+      struct sockaddr_list *dest_addrs;
-       NTSTATUS result;
-       POLICY_HND lsa_pol;
-       BOOL ret = False;
-@@ -1074,20 +1075,22 @@
-               return False;
-       }
-  
--      if(!resolve_name( remote_machine, &cli.dest_ip, 0x20)) {
-+      if(!(dest_addrs = resolve_name_smb(remote_machine, 0))) {
-               DEBUG(0,("fetch_domain_sid: Can't resolve address for %s\n", remote_machine));
-               goto done;
-       }
-  
--      if (!cli_connect(&cli, remote_machine, &cli.dest_ip)) {
-+      if (!cli_connect(&cli, remote_machine, dest_addrs)) {
-               DEBUG(0,("fetch_domain_sid: unable to connect to SMB server on \
- machine %s. Error was : %s.\n", remote_machine, cli_errstr(&cli) ));
-               goto done;
-       }
--      if (!attempt_netbios_session_request(&cli, global_myname, remote_machine, &cli.dest_ip)) {
-+      if (!attempt_netbios_session_request(&cli, global_myname,
-+                              remote_machine)) {
-               DEBUG(0,("fetch_domain_sid: machine %s rejected the NetBIOS session request.\n", 
-                       remote_machine));
-+              free_sockaddr_list(dest_addrs);
-               goto done;
-       }
-  
-diff -ur samba-2.2.8a/source/libsmb/cli_pipe_util.c samba-2.2.8a+IPv6-20030712/source/libsmb/cli_pipe_util.c
---- samba-2.2.8a/source/libsmb/cli_pipe_util.c 2003-03-14 16:34:47.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/libsmb/cli_pipe_util.c   2003-07-12 22:28:29.000000000 -0400
-@@ -27,7 +27,7 @@
-                                     const char *pipe_name, 
-                                       struct ntuser_creds *creds)
- {
--      struct in_addr dest_ip;
-+      struct sockaddr_list *dest_addrs;
-       struct nmb_name calling, called;
-       fstring dest_host;
-       extern pstring global_myname;
-@@ -49,15 +49,18 @@
-       /* Establish a SMB connection */
--      if (!resolve_srv_name(system_name, dest_host, &dest_ip)) {
-+      if (!(dest_addrs = resolve_srv_name(system_name, dest_host,
-+                                      cli->default_port))) {
-               return NULL;
-       }
-       make_nmb_name(&called, dns_to_netbios_name(dest_host), 0x20);
-       make_nmb_name(&calling, dns_to_netbios_name(global_myname), 0);
--      if (!cli_establish_connection(cli, dest_host, &dest_ip, &calling, 
-+      if (!cli_establish_connection(cli, dest_host, dest_addrs, &calling, 
-                                     &called, "IPC$", "IPC", False, True)) {
-+              cli_shutdown(cli);
-+              free_sockaddr_list(dest_addrs);
-               return NULL;
-       }
-diff -ur samba-2.2.8a/source/libsmb/libsmbclient.c samba-2.2.8a+IPv6-20030712/source/libsmb/libsmbclient.c
---- samba-2.2.8a/source/libsmb/libsmbclient.c  2003-02-28 10:56:19.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/libsmb/libsmbclient.c    2003-07-12 22:28:30.000000000 -0400
-@@ -244,10 +244,8 @@
-       char *p, *server_n = server;
-       fstring group;
-       pstring ipenv;
--      struct in_addr ip;
-       int tried_reverse = 0;
-   
--      zero_ip(&ip);
-       ZERO_STRUCT(c);
-       /* try to use an existing connection */
-@@ -305,10 +303,8 @@
-  again:
-       slprintf(ipenv,sizeof(ipenv)-1,"HOST_%s", server_n);
--      zero_ip(&ip);
--
-       /* have to open a new connection */
--      if (!cli_initialise(&c) || !cli_connect(&c, server_n, &ip)) {
-+      if (!cli_initialise(&c) || !cli_connect(&c, server_n, NULL)) {
-               if (c.initialised) cli_shutdown(&c);
-               errno = ENOENT;
-               return NULL;
-@@ -324,7 +320,7 @@
-                 /* Only try this if server is an IP address ... */
--                if (is_ipaddress(server) && !tried_reverse) {
-+                if (is_ipv4address(server) && !tried_reverse) {
-                   fstring remote_name;
-                   struct in_addr rem_ip;
-@@ -1617,8 +1613,8 @@
-                 /* first try to get the LMB for our workgroup, and if that fails,     */
-                 /* try the DMB                                                        */
--              if (!(resolve_name(lp_workgroup(), &rem_ip, 0x1d) ||
--                      resolve_name(lp_workgroup(), &rem_ip, 0x1b))) {
-+              if (!(resolve_name_netbios(lp_workgroup(), &rem_ip, 0x1d) ||
-+                      resolve_name_netbios(lp_workgroup(), &rem_ip, 0x1b))) {
-       
-                       errno = EINVAL;  /* Something wrong with smb.conf? */
-                       return -1;
-@@ -1689,9 +1685,9 @@
-                       /* Check to see if <server><1D>, <server><1B>, or <server><20> translates */
-                       /* However, we check to see if <server> is an IP address first */
--                      if (!is_ipaddress(server) &&  /* Not an IP addr so check next */
--                          (resolve_name(server, &rem_ip, 0x1d) ||   /* Found LMB */
--                                    resolve_name(server, &rem_ip, 0x1b) )) { /* Found DMB */
-+                      if (!is_ipv4address(server) &&  /* Not an IP addr so check next */
-+                          (resolve_name_netbios(server, &rem_ip, 0x1d) ||   /* Found LMB */
-+                                    resolve_name_netbios(server, &rem_ip, 0x1b) )) { /* Found DMB */
-                               pstring buserver;
-                               smbc_file_table[slot]->dir_type = SMBC_SERVER;
-@@ -1743,8 +1739,7 @@
-                       }
-                       else {
--
--                              if (resolve_name(server, &rem_ip, 0x20)) {
-+                              if (resolve_name_netbios(server, &rem_ip, 0x20)) {
-                                       /* Now, list the shares ... */
-diff -ur samba-2.2.8a/source/libsmb/namequery.c samba-2.2.8a+IPv6-20030712/source/libsmb/namequery.c
---- samba-2.2.8a/source/libsmb/namequery.c     2003-03-14 16:34:48.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/libsmb/namequery.c       2003-07-12 22:28:30.000000000 -0400
-@@ -643,15 +643,11 @@
-  Resolve via "bcast" method.
- *********************************************************/
--BOOL name_resolve_bcast(const char *name, int name_type,
--                      struct in_addr **return_ip_list, int *return_count)
-+struct sockaddr_list *name_resolve_bcast(const char *name, int name_type)
- {
-       int sock, i;
-       int num_interfaces = iface_count();
--      *return_ip_list = NULL;
--      *return_count = 0;
--      
-       /*
-        * "bcast" means do a broadcast lookup on all the local interfaces.
-        */
-@@ -661,7 +657,7 @@
-       sock = open_socket_in( SOCK_DGRAM, 0, 3,
-                              interpret_addr(lp_socket_address()), True );
--      if (sock == -1) return False;
-+      if (sock == -1) return NULL;
-       set_socket_options(sock,"SO_BROADCAST");
-       /*
-@@ -670,35 +666,37 @@
-        */
-       for( i = num_interfaces-1; i >= 0; i--) {
-               struct in_addr sendto_ip;
--              int flags;
-+              struct in_addr *addr;
-+              int return_count, flags;
-+
-               /* Done this way to fix compiler error on IRIX 5.x */
-               sendto_ip = *iface_bcast(*iface_n_ip(i));
--              *return_ip_list = name_query(sock, name, name_type, True, 
--                                  True, sendto_ip, return_count, &flags);
--              if(*return_ip_list != NULL) {
--                      close(sock);
--                      return True;
--              }
--      }
--
--      close(sock);
--      return False;
-+              addr = name_query(sock, name, name_type, True, 
-+                                  True, sendto_ip, &return_count, &flags);
-+              if(addr != NULL) {
-+                      struct sockaddr_list *salist;
-+
-+                      close(sock);
-+                      salist = make_sin_list(addr, return_count);
-+                      SAFE_FREE(addr);
-+                      return salist;
-+              }
-+      }
-+  
-+      close(sock);
-+      return NULL;
- }
- /********************************************************
-  Resolve via "wins" method.
- *********************************************************/
--static BOOL resolve_wins(const char *name, int name_type,
--                         struct in_addr **return_iplist, int *return_count)
-+static struct sockaddr_list *resolve_wins(const char *name, int name_type)
- {
-       int sock;
-       struct in_addr wins_ip;
-       BOOL wins_ismyip;
--      *return_iplist = NULL;
--      *return_count = 0;
--      
-       /*
-        * "wins" means do a unicast lookup to the WINS server.
-        * Ignore if there is no WINS server specified or if the
-@@ -719,7 +717,7 @@
-               wins_ismyip = True;
-       } else if( wins_srv_count() < 1 ) {
-               DEBUG(3,("resolve_wins: WINS server resolution selected and no WINS servers listed.\n"));
--              return False;
-+              return NULL;
-       } else {
-               wins_ip     = wins_srv_ip();
-               wins_ismyip = ismyip(wins_ip);
-@@ -731,28 +729,32 @@
-                                       interpret_addr(lp_socket_address()),
-                                       True );
-               if (sock != -1) {
--                      int flags;
--                      *return_iplist = name_query( sock,      name,
--                                                   name_type, False, 
--                                                   True,      wins_ip,
--                                                   return_count, &flags);
--                      if(*return_iplist != NULL) {
--                              close(sock);
--                              return True;
--                      }
-+                      struct in_addr *addr;
-+                      int return_count, flags;
-+
-+                      addr = name_query(sock,      name,
-+                                        name_type, False, 
-+                                        True,      wins_ip,
-+                                        &return_count, &flags);
-                       close(sock);
-+                      if(addr != NULL) {
-+                              struct sockaddr_list *salist;
-+
-+                              salist = make_sin_list(addr, return_count);
-+                              SAFE_FREE(addr);
-+                              return salist;
-+                      }
-               }
-       }
--      return False;
-+      return NULL;
- }
- /********************************************************
-  Resolve via "lmhosts" method.
- *********************************************************/
--static BOOL resolve_lmhosts(const char *name, int name_type,
--                         struct in_addr **return_iplist, int *return_count)
-+static struct sockaddr_list *resolve_lmhosts(const char *name, int name_type)
- {
-       /*
-        * "lmhosts" means parse the local lmhosts file.
-@@ -763,9 +765,6 @@
-       int name_type2;
-       struct in_addr return_ip;
--      *return_iplist = NULL;
--      *return_count = 0;
--
-       DEBUG(3,("resolve_lmhosts: Attempting lmhosts lookup for name %s<0x%x>\n", name, name_type));
-       fp = startlmhosts( LMHOSTSFILE );
-@@ -775,19 +774,12 @@
-                 ((name_type2 == -1) || (name_type == name_type2))
-                ) {
-                               endlmhosts(fp);
--                              *return_iplist = (struct in_addr *)malloc(sizeof(struct in_addr));
--                              if(*return_iplist == NULL) {
--                                      DEBUG(3,("resolve_lmhosts: malloc fail !\n"));
--                                      return False;
--                              }
--                              **return_iplist = return_ip;
--                              *return_count = 1;
--                              return True; 
-+                              return make_sin_list(&return_ip, 1);
-                       }
-               }
-               endlmhosts(fp);
-       }
--      return False;
-+      return NULL;
- }
-@@ -795,34 +787,45 @@
-  Resolve via "hosts" method.
- *********************************************************/
--static BOOL resolve_hosts(const char *name,
--                         struct in_addr **return_iplist, int *return_count)
-+static struct sockaddr_list *resolve_hosts(const char *name)
- {
-       /*
-        * "host" means do a localhost, or dns lookup.
-        */
-+#ifdef HAVE_INET6
-+      struct addrinfo *ai, hints;
-+      struct sockaddr_list *ret;
-+
-+      DEBUG(3,("resolve_hosts: Attempting getaddrinfo for name %s<0x20>\n", name));
-+      memset(&hints, 0, sizeof(hints));
-+      hints.ai_socktype = SOCK_STREAM;
-+      if(getaddrinfo(name, NULL, &hints, &ai)) return NULL;
-+      ret = make_sa_list(ai);
-+      freeaddrinfo(ai);
-+      return ret;
-+#else
-       struct hostent *hp;
--      *return_iplist = NULL;
--      *return_count = 0;
--
-       DEBUG(3,("resolve_hosts: Attempting host lookup for name %s<0x20>\n", name));
--      
-+
-       if (((hp = sys_gethostbyname(name)) != NULL) && (hp->h_addr != NULL)) {
-               int i = 0, j;
-+              struct in_addr addr;
-+              struct sockaddr_list *top = NULL, **cur = &top;
-+
-               while (hp->h_addr_list[i]) i++;
-               DEBUG(10, ("%d addresses returned\n", i));
--              *return_iplist = (struct in_addr *)malloc(i*sizeof(struct in_addr));
--              if(*return_iplist == NULL) {
--                      DEBUG(3,("resolve_hosts: malloc fail !\n"));
--                      return False;
--              }
-                 for (j = 0; j < i; j++)
--                      putip(&(*return_iplist)[j], (char *)hp->h_addr_list[j]);
--              *return_count = i;
--              return True;
-+              {
-+                      memcpy(&addr.s_addr, hp->h_addr_list[j],
-+                                      sizeof(addr.s_addr));
-+                      *cur = make_sin_list(&addr, 1);
-+                      cur = &(*cur)->next;
-+              }
-+              return top;
-       }
--      return False;
-+      return NULL;
-+#endif
- }
- /********************************************************
-@@ -830,49 +833,54 @@
-  Use this function if the string is either an IP address, DNS
-  or host name or NetBIOS name. This uses the name switch in the
-  smb.conf to determine the order of name resolution.
-+
-+ WARNING: This function returns sockaddrs without the port set!
-+          Don't try to connect to these without first setting
-+        the port!
- *********************************************************/
--static BOOL internal_resolve_name(const char *name, int name_type,
--                                      struct in_addr **return_iplist, int *return_count)
-+static struct sockaddr_list *internal_resolve_name(const char *name,
-+              int name_type)
- {
-   pstring name_resolve_list;
-   fstring tok;
-   const char *ptr;
--  BOOL allones = (strcmp(name,"255.255.255.255") == 0);
--  BOOL allzeros = (strcmp(name,"0.0.0.0") == 0);
--  BOOL is_address = is_ipaddress(name);
--  BOOL result = False;
--  struct in_addr *nodupes_iplist;
--  int i;
--
--  *return_iplist = NULL;
--  *return_count = 0;
--
--  if (allzeros || allones || is_address) {
--      *return_iplist = (struct in_addr *)malloc(sizeof(struct in_addr));
--      if(*return_iplist == NULL) {
--              DEBUG(3,("internal_resolve_name: malloc fail !\n"));
--              return False;
--      }
--      if(is_address) { 
--              /* if it's in the form of an IP address then get the lib to interpret it */
--              if (((*return_iplist)->s_addr = inet_addr(name)) == 0xFFFFFFFF ){
--                      DEBUG(1,("internal_resolve_name: inet_addr failed on %s\n", name));
--                      return False;
--              }
--      } else {
--              (*return_iplist)->s_addr = allones ? 0xFFFFFFFF : 0;
--              *return_count = 1;
--      }
--    return True;
--  }
-- 
-+  struct sockaddr_list *salist = NULL, *cur;
-+
-+  if (is_ipaddress(name)) {
-+        /* if it's in the form of an IP address then get
-+         * the lib to interpret it */
-+        struct sockaddr *sa;
-+
-+        if(!(sa = get_numeric_addr(name))) return NULL;
-+        salist = (struct sockaddr_list *)malloc(sizeof(struct sockaddr_list));
-+        salist->next = NULL;
-+        salist->addr = sa;
-+
-+        /* This isn't kosher, but it would take a lot to make Samba
-+         * be truly AF-independent. */
-+#ifdef HAVE_INET6
-+        if( sa->sa_family == AF_INET6 )
-+        {
-+                salist->pfamily = PF_INET6;
-+                salist->len = sizeof(struct sockaddr_in6);
-+        } else
-+#endif
-+        {
-+                salist->pfamily = PF_INET;
-+                salist->len = sizeof(struct sockaddr_in);
-+        }
-+        return salist;
-+    }
-+
-+#if 0
-   /* Check netbios name cache */
-   if (namecache_fetch(name, name_type, return_iplist, return_count)) {
-     /* This could be a negative response */
-     return (*return_count > 0);
-   }
-+#endif
-   pstrcpy(name_resolve_list, lp_name_resolve_order());
-   ptr = name_resolve_list;
-@@ -881,147 +889,177 @@
-   while (next_token(&ptr, tok, LIST_SEP, sizeof(tok))) {
-         if((strequal(tok, "host") || strequal(tok, "hosts"))) {
--                if (name_type == 0x20 && resolve_hosts(name, return_iplist, return_count)) {
--                        result = True;
--              goto done;
-+                if (name_type == 0x20 && (salist = resolve_hosts(name)))
-+                {
-+                        goto done;
-                 }
-         } else if(strequal( tok, "lmhosts")) {
--                if (resolve_lmhosts(name, name_type, return_iplist, return_count)) {
--                        result = True;
--              goto done;
-+                if ((salist=resolve_lmhosts(name, name_type))) {
-+                        goto done;
-                 }
-         } else if(strequal( tok, "wins")) {
-                 /* don't resolve 1D via WINS */
-                 if (name_type != 0x1D &&
--                      resolve_wins(name, name_type, return_iplist, return_count)) {
--                        result = True;
--              goto done;
-+                                (salist=resolve_wins(name, name_type))) {
-+                        goto done;
-                 }
-         } else if(strequal( tok, "bcast")) {
--                if (name_resolve_bcast(name, name_type, return_iplist, return_count)) {
--                        result = True;
--              goto done;
-+                if ((salist=name_resolve_bcast(name, name_type))) {
-+                        goto done;
-                 }
-         } else {
-                 DEBUG(0,("resolve_name: unknown name switch type %s\n", tok));
-         }
-   }
--  /* All of the resolve_* functions above have returned false. */
--
--  SAFE_FREE(*return_iplist);
--  return False;
--
-   done:
-   /* Remove duplicate entries.  Some queries, notably #1c (domain
--     controllers) return the PDC in iplist[0] and then all domain
--     controllers including the PDC in iplist[1..n].  Iterating over
--     the iplist when the PDC is down will cause two sets of timeouts. */
--
--  if (*return_count && (nodupes_iplist =
--                      (struct in_addr *)malloc(sizeof(struct in_addr) * (*return_count)))) {
--      int nodupes_count = 0;
-- 
--      /* Iterate over return_iplist looking for duplicates */
-- 
--      for (i = 0; i < *return_count; i++) {
--          BOOL is_dupe = False;
--          int j;
-- 
--          for (j = i + 1; j < *return_count; j++) {
--              if (ip_equal((*return_iplist)[i],
--                       (*return_iplist)[j])) {
--                  is_dupe = True;
--                  break;
--              }
--          }
-- 
--          if (!is_dupe) {
-- 
--              /* This one not a duplicate */
-- 
--              nodupes_iplist[nodupes_count] = (*return_iplist)[i];
--              nodupes_count++;
--          }
--      }
-- 
--      /* Switcheroo with original list */
-- 
--      free(*return_iplist);
-- 
--      *return_iplist = nodupes_iplist;
--      *return_count = nodupes_count;
-+     controllers) return the PDC in the first node and then all domain
-+     controllers including the PDC in the remainder of the list.
-+     Iterating over the list when the PDC is down will cause two
-+     sets of timeouts. */
-+
-+  for (cur = salist; cur; cur = cur->next)
-+  {
-+        struct sockaddr_list *i;
-+
-+        for(i = cur; i->next; i = i->next)
-+        {
-+                if(sa_host_equal(cur->addr,i->next->addr))
-+                {
-+                        struct sockaddr_list *del = i->next;
-+
-+                        i->next = del->next;
-+                        del->next = NULL;
-+                        free_sockaddr_list(del);
-+                }
-+        }
-   }
-- 
--  /* Display some debugging info */
-- 
--  DEBUG(10, ("internal_resolve_name: returning %d addresses: ",
--         *return_count));
-- 
--  for (i = 0; i < *return_count; i++)
--      DEBUGADD(10, ("%s ", inet_ntoa((*return_iplist)[i])));
-- 
--  DEBUG(10, ("\n"));
-- 
--  return result;
-+
-+  return salist;
- }
-+static BOOL internal_resolve_name_netbios(const char *name, int name_type,
-+              struct in_addr **return_iplist, int *return_count)
-+{
-+      struct sockaddr_list *salist, *sl;
-+      int i;
-+
-+      *return_iplist = NULL;
-+      *return_count = 0;
-+
-+      salist = internal_resolve_name(name, name_type);
-+      if(!salist) return False;
-+
-+      for(sl = salist; sl; sl = sl->next)
-+              if(sl->addr->sa_family == AF_INET) ++*return_count;
-+
-+      *return_iplist = (struct in_addr *)
-+              malloc(*return_count * sizeof(struct in_addr));
-+
-+      for(i = 0, sl = salist; i < *return_count; ++i)
-+              if(sl->addr->sa_family == AF_INET)
-+                      *return_iplist[i] =
-+                              ((struct sockaddr_in *)(sl->addr))->sin_addr;
-+
-+      free_sockaddr_list(salist);
-+
-+      return True;
-+}
-+  
-+
- /********************************************************
-- Internal interface to resolve a name into one IP address.
-+ Internal interface to resolve a name into one IP address for NetBIOS.
-  Use this function if the string is either an IP address, DNS
-  or host name or NetBIOS name. This uses the name switch in the
-  smb.conf to determine the order of name resolution.
- *********************************************************/
--BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type)
-+BOOL resolve_name_netbios(const char *name, struct in_addr *return_ip,
-+              int name_type)
- {
--      struct in_addr *ip_list = NULL;
--      int count = 0;
-+      struct sockaddr_list *salist;
-       if (is_ipaddress(name)) {
-               *return_ip = *interpret_addr2(name);
-               return True;
-       }
--      if(internal_resolve_name(name, name_type, &ip_list, &count)) {
--              int i;
-+      if((salist = internal_resolve_name(name, name_type))) {
-+              struct sockaddr_list *sl;
-+              char *ip_str;
-+
-               /* only return valid addresses for TCP connections */
--              for (i=0; i<count; i++) {
--                      char *ip_str = inet_ntoa(ip_list[i]);
--                      if (ip_str &&
-+              for(sl = salist; sl; sl = sl->next) {
-+                      if ( sl->addr->sa_family == AF_INET &&
-+                              (ip_str = inet_ntoa(((struct sockaddr_in *)
-+                                                   (sl->addr))->sin_addr)) &&
-                               strcmp(ip_str, "255.255.255.255") != 0 &&
-                               strcmp(ip_str, "0.0.0.0") != 0) {
--                              *return_ip = ip_list[i];
--                              SAFE_FREE(ip_list);
-+                              *return_ip = ((struct sockaddr_in *)
-+                                              (sl->addr))->sin_addr;
-+                              free_sockaddr_list(salist);
-                               return True;
-                       }
-               }
-+              free_sockaddr_list(salist);
-       }
--      SAFE_FREE(ip_list);
-       return False;
- }
--/**************************************************************************
-- Resolve a name to a list of addresses
--**************************************************************************/
--BOOL resolve_name_2(const char *name, struct in_addr **return_ip, int *count, int name_type)
-+/********************************************************
-+ Function to resolve a name into a list of addresses for
-+ use with SMB. This uses the name switch in the smb.conf
-+ to determine the order of name resolution.
-+*********************************************************/
-+
-+struct sockaddr_list *resolve_name_smb(const char *name, int port)
- {
-+      struct sockaddr_list *salist;
--      return internal_resolve_name(name, name_type, return_ip, count);
-+      if((salist=internal_resolve_name(name, 0x20))) {
-+              struct sockaddr_list *sl = salist, *old = NULL;
-+              char *ip_str;
--} 
-+              /* only return valid addresses for TCP connections */
-+              while(sl)
-+              {
-+                      if ( sl->addr->sa_family == AF_INET &&
-+                             (ip_str = inet_ntoa(((struct sockaddr_in *)
-+                                                 (sl->addr))->sin_addr)) &&
-+                              ( strcmp(ip_str, "255.255.255.255") == 0 ||
-+                                strcmp(ip_str, "0.0.0.0") == 0 ) )
-+                      {
-+                              struct sockaddr_list *next = sl->next;
-+
-+                              SAFE_FREE(sl->addr);
-+                              SAFE_FREE(sl);
-+                              if(old == NULL) salist = next;
-+                              else old->next = next;
-+                              sl = next;
-+                      } else {
-+                              if(port) set_sockaddr_port(sl->addr, port);
-+                              old = sl;
-+                              sl = sl->next;
-+                      }
-+              }
-+      }
-+      return port ? salist : set_default_ports(salist);
-+}
-+  
- /********************************************************
-  resolve a name of format \\server_name or \\ipaddress
-  into a name.  also, cut the \\ from the front for us.
- *********************************************************/
--BOOL resolve_srv_name(const char* srv_name, fstring dest_host,
--                                struct in_addr *ip)
-+struct sockaddr_list *resolve_srv_name(const char* srv_name,
-+              fstring dest_host, int port)
- {
--        BOOL ret;
-         const char *sv_name = srv_name;
-+      struct in_addr ip;
-+      struct sockaddr_list *salist;
-         DEBUG(10,("resolve_srv_name: %s\n", srv_name));
-@@ -1029,8 +1067,11 @@
-         {
-                 extern pstring global_myname;
-                 fstrcpy(dest_host, global_myname);
--                ip = interpret_addr2("127.0.0.1");
--                return True;
-+              inet_aton("127.0.0.1", &ip);
-+              salist = make_sin_list(&ip, 1);
-+              if(port) set_sockaddr_port(salist->addr, port);
-+              else salist = set_default_ports(salist);
-+              return salist;
-         }
-         if (strnequal("\\\\", srv_name, 2))
-@@ -1042,18 +1083,24 @@
-         /* treat the '*' name specially - it is a magic name for the PDC */
-         if (strcmp(dest_host,"*") == 0) {
-                 extern pstring global_myname;
--                ret = resolve_name(lp_workgroup(), ip, 0x1B);
--                lookup_dc_name(global_myname, lp_workgroup(), ip, dest_host);
--        } else {
--                ret = resolve_name(dest_host, ip, 0x20);
-+
-+              if(resolve_name_netbios(lp_workgroup(), &ip, 0x1B))
-+              {
-+                      lookup_dc_name(global_myname, lp_workgroup(),
-+                                      &ip, dest_host);
-+                      return make_singlet_list( &ip, port );
-+              }
-+              return NULL;
-         }
-+
-+      salist = resolve_name_smb(dest_host, port);
-         
-         if (is_ipaddress(dest_host))
-         {
-                 fstrcpy(dest_host, "*SMBSERVER");
-         }
-         
--        return ret;
-+        return salist;
- }
-@@ -1066,12 +1113,12 @@
-       struct in_addr *ip_list = NULL;
-       int count = 0;
--      if (internal_resolve_name(group, 0x1D, &ip_list, &count)) {
-+      if (internal_resolve_name_netbios(group, 0x1D, &ip_list, &count)) {
-               *master_ip = ip_list[0];
-               SAFE_FREE(ip_list);
-               return True;
-       }
--      if(internal_resolve_name(group, 0x1B, &ip_list, &count)) {
-+      if(internal_resolve_name_netbios(group, 0x1B, &ip_list, &count)) {
-               *master_ip = ip_list[0];
-               SAFE_FREE(ip_list);
-               return True;
-@@ -1309,7 +1356,7 @@
-               struct in_addr *return_iplist = NULL;
-               if (! *pserver)
--                      return internal_resolve_name(group, name_type, ip_list, count);
-+                      return internal_resolve_name_netbios(group, name_type, ip_list, count);
-               p = pserver;
-               while (next_token(&p,name,LIST_SEP,sizeof(name))) {
-@@ -1318,14 +1365,14 @@
-                                * Use 1C followed by 1B. This shouldn't work but with
-                                * broken WINS servers it might. JRA.
-                                */
--                              if (!pdc_only && internal_resolve_name(group, 0x1C, ip_list, count))
-+                              if (!pdc_only && internal_resolve_name_netbios(group, 0x1C, ip_list, count))
-                                       return True;
--                              return internal_resolve_name(group, 0x1B, ip_list, count);
-+                              return internal_resolve_name_netbios(group, 0x1B, ip_list, count);
-                       }
-                       num_addresses++;
-               }
-               if (num_addresses == 0)
--                      return internal_resolve_name(group, name_type, ip_list, count);
-+                      return internal_resolve_name_netbios(group, name_type, ip_list, count);
-               return_iplist = (struct in_addr *)malloc(num_addresses * sizeof(struct in_addr));
-               if(return_iplist == NULL) {
-@@ -1337,7 +1384,7 @@
-               while (next_token(&p,name,LIST_SEP,sizeof(name))) {
-                       struct in_addr *more_ip, *tmp;
-                       int count_more;
--                      if (resolve_name_2( name, &more_ip, &count_more, 0x20) == False)
-+                      if (internal_resolve_name_netbios( name, 0x20, &more_ip, &count_more ) == False)
-                               continue;
-                       tmp = (struct in_addr *)realloc(return_iplist,(num_addresses + count_more) * sizeof(struct in_addr));
-                       if (return_iplist == NULL) {
-@@ -1355,7 +1402,7 @@
-               *ip_list = return_iplist;
-               return (*count != 0);
-       } else
--              return internal_resolve_name(group, name_type, ip_list, count);
-+              return internal_resolve_name_netbios(group, name_type, ip_list, count);
- }
- /********************************************************
-@@ -1364,5 +1411,5 @@
- BOOL get_lmb_list(struct in_addr **ip_list, int *count)
- {
--      return internal_resolve_name( MSBROWSE, 0x1, ip_list, count);
-+      return internal_resolve_name_netbios( MSBROWSE, 0x1, ip_list, count);
- }
-diff -ur samba-2.2.8a/source/libsmb/passchange.c samba-2.2.8a+IPv6-20030712/source/libsmb/passchange.c
---- samba-2.2.8a/source/libsmb/passchange.c    2000-01-07 01:55:34.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/libsmb/passchange.c      2003-07-12 22:28:30.000000000 -0400
-@@ -33,11 +33,11 @@
- {
-       struct nmb_name calling, called;
-       struct cli_state cli;
--      struct in_addr ip;
-+      struct sockaddr_list *dest_addrs;
-       *err_str = '\0';
--      if(!resolve_name( remote_machine, &ip, 0x20)) {
-+      if(!(dest_addrs = resolve_name_smb(remote_machine, 0))) {
-               slprintf(err_str, err_str_len-1, "unable to find an IP address for machine %s.\n",
-                       remote_machine );
-               return False;
-@@ -45,9 +45,11 @@
-  
-       ZERO_STRUCT(cli);
-  
--      if (!cli_initialise(&cli) || !cli_connect(&cli, remote_machine, &ip)) {
-+      if (!cli_initialise(&cli) ||
-+                      !cli_connect(&cli, remote_machine, dest_addrs)) {
-               slprintf(err_str, err_str_len-1, "unable to connect to SMB server on machine %s. Error was : %s.\n",
-                       remote_machine, cli_errstr(&cli) );
-+              free_sockaddr_list(dest_addrs);
-               return False;
-       }
-   
-diff -ur samba-2.2.8a/source/nmbd/nmbd_synclists.c samba-2.2.8a+IPv6-20030712/source/nmbd/nmbd_synclists.c
---- samba-2.2.8a/source/nmbd/nmbd_synclists.c  2003-03-14 16:34:48.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/nmbd/nmbd_synclists.c    2003-07-12 22:28:30.000000000 -0400
-@@ -68,6 +68,7 @@
-       extern fstring local_machine;
-       fstring unix_workgroup;
-       static struct cli_state cli;
-+      struct sockaddr_list *dest_addrs;
-       uint32 local_type = local ? SV_TYPE_LOCAL_LIST_ONLY : 0;
-       struct nmb_name called, calling;
-@@ -75,7 +76,9 @@
-        * Patch from Andy Levine andyl@epicrealm.com.
-        */
--      if (!cli_initialise(&cli) || !cli_set_port(&cli, 139) || !cli_connect(&cli, name, &ip)) {
-+      dest_addrs = make_singlet_list(&ip, 0);
-+      if (!cli_initialise(&cli) || !cli_connect(&cli, name, dest_addrs)) {
-+              free_sockaddr_list(dest_addrs);
-               return;
-       }
-diff -ur samba-2.2.8a/source/rpcclient/rpcclient.c samba-2.2.8a+IPv6-20030712/source/rpcclient/rpcclient.c
---- samba-2.2.8a/source/rpcclient/rpcclient.c  2003-03-14 16:34:49.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/rpcclient/rpcclient.c    2003-07-12 22:28:30.000000000 -0400
-@@ -743,7 +743,7 @@
-       
-       /* Resolve the IP address */
--      if (!resolve_name(server, &server_ip, 0x20))  {
-+      if (!resolve_name_netbios(server, &server_ip, 0x20))  {
-               DEBUG(1,("Unable to resolve %s\n", server));
-               return 1;
-       }
-diff -ur samba-2.2.8a/source/rpc_client/cli_spoolss_notify.c samba-2.2.8a+IPv6-20030712/source/rpc_client/cli_spoolss_notify.c
---- samba-2.2.8a/source/rpc_client/cli_spoolss_notify.c        2003-03-14 16:34:48.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/rpc_client/cli_spoolss_notify.c  2003-07-12 22:28:30.000000000 -0400
-@@ -75,25 +75,14 @@
-               return False;
-       }
--      if(!resolve_name( remote_machine, &cli->dest_ip, 0x20)) {
--              DEBUG(0,("connect_to_client: Can't resolve address for %s\n", remote_machine));
--              cli_shutdown(cli);
--      return False;
--      }
--
--      if (ismyip(cli->dest_ip)) {
--              DEBUG(0,("connect_to_client: Machine %s is one of our addresses. Cannot add to ourselves.\n", remote_machine));
--              cli_shutdown(cli);
--              return False;
--      }
--
--      if (!cli_connect(cli, remote_machine, &cli->dest_ip)) {
-+      if (!cli_connect(cli, remote_machine, NULL)) {
-               DEBUG(0,("connect_to_client: unable to connect to SMB server on machine %s. Error was : %s.\n", remote_machine, cli_errstr(cli) ));
-               cli_shutdown(cli);
-               return False;
-       }
-   
--      if (!attempt_netbios_session_request(cli, global_myname, remote_machine, &cli->dest_ip)) {
-+      if (!attempt_netbios_session_request(cli, global_myname,
-+                              remote_machine)) {
-               DEBUG(0,("connect_to_client: machine %s rejected the NetBIOS session request.\n", 
-                       remote_machine));
-               cli_shutdown(cli);
-diff -ur samba-2.2.8a/source/rpc_client/cli_trust.c samba-2.2.8a+IPv6-20030712/source/rpc_client/cli_trust.c
---- samba-2.2.8a/source/rpc_client/cli_trust.c 2003-03-14 16:34:48.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/rpc_client/cli_trust.c   2003-07-12 22:28:30.000000000 -0400
-@@ -53,27 +53,14 @@
-     return False;
-   }
--  if(!resolve_name( remote_machine, &cli.dest_ip, 0x20)) {
--    DEBUG(0,("modify_trust_password: Can't resolve address for %s\n", remote_machine));
--    cli_shutdown(&cli);
--    return False;
--  }
--
--  if (ismyip(cli.dest_ip)) {
--    DEBUG(0,("modify_trust_password: Machine %s is one of our addresses. Cannot add \
--to ourselves.\n", remote_machine));
--    cli_shutdown(&cli);
--    return False;
--  }
--
--  if (!cli_connect(&cli, remote_machine, &cli.dest_ip)) {
-+  if (!cli_connect(&cli, remote_machine, NULL)) {
-     DEBUG(0,("modify_trust_password: unable to connect to SMB server on \
- machine %s. Error was : %s.\n", remote_machine, cli_errstr(&cli) ));
-     cli_shutdown(&cli);
-     return False;
-   }
-   
--  if (!attempt_netbios_session_request(&cli, global_myname, remote_machine, &cli.dest_ip)) {
-+  if (!attempt_netbios_session_request(&cli, global_myname, remote_machine)) {
-     DEBUG(0,("modify_trust_password: machine %s rejected the NetBIOS session request.\n", 
-       remote_machine ));
-     cli_shutdown(&cli);
-diff -ur samba-2.2.8a/source/smbd/password.c samba-2.2.8a+IPv6-20030712/source/smbd/password.c
---- samba-2.2.8a/source/smbd/password.c        2003-04-06 21:54:00.000000000 -0400
-+++ samba-2.2.8a+IPv6-20030712/source/smbd/password.c  2003-07-12 22:28:30.000000000 -0400
-@@ -1015,7 +1015,7 @@
- {
-       struct cli_state *cli;
-       fstring desthost;
--      struct in_addr dest_ip;
-+      struct sockaddr_list *dest_addrs;
-       char *pserver;
-       const char *p;
-       BOOL connected_ok = False;
-@@ -1032,21 +1032,23 @@
-               standard_sub_basic(desthost,sizeof(desthost));
-               strupper(desthost);
--              if(!resolve_name( desthost, &dest_ip, 0x20)) {
-+              if(!(dest_addrs = resolve_name_smb(desthost, 0))) {
-                       DEBUG(1,("server_cryptkey: Can't resolve address for %s\n",desthost));
-                       continue;
-               }
-+#if 0
-               if (ismyip(dest_ip)) {
-                       DEBUG(1,("Password server loop - disabling password server %s\n",desthost));
-                       continue;
-               }
-+#endif
--              if (cli_connect(cli, desthost, &dest_ip)) {
-+              if (cli_connect(cli, desthost, dest_addrs)) {
-                       DEBUG(3,("connected to password server %s\n",desthost));
-                       connected_ok = True;
-                       break;
--              }
-+              } else free_sockaddr_list(dest_addrs);
-       }
-       SAFE_FREE(pserver);
-@@ -1057,7 +1059,7 @@
-               return NULL;
-       }
--      if (!attempt_netbios_session_request(cli, global_myname, desthost, &dest_ip)) {
-+      if (!attempt_netbios_session_request(cli, global_myname, desthost)) {
-               cli_shutdown(cli);
-               return NULL;
-       }
-@@ -1223,7 +1225,7 @@
- static BOOL connect_to_domain_password_server(struct cli_state **ppcli, 
-                                               char *server, unsigned char *trust_passwd)
- {
--      struct in_addr dest_ip;
-+      struct sockaddr_list *dest_addrs;
-       fstring remote_machine;
-       struct cli_state *pcli = NULL;
-@@ -1234,7 +1236,7 @@
-               return False;
-       }
--      if (is_ipaddress(server)) {
-+      if (is_ipv4address(server)) {
-               struct in_addr to_ip;
-               /* we shouldn't have 255.255.255.255 forthe IP address of a password server anyways */
-@@ -1256,18 +1258,20 @@
-       standard_sub_basic(remote_machine,sizeof(remote_machine));
-       strupper(remote_machine);
--      if(!resolve_name( remote_machine, &dest_ip, 0x20)) {
-+      if(!(dest_addrs = resolve_name_smb(remote_machine, 0))) {
-               DEBUG(1,("connect_to_domain_password_server: Can't resolve address for %s\n", remote_machine));
-               cli_shutdown(pcli);
-               return False;
-       }
-   
-+#if 0
-       if (ismyip(dest_ip)) {
-               DEBUG(1,("connect_to_domain_password_server: Password server loop - not using password server %s\n",
-                       remote_machine));
-               cli_shutdown(pcli);
-               return False;
-       }
-+#endif
-       /* we use a mutex to prevent two connections at once - when a NT PDC gets
-               two connections where one hasn't completed a negprot yet it will send a
-@@ -1278,15 +1282,16 @@
-               return False;
-       }
--      if (!cli_connect(pcli, remote_machine, &dest_ip)) {
-+      if (!cli_connect(pcli, remote_machine, dest_addrs)) {
-               DEBUG(0,("connect_to_domain_password_server: unable to connect to SMB server on \
- machine %s. Error was : %s.\n", remote_machine, cli_errstr(pcli) ));
-+              free_sockaddr_list(dest_addrs);
-               cli_shutdown(pcli);
-               release_server_mutex();
-               return False;
-       }
-   
--      if (!attempt_netbios_session_request(pcli, global_myname, remote_machine, &dest_ip)) {
-+      if (!attempt_netbios_session_request(pcli, global_myname, remote_machine)) {
-               DEBUG(0,("connect_to_password_server: machine %s rejected the NetBIOS \
- session request. Error was : %s.\n", remote_machine, cli_errstr(pcli) ));
-               cli_shutdown(pcli);
-diff -ur samba-2.2.8a/source/smbwrapper/smbw.c samba-2.2.8a+IPv6-20030712/source/smbwrapper/smbw.c
---- samba-2.2.8a/source/smbwrapper/smbw.c      2002-04-30 09:28:32.000000000 -0400
-+++ samba-2.2.8a+IPv6-20030712/source/smbwrapper/smbw.c        2003-07-12 22:28:30.000000000 -0400
-@@ -261,9 +261,7 @@
- {
-       fstring server;
-       char *p;
--      struct in_addr *ip_list = NULL;
--      int count = 0;
--      int i;
-+      struct sockaddr_list *wglist, *wg;
-       /* first off see if an existing workgroup name exists */
-       p = smbw_getshared("WORKGROUP");
-@@ -273,24 +271,29 @@
-       if (smbw_server(server, "IPC$")) return p;
-       /* go looking for workgroups */
--      if (!name_resolve_bcast(MSBROWSE, 1, &ip_list, &count)) {
-+      if (!(wglist = name_resolve_bcast(MSBROWSE, 1))) {
-               DEBUG(1,("No workgroups found!"));
-               return p;
-       }
--      for (i=0;i<count;i++) {
-+      for(wg = wglist; wg; wg = wg->next)
-+      {
-               static fstring name;
--              if (name_status_find("*", 0, 0x1d, ip_list[i], name)) {
-+
-+              if(wg->addr->sa_family != AF_INET) continue;
-+              if (name_status_find("*", 0, 0x1d, ((struct sockaddr_in *)
-+                                              (wg->addr))->sin_addr, name))
-+              {
-                       slprintf(server, sizeof(server), "%s#1D", name);
-                       if (smbw_server(server, "IPC$")) {
-                               smbw_setshared("WORKGROUP", name);
--                              SAFE_FREE(ip_list);
-+                              free_sockaddr_list(wglist);
-                               return name;
-                       }
-               }
-       }
--      SAFE_FREE(ip_list);
-+      free_sockaddr_list(wglist);
-       return p;
- }
-@@ -448,9 +451,8 @@
-       char *p, *server_n = server;
-       fstring group;
-       pstring ipenv;
--      struct in_addr ip;
-+      struct sockaddr_list *salist;
--      zero_ip(&ip);
-       ZERO_STRUCT(c);
-       get_auth_data_fn(server, share, &workgroup, &username, &password);
-@@ -501,13 +503,15 @@
-  again:
-       slprintf(ipenv,sizeof(ipenv)-1,"HOST_%s", server_n);
--      zero_ip(&ip);
-+      salist = resolve_name_smb((p=smbw_getshared(ipenv)) ? p : server_n, 0);
-+
-       if ((p=smbw_getshared(ipenv))) {
-               ip = *(interpret_addr2(p));
-       }
-       /* have to open a new connection */
--      if (!cli_initialise(&c) || !cli_connect(&c, server_n, &ip)) {
-+      if (!cli_initialise(&c) || !cli_connect(&c, server_n, salist)) {
-+              free_sockaddr_list(salist);
-               errno = ENOENT;
-               return NULL;
-       }
-@@ -550,7 +554,7 @@
-               return NULL;
-       }
--      smbw_setshared(ipenv,inet_ntoa(ip));
-+      smbw_setshared(ipenv,print_sockaddr(c.connected_addr->addr));
-       
-       DEBUG(4,(" tconx ok\n"));
-diff -ur samba-2.2.8a/source/utils/locktest2.c samba-2.2.8a+IPv6-20030712/source/utils/locktest2.c
---- samba-2.2.8a/source/utils/locktest2.c      2002-04-30 09:28:37.000000000 -0400
-+++ samba-2.2.8a+IPv6-20030712/source/utils/locktest2.c        2003-07-12 22:28:30.000000000 -0400
-@@ -156,7 +156,6 @@
-       struct nmb_name called, calling;
-       char *server_n;
-       fstring server;
--      struct in_addr ip;
-       fstring myname;
-       static int count;
-@@ -168,19 +167,14 @@
-       server_n = server;
-       
--      zero_ip(&ip);
--
-       slprintf(myname,sizeof(myname), "lock-%u-%u", getpid(), count++);
-       make_nmb_name(&calling, myname, 0x0);
-       make_nmb_name(&called , server, 0x20);
-  again:
--      zero_ip(&ip);
--
-       /* have to open a new connection */
--      if (!(c=cli_initialise(NULL)) || (cli_set_port(c, 139) == 0) ||
--          !cli_connect(c, server_n, &ip)) {
-+      if (!(c=cli_initialise(NULL)) || !cli_connect(c, server_n, NULL)) {
-               DEBUG(0,("Connection to %s failed\n", server_n));
-               return NULL;
-       }
-diff -ur samba-2.2.8a/source/utils/locktest.c samba-2.2.8a+IPv6-20030712/source/utils/locktest.c
---- samba-2.2.8a/source/utils/locktest.c       2002-04-30 09:28:37.000000000 -0400
-+++ samba-2.2.8a+IPv6-20030712/source/utils/locktest.c 2003-07-12 22:28:30.000000000 -0400
-@@ -114,7 +114,6 @@
-       struct nmb_name called, calling;
-       char *server_n;
-       fstring server;
--      struct in_addr ip;
-       fstring myname;
-       static int count;
-@@ -126,19 +125,14 @@
-       server_n = server;
-       
--      zero_ip(&ip);
--
-       slprintf(myname,sizeof(myname), "lock-%u-%u", getpid(), count++);
-       make_nmb_name(&calling, myname, 0x0);
-       make_nmb_name(&called , server, 0x20);
-  again:
--      zero_ip(&ip);
--
-       /* have to open a new connection */
--      if (!(c=cli_initialise(NULL)) || (cli_set_port(c, 139) == 0) ||
--          !cli_connect(c, server_n, &ip)) {
-+      if (!(c=cli_initialise(NULL)) || !cli_connect(c, server_n, NULL)) {
-               DEBUG(0,("Connection to %s failed\n", server_n));
-               return NULL;
-       }
-diff -ur samba-2.2.8a/source/utils/masktest.c samba-2.2.8a+IPv6-20030712/source/utils/masktest.c
---- samba-2.2.8a/source/utils/masktest.c       2002-04-30 09:28:37.000000000 -0400
-+++ samba-2.2.8a+IPv6-20030712/source/utils/masktest.c 2003-07-12 22:28:30.000000000 -0400
-@@ -164,7 +165,6 @@
-       struct nmb_name called, calling;
-       char *server_n;
-       char *server;
--      struct in_addr ip;
-       server = share+2;
-       share = strchr(server,'\\');
-@@ -175,17 +174,12 @@
-       server_n = server;
-       
--      zero_ip(&ip);
--
-       make_nmb_name(&calling, "masktest", 0x0);
-       make_nmb_name(&called , server, 0x20);
-  again:
--      zero_ip(&ip);
--
-       /* have to open a new connection */
--      if (!(c=cli_initialise(NULL)) || (cli_set_port(c, 139) == 0) ||
--          !cli_connect(c, server_n, &ip)) {
-+      if (!(c=cli_initialise(NULL)) || !cli_connect(c, server_n, NULL)) {
-               DEBUG(0,("Connection to %s failed\n", server_n));
-               return NULL;
-       }
-diff -ur samba-2.2.8a/source/utils/smbcacls.c samba-2.2.8a+IPv6-20030712/source/utils/smbcacls.c
---- samba-2.2.8a/source/utils/smbcacls.c       2003-03-14 16:34:49.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/utils/smbcacls.c 2003-07-12 22:28:30.000000000 -0400
-@@ -714,7 +714,6 @@
- {
-       struct cli_state *c;
-       struct nmb_name called, calling;
--      struct in_addr ip;
-       extern pstring global_myname;
-       fstrcpy(server,share+2);
-@@ -723,18 +722,13 @@
-       *share = 0;
-       share++;
--      zero_ip(&ip);
--
-       make_nmb_name(&calling, global_myname, 0x0);
-       make_nmb_name(&called , server, 0x20);
-  again:
--      zero_ip(&ip);
--
-       /* have to open a new connection */
--      if (!(c=cli_initialise(NULL)) || !cli_connect(c, server, &ip)) {
-+      if (!(c=cli_initialise(NULL)) || !cli_connect(c, server, NULL)) {
-               DEBUG(0,("Connection to %s failed\n", server));
--              cli_shutdown(c);
-               return NULL;
-       }
-diff -ur samba-2.2.8a/source/utils/smbfilter.c samba-2.2.8a+IPv6-20030712/source/utils/smbfilter.c
---- samba-2.2.8a/source/utils/smbfilter.c      2002-02-01 17:15:14.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/utils/smbfilter.c        2003-07-12 22:28:30.000000000 -0400
-@@ -98,15 +98,17 @@
- }
--static void filter_child(int c, struct in_addr dest_ip)
-+static void filter_child(int c, struct sockaddr_list *dest_addrs)
- {
-       int s;
-       /* we have a connection from a new client, now connect to the server */
--      s = open_socket_out(SOCK_STREAM, &dest_ip, 139, LONG_CONNECT_TIMEOUT);
-+      s = open_socket_out(dest_addrs, NULL, LONG_CONNECT_TIMEOUT);
-+      free_sockaddr_list(dest_addrs);
-       if (s == -1) {
--              DEBUG(0,("Unable to connect to %s\n", inet_ntoa(dest_ip)));
-+              DEBUG(0,("Unable to connect to %s\n",
-+                                      print_sockaddr(dest_addrs->addr)));
-               exit(1);
-       }
-@@ -152,7 +154,7 @@
- static void start_filter(char *desthost)
- {
-       int s, c;
--      struct in_addr dest_ip;
-+      struct sockaddr_list *dest_addrs;
-       CatchChild();
-@@ -168,7 +170,7 @@
-               DEBUG(0,("listen failed\n"));
-       }
--      if (!resolve_name(desthost, &dest_ip, 0x20)) {
-+      if (!(dest_addrs = resolve_name_smb(desthost, 0))) {
-               DEBUG(0,("Unable to resolve host %s\n", desthost));
-               exit(1);
-       }
-@@ -188,7 +190,7 @@
-                       if (c != -1) {
-                               if (fork() == 0) {
-                                       close(s);
--                                      filter_child(c, dest_ip);
-+                                      filter_child(c, dest_addrs);
-                                       exit(0);
-                               } else {
-                                       close(c);
-diff -ur samba-2.2.8a/source/utils/smbpasswd.c samba-2.2.8a+IPv6-20030712/source/utils/smbpasswd.c
---- samba-2.2.8a/source/utils/smbpasswd.c      2003-03-14 16:34:49.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/utils/smbpasswd.c        2003-07-12 22:28:30.000000000 -0400
-@@ -350,7 +350,7 @@
-       struct ntuser_creds creds;
-       struct cli_state cli;
-       fstring acct_name;
--      struct in_addr dest_ip;
-+      struct sockaddr_list *dest_addrs = NULL;
-       TALLOC_CTX *mem_ctx;
-       /* rpc variables */
-@@ -379,7 +379,6 @@
-       ZERO_STRUCT(cli);
-       ZERO_STRUCT(creds);
--      ZERO_STRUCT(dest_ip); /* Make sure no nasty surprises */
-       if (!(mem_ctx = talloc_init())) {
-               DEBUG(0, ("Could not initialise talloc context\n"));
-@@ -414,19 +413,20 @@
-                       fprintf(stderr, "Unable to lookup the name for the domain controller for domain %s.\n", domain);
-                       return 1;
-               }
--              dest_ip = ip_list[0];
-+              dest_addrs = make_singlet_list( &ip_list[0], 0 );
-       }
-       make_nmb_name(&called, pdc_name, 0x20);
-       make_nmb_name(&calling, dns_to_netbios_name(global_myname), 0);
--      if (!cli_establish_connection(&cli, pdc_name, &dest_ip, &calling, 
-+      if (!cli_establish_connection(&cli, pdc_name, dest_addrs, &calling, 
-                                     &called, "IPC$", "IPC", False, True)) {
-               if (!NT_STATUS_IS_OK(cli_nt_error(&cli))) {
-                       DEBUG(0, ("Error connecting to %s - %s\n", pdc_name,cli_errstr(&cli)));
-               } else {
-                       DEBUG(0, ("Error connecting to %s\n", pdc_name));
-               }
-+              if( dest_addrs ) free_sockaddr_list( dest_addrs );
-               goto done;
-       }
-@@ -612,6 +612,9 @@
-       if (cli.nt_pipe_fnum)
-               cli_nt_session_close(&cli);
-+      if (cli.dest_addrs)
-+              free_sockaddr_list(cli.dest_addrs);
-+
-       /* Display success or failure */
-       if (retval != 0) {
-diff -ur samba-2.2.8a/source/utils/torture.c samba-2.2.8a+IPv6-20030712/source/utils/torture.c
---- samba-2.2.8a/source/utils/torture.c        2002-04-30 09:28:39.000000000 -0400
-+++ samba-2.2.8a+IPv6-20030712/source/utils/torture.c  2003-07-12 22:28:30.000000000 -0400
-@@ -134,16 +134,13 @@
- static BOOL open_nbt_connection(struct cli_state *c)
- {
-       struct nmb_name called, calling;
--      struct in_addr ip;
-       ZERO_STRUCTP(c);
-       make_nmb_name(&calling, myname, 0x0);
-       make_nmb_name(&called , host, 0x20);
--      zero_ip(&ip);
--
--      if (!cli_initialise(c) || !cli_connect(c, host, &ip)) {
-+      if (!cli_initialise(c) || !cli_connect(c, host, NULL)) {
-               printf("Failed to connect with %s\n", host);
-               return False;
-       }
-diff -ur samba-2.2.8a/source/web/diagnose.c samba-2.2.8a+IPv6-20030712/source/web/diagnose.c
---- samba-2.2.8a/source/web/diagnose.c 2003-02-28 13:47:26.000000000 -0500
-+++ samba-2.2.8a+IPv6-20030712/source/web/diagnose.c   2003-07-12 22:28:30.000000000 -0400
-@@ -52,12 +52,16 @@
- BOOL smbd_running(void)
- {
-       static struct cli_state cli;
-+      struct sockaddr_list *localaddrs;
-       extern struct in_addr loopback_ip;
-       if (!cli_initialise(&cli))
-               return False;
--      if (!cli_connect(&cli, "localhost", &loopback_ip)) {
-+      localaddrs = make_singlet_list(&loopback_ip, 0);
-+      if (!cli_connect(&cli, "localhost", localaddrs))
-+      {
-+              free_sockaddr_list(localaddrs);
-               cli_shutdown(&cli);
-               return False;
-       }
diff --git a/samba-CIFS-extensions.patch b/samba-CIFS-extensions.patch
deleted file mode 100644 (file)
index 2fb4e64..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-diff -Nur samba-2.2.4.orig/source/include/trans2.h samba-2.2.4/source/include/trans2.h
---- samba-2.2.4.orig/source/include/trans2.h   Sun Feb  3 01:46:40 2002
-+++ samba-2.2.4/source/include/trans2.h        Thu Jun 13 15:54:53 2002
-@@ -337,6 +337,15 @@
- #define SMB_UID_NO_CHANGE                  0xFFFFFFFF
- #define SMB_GID_NO_CHANGE                  0xFFFFFFFF
-+#define SMB_SIZE_NO_CHANGE                 0xFFFFFFFFFFFFFFFF
-+#define SMB_SIZE_NO_CHANGE_LO              0xFFFFFFFF
-+#define SMB_SIZE_NO_CHANGE_HI              0xFFFFFFFF
-+
-+#define SMB_TIME_NO_CHANGE                 0xFFFFFFFFFFFFFFFF
-+#define SMB_TIME_NO_CHANGE_LO              0xFFFFFFFF
-+#define SMB_TIME_NO_CHANGE_HI              0xFFFFFFFF
-+
-+
- /*
- Offset Size         Name
- 0      LARGE_INTEGER EndOfFile                File size
-diff -Nur samba-2.2.4.orig/source/smbd/trans2.c samba-2.2.4/source/smbd/trans2.c
---- samba-2.2.4.orig/source/smbd/trans2.c      Fri May  3 03:03:49 2002
-+++ samba-2.2.4/source/smbd/trans2.c   Thu Jun 13 15:54:53 2002
-@@ -417,6 +417,21 @@
- }
- /****************************************************************************
-+checks for SMB_TIME_NO_CHANGE and if not found
-+calls interpret_long_date
-+****************************************************************************/
-+time_t interpret_long_unix_date(char *p)
-+{
-+      DEBUG(1,("interpret_long_unix_date\n"));
-+      if(IVAL(p,0) == SMB_TIME_NO_CHANGE_LO &&
-+         IVAL(p,4) == SMB_TIME_NO_CHANGE_HI) {
-+              return -1;
-+      } else {
-+              return interpret_long_date(p);
-+      }
-+}
-+
-+/****************************************************************************
-  Get a level dependent lanman2 dir entry.
- ****************************************************************************/
-@@ -2575,16 +2590,19 @@
-                       if (total_data < 100)
-                               return(ERROR_DOS(ERRDOS,ERRinvalidparam));
--                      size=IVAL(pdata,0); /* first 8 Bytes are size */
-+                      if(IVAL(pdata, 0) != SMB_SIZE_NO_CHANGE_LO &&
-+                         IVAL(pdata, 4) != SMB_SIZE_NO_CHANGE_HI) {
-+                              size=IVAL(pdata,0); /* first 8 Bytes are size */
- #ifdef LARGE_SMB_OFF_T
--                      size |= (((SMB_OFF_T)IVAL(pdata,4)) << 32);
-+                              size |= (((SMB_OFF_T)IVAL(pdata,4)) << 32);
- #else /* LARGE_SMB_OFF_T */
--                      if (IVAL(pdata,4) != 0) /* more than 32 bits? */
--                              return ERROR_DOS(ERRDOS,ERRunknownlevel);
-+                              if (IVAL(pdata,4) != 0) /* more than 32 bits? */
-+                                      return ERROR_DOS(ERRDOS,ERRunknownlevel);
- #endif /* LARGE_SMB_OFF_T */
-+                      }
-                       pdata+=24;          /* ctime & st_blocks are not changed */
--                      tvs.actime = interpret_long_date(pdata); /* access_time */
--                      tvs.modtime = interpret_long_date(pdata+8); /* modification_time */
-+                      tvs.actime = interpret_long_unix_date(pdata); /* access_time */
-+                      tvs.modtime = interpret_long_unix_date(pdata+8); /* modification_time */
-                       pdata+=16;
-                       set_owner = (uid_t)IVAL(pdata,0);
-                       pdata += 8;
diff --git a/samba-DESTDIR-fix.patch b/samba-DESTDIR-fix.patch
deleted file mode 100644 (file)
index 002544c..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
---- ./source/Makefile.in.org   Tue Jun  4 10:39:47 2002
-+++ ./source/Makefile.in       Tue Jun  4 11:20:07 2002
-@@ -62,10 +62,10 @@
- SWATDIR = $(DESTDIR)@swatdir@
- # the directory where lock files go
--LOCKDIR = @lockdir@
-+LOCKDIR = $(DESTDIR)@lockdir@
- # the directorty where pid files go
--PIDDIR = @piddir@
-+PIDDIR = $(DESTDIR)@piddir@
- # libsmbclient support here
- BLDSHARED = @BLDSHARED@
diff --git a/samba-DESTDIR.patch b/samba-DESTDIR.patch
deleted file mode 100644 (file)
index 28dc05c..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-diff -urN samba-2.2.1.org/source/Makefile.in samba-2.2.1/source/Makefile.in
---- samba-2.2.1.org/source/Makefile.in Sun Jul  8 22:29:34 2001
-+++ samba-2.2.1/source/Makefile.in     Wed Jul 11 20:06:00 2001
-@@ -28,16 +28,16 @@
- top_builddir=.
- SHELL=/bin/sh
--BASEDIR= @prefix@
--BINDIR = @bindir@
--DATADIR = @datadir@
-+BASEDIR= $(DESTDIR)@prefix@
-+BINDIR = $(DESTDIR)@bindir@
-+DATADIR = $(DESTDIR)@datadir@
-+
- # sbindir is mapped to bindir when compiling SAMBA in 2.0.x compatibility mode.
--SBINDIR = @sbindir@
--LIBDIR = @libdir@
--VARDIR = @localstatedir@
--CONFIGDIR = @configdir@
--MANDIR = @mandir@
--INCLUDEDIR = @includedir@
-+SBINDIR = $(DESTDIR)@sbindir@
-+LIBDIR = $(DESTDIR)@libdir@
-+VARDIR = $(DESTDIR)@localstatedir@
-+CONFIGDIR = $(DESTDIR)@configdir@
-+MANDIR = $(DESTDIR)@mandir@
- # The permissions to give the executables
- INSTALLPERMS = 0755
-@@ -57,7 +57,7 @@
- TDB_PASSWD_FILE = $(PRIVATEDIR)/smbpasswd.tdb
- # This is where SWAT images and help files go
--SWATDIR = @swatdir@
-+SWATDIR = $(DESTDIR)@swatdir@
- # the directory where lock files go
- LOCKDIR = @lockdir@
-diff -urN samba-2.2.1.org/source/script/installbin.sh samba-2.2.1/source/script/installbin.sh
---- samba-2.2.1.org/source/script/installbin.sh        Fri Jan 12 20:28:02 2001
-+++ samba-2.2.1/source/script/installbin.sh    Wed Jul 11 20:06:59 2001
-@@ -13,7 +13,7 @@
- for d in $BASEDIR $BINDIR $LIBDIR $VARDIR $BASEDIR/private; do
- if [ ! -d $d ]; then
--mkdir $d
-+mkdir -p $d
- if [ ! -d $d ]; then
-   echo Failed to make directory $d
-   exit 1
-@@ -34,7 +34,7 @@
-  # this is a special case, mount needs this in a specific location
-  if [ $p2 = smbmount ]; then
--   ln -sf $BINDIR/$p2 /sbin/mount.smbfs
-+   ln -sf /usr/sbin/$p2 $DESTDIR/$SBINDIR/mount.smbfs
-  fi
- done
-diff -urN samba-2.2.1.org/source/script/installcp.sh samba-2.2.1/source/script/installcp.sh
---- samba-2.2.1.org/source/script/installcp.sh Mon Dec 13 14:27:43 1999
-+++ samba-2.2.1/source/script/installcp.sh     Wed Jul 11 20:08:20 2001
-@@ -12,7 +12,7 @@
- echo Installing codepage files in $CODEPAGEDIR
- for d in $LIBDIR $CODEPAGEDIR; do
- if [ ! -d $d ]; then
--mkdir $d
-+mkdir -p $d
- if [ ! -d $d ]; then
-   echo Failed to make directory $d
-   exit 1
-@@ -23,12 +23,12 @@
- for p in $*; do
-  if [ -f ${srcdir}/codepages/codepage_def.$p ]; then
-    echo Creating codepage file $CODEPAGEDIR/codepage.$p
--   $BINDIR/make_smbcodepage c $p ${srcdir}/codepages/codepage_def.$p $CODEPAGEDIR/codepage.$p
-- fi
-+${srcdir}/bin/make_smbcodepage c $p ${srcdir}/codepages/codepage_def.$p $CODEPAGEDIR/codepage.$p 
-+fi
-  if [ -f ${srcdir}/codepages/CP${p}.TXT ]; then
-    echo Creating unicode map $CODEPAGEDIR/unicode_map.$p
--   $BINDIR/make_unicodemap $p ${srcdir}/codepages/CP${p}.TXT $CODEPAGEDIR/unicode_map.$p
-- fi
-+${srcdir}/bin/make_unicodemap $p ${srcdir}/codepages/CP${p}.TXT $CODEPAGEDIR/unicode_map.$p 
-+fi
- done
-diff -urN samba-2.2.1.org/source/script/installman.sh samba-2.2.1/source/script/installman.sh
---- samba-2.2.1.org/source/script/installman.sh        Tue Nov 17 21:50:05 1998
-+++ samba-2.2.1/source/script/installman.sh    Wed Jul 11 20:08:49 2001
-@@ -11,7 +11,7 @@
- for d in $MANDIR $MANDIR/man1 $MANDIR/man5 $MANDIR/man7 $MANDIR/man8; do
- if [ ! -d $d ]; then
--mkdir $d
-+mkdir -p $d
- if [ ! -d $d ]; then
-   echo Failed to make directory $d, does $USER have privileges?
-   exit 1
-diff -urN samba-2.2.1.org/source/script/installscripts.sh samba-2.2.1/source/script/installscripts.sh
---- samba-2.2.1.org/source/script/installscripts.sh    Mon Dec 13 14:27:44 1999
-+++ samba-2.2.1/source/script/installscripts.sh        Wed Jul 11 20:09:11 2001
-@@ -12,8 +12,8 @@
- for d in $BINDIR; do
-  if [ ! -d $d ]; then
--  mkdir $d
--  if [ ! -d $d ]; then
-+ mkdir -p $d  
-+ if [ ! -d $d ]; then
-     echo Failed to make directory $d
-     echo Have you run installbin first?
-     exit 1
-diff -urN samba-2.2.1.org/source/script/installswat.sh samba-2.2.1/source/script/installswat.sh
---- samba-2.2.1.org/source/script/installswat.sh       Mon Apr 16 03:34:11 2001
-+++ samba-2.2.1/source/script/installswat.sh   Wed Jul 11 20:09:59 2001
-@@ -10,7 +10,7 @@
- for d in $SWATDIR $SWATDIR/help $SWATDIR/images $SWATDIR/include; do
-     if [ ! -d $d ]; then
--      mkdir $d
-+      mkdir -p $d
-       if [ ! -d $d ]; then
-           echo Failed to make directory $d, does $USER have privileges?
-           exit 1
-@@ -69,8 +69,8 @@
-     for d in $BOOKDIR $BOOKDIR/figs $BOOKDIR/gifs; do
-         if [ ! -d $d ]; then
--            mkdir $d
--            if [ ! -d $d ]; then
-+        mkdir -p $d    
-+              if [ ! -d $d ]; then
-                 echo Failed to make directory $d, does $USER have privileges?
-                 exit 1
-             fi
diff --git a/samba-allow-suid.patch b/samba-allow-suid.patch
deleted file mode 100644 (file)
index 5b0d5bf..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- samba-2.2.8a/source/libsmb/clientgen.c~    2002-12-10 15:58:15.000000000 +0100
-+++ samba-2.2.8a/source/libsmb/clientgen.c     2003-09-11 19:00:11.000000000 +0200
-@@ -170,7 +170,9 @@
-       /* Check the effective uid - make sure we are not setuid */
-       if (is_setuid_root()) {
-               DEBUG(0,("libsmb based programs must *NOT* be setuid root.\n"));
-+              /* Warn but don't exit, amanda must be setuid and needs smb
-               return NULL;
-+              */
-       }
-       if (!cli) {
diff --git a/samba-autoconf.patch b/samba-autoconf.patch
deleted file mode 100644 (file)
index 4b3b797..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -urN samba-2.2.0.org/source/configure.in samba-2.2.0/source/configure.in
---- samba-2.2.0.org/source/configure.in        Wed Apr 18 01:27:35 2001
-+++ samba-2.2.0/source/configure.in    Wed Apr 18 01:29:23 2001
-@@ -483,7 +483,7 @@
-     AC_CHECK_HEADERS(readline/history.h)
-     AC_CHECK_HEADERS(readline.h readline/readline.h,[
--      for termlib in ncurses curses termcap terminfo termlib; do
-+      for termlib in tinfo ncurses curses termcap terminfo termlib; do
-        AC_CHECK_LIB(${termlib}, tgetent, [TERMLIBS="-l${termlib}"; break])
-       done
-       AC_CHECK_LIB(readline, rl_callback_handler_install,
-@@ -510,7 +510,7 @@
-     AC_CHECK_HEADERS(readline/history.h)
-     AC_CHECK_HEADERS(readline.h readline/readline.h,[
--      for termlib in ncurses curses termcap terminfo termlib; do
-+      for termlib in tinfo ncurses curses termcap terminfo termlib; do
-        AC_CHECK_LIB(${termlib}, tgetent, [TERMLIBS="-l${termlib}"; break])
-       done
-       AC_CHECK_LIB(readline, rl_callback_handler_install,
diff --git a/samba-cap.patch b/samba-cap.patch
deleted file mode 100644 (file)
index 12992c4..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nur samba-2.0.0/source/include/includes.h samba-2.0.0.pld/source/include/includes.h
---- samba-2.0.0/source/include/includes.h      Tue Jan 26 18:43:00 1999
-+++ samba-2.0.0.pld/source/include/includes.h  Tue Jan 26 18:42:43 1999
-@@ -310,7 +310,7 @@
- #endif
- #ifdef HAVE_SYS_CAPABILITY_H
--#include <sys/capability.h>
-+ /* #include <sys/capability.h> .. not works with glibc-2.0.109 ;( */
- #endif
- #if defined(HAVE_RPC_RPC_H)
diff --git a/samba-config.patch b/samba-config.patch
deleted file mode 100644 (file)
index 116ca81..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-diff -urN samba-2.2.1.org/source/configure.in samba-2.2.1/source/configure.in
---- samba-2.2.1.org/source/configure.in        Tue Jul 10 02:12:50 2001
-+++ samba-2.2.1/source/configure.in    Wed Jul 11 20:00:03 2001
-@@ -656,6 +656,11 @@
-               AC_DEFINE(HAVE_STRCASECMP))
- fi
-+# Check for yp_get_default_domain in -lnsl (linux glibc2.1)
-+#
-+AC_LIBTESTFUNC(nsl, yp_get_default_domain)
-+#
-+
- #
- # Check for the functions putprpwnam, set_auth_parameters,
- # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
-@@ -1630,7 +1635,7 @@
-   yes)
-     AC_MSG_RESULT(yes)
-     AC_DEFINE(WITH_PAM)
--    LIBS="$LIBS -lpam"
-+    LIBS="$LIBS -ldl -lpam -lpamc"
-     with_pam_for_crypt=yes
-     ;;
-   *)
-diff -urN samba-2.2.1.org/source/smbwrapper/smbsh.in samba-2.2.1/source/smbwrapper/smbsh.in
---- samba-2.2.1.org/source/smbwrapper/smbsh.in Wed Oct  7 06:43:09 1998
-+++ samba-2.2.1/source/smbwrapper/smbsh.in     Wed Jul 11 20:00:35 2001
-@@ -1,6 +1,6 @@
- #! /bin/sh
--SMBW_LIBDIR=${SMBW_LIBDIR-@builddir@/smbwrapper}
-+SMBW_LIBDIR=${SMBW_LIBDIR-/lib/security}
- if [ ! -f ${SMBW_LIBDIR}/smbwrapper.so ]; then
-     echo You need to set LIBDIR in smbsh
diff --git a/samba-debug-0-suxorz.patch b/samba-debug-0-suxorz.patch
deleted file mode 100644 (file)
index 585523f..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---- samba-2.2.1a/source/smbd/posix_acls.c~     Fri Jul  6 04:02:02 2001
-+++ samba-2.2.1a/source/smbd/posix_acls.c      Wed Oct  3 03:20:47 2001
-@@ -418,7 +418,7 @@
-       *pgrp = (gid_t)-1;
-       if(security_info_sent == 0) {
--              DEBUG(0,("unpack_nt_owners: no security info sent !\n"));
-+              DEBUG(1,("unpack_nt_owners: no security info sent !\n"));
-               return False;
-       }
---- samba-2.2.1a/source/smbd/oplock.c~ Fri Jul  6 04:02:01 2001
-+++ samba-2.2.1a/source/smbd/oplock.c  Fri Oct  5 21:13:04 2001
-@@ -994,7 +994,7 @@
-     {
-       if(smb_read_error == READ_TIMEOUT)
-       {
--        if( DEBUGLVL( 0 ) )
-+        if( DEBUGLVL( 1 ) )
-         {
-           dbgtext( "request_oplock_break: no response received to oplock " );
-           dbgtext( "break request to pid %d ", (int)share_entry->pid );
diff --git a/samba-manpages_PLD_fixes.patch b/samba-manpages_PLD_fixes.patch
deleted file mode 100644 (file)
index 52510d8..0000000
+++ /dev/null
@@ -1,281 +0,0 @@
---- samba-2.2.4/docs/manpages/nmbd.8   Fri May  3 03:02:05 2002
-+++ samba-2.2.4/docs/manpages/nmbd.8.org       Mon May 20 10:31:37 2002
-@@ -91,7 +91,7 @@
- The default path to this file is compiled into 
- Samba as part of the build process. Common defaults 
--are \fI/usr/local/samba/lib/lmhosts\fR,
-+are \fI/etc/samba/lmhosts\fR,
- \fI/usr/samba/lib/lmhosts\fR or
- \fI/etc/lmhosts\fR. See the  \fIlmhosts(5)\fRman page for details on the 
- contents of this file.
-@@ -149,7 +149,7 @@
- .TP
- \fB-s <configuration file>\fR
- The default configuration file name
--is set at build time, typically as \fI /usr/local/samba/lib/smb.conf\fR, but
-+is set at build time, typically as \fI /etc/samba/smb.conf\fR, but
- this may be changed when Samba is autoconfigured.
- The file specified contains the configuration details
-@@ -180,12 +180,12 @@
- See the UNIX_INSTALL.html
- document for details.
- .TP
--\fB\fI/usr/local/samba/lib/smb.conf\fB\fR
-+\fB\fI/etc/samba/smb.conf\fB\fR
- This is the default location of the
- \fIsmb.conf\fR
- server configuration file. Other common places that systems
- install this file are \fI/usr/samba/lib/smb.conf\fR
--and \fI/etc/smb.conf\fR.
-+and \fI/etc/samba/smb.conf\fR.
- When run as a WINS server (see the
- wins support
-@@ -211,7 +211,7 @@
- .PP
- \fBnmbd\fR will accept SIGHUP, which will cause
- it to dump out its namelists into the file \fInamelist.debug
--\fRin the \fI/usr/local/samba/var/locks\fR
-+\fRin the \fI/var/lock/samba\fR
- directory (or the \fIvar/locks\fR directory configured
- under wherever Samba was configured to install itself). This will also
- cause \fBnmbd\fR to dump out its server database in
---- samba-2.2.4/docs/manpages/smb.conf.5       Fri May  3 03:24:14 2002
-+++ samba-2.2.4/docs/manpages/smb.conf.5.org   Mon May 20 10:28:07 2002
-@@ -1526,7 +1526,7 @@
- Default: \fBnone\fR
- .PP
- .PP
--Example: \fBadd share command = /usr/local/bin/addshare\fR
-+Example: \fBadd share command = /usr/bin/addshare\fR
- .PP
- .TP
- \fBadd user script (G)\fR
-@@ -1569,7 +1569,7 @@
- Default: \fBadd user script = <empty string>
- \fR
--Example: \fBadd user script = /usr/local/samba/bin/add_user 
-+Example: \fBadd user script = /usr/bin/add_user 
- %u\fR
- .TP
- \fBadmin users (S)\fR
-@@ -1802,7 +1802,7 @@
- Default: \fBnone\fR
- .PP
- .PP
--Example: \fBchange share command = /usr/local/bin/addshare\fR
-+Example: \fBchange share command = /usr/bin/addshare\fR
- .PP
- .TP
- \fBcharacter set (G)\fR
-@@ -2037,7 +2037,7 @@
- (allowing you to special case the config files of just a few 
- clients).
--Example: \fBconfig file = /usr/local/samba/lib/smb.conf.%m
-+Example: \fBconfig file = /etc/samba/smb.conf.%m
- \fR.TP
- \fBcopy (S)\fR
- This parameter allows you to "clone" service 
-@@ -2321,7 +2321,7 @@
- Default: \fBnone\fR
- .PP
- .PP
--Example: \fBdelete share command = /usr/local/bin/delshare\fR
-+Example: \fBdelete share command = /usr/bin/delshare\fR
- .PP
- .TP
- \fBdelete user script (G)\fR
-@@ -2367,7 +2367,7 @@
- Default: \fBdelete user script = <empty string>
- \fR
--Example: \fBdelete user script = /usr/local/samba/bin/del_user 
-+Example: \fBdelete user script = /usr/bin/del_user 
- %u\fR
- .TP
- \fBdelete veto files (S)\fR
-@@ -2425,7 +2425,7 @@
- Default: \fBBy default internal routines for 
- determining the disk capacity and remaining space will be used.
- \fR
--Example: \fBdfree command = /usr/local/samba/bin/dfree
-+Example: \fBdfree command = /usr/bin/dfree
- \fR
- Where the script dfree (which must be made executable) could be:
-@@ -3250,7 +3250,7 @@
- Default: \fBno file included\fR
--Example: \fBinclude = /usr/local/samba/lib/admin_smb.conf
-+Example: \fBinclude = /etc/samba/admin_smb.conf
- \fR.TP
- \fBinherit acls (S)\fR
- This parameter can be used to ensure
-@@ -3680,7 +3680,7 @@
- This option takes the standard substitutions, allowing 
- you to have separate log files for each user or machine.
--Example: \fBlog file = /usr/local/samba/var/log.%m
-+Example: \fBlog file = /var/log/samba/log.%m
- \fR.TP
- \fBlog level (G)\fR
- The value of the parameter (an integer) allows 
-@@ -3793,11 +3793,11 @@
- file is recommended.
- The script must be a relative path to the [netlogon] 
--service. If the [netlogon] service specifies a  \fIpath\fR of \fI/usr/local/samba/netlogon
-+service. If the [netlogon] service specifies a  \fIpath\fR of \fI/etc/samba/netlogon
- \fR, and \fBlogon script = STARTUP.BAT\fR, then 
- the file that will be downloaded is:
--\fI/usr/local/samba/netlogon/STARTUP.BAT\fR
-+\fI/etc/samba/netlogon/STARTUP.BAT\fR
- The contents of the batch file are entirely your choice. A 
- suggested command would be to add \fBNET TIME \\\\SERVER /SET 
-@@ -5182,7 +5182,7 @@
- is an example:
- \fBpreexec = csh -c 'echo \\"Welcome to %S!\\" |
--/usr/local/samba/bin/smbclient -M %m -I %I' & \fR
-+/usr/bin/smbclient -M %m -I %I' & \fR
- Of course, this could get annoying after a while :-)
-@@ -5332,7 +5332,7 @@
- and if SAMBA is compiled against libcups, any manually 
- set print command will be ignored.
--Example: \fBprint command = /usr/local/samba/bin/myprintscript
-+Example: \fBprint command = /usr/bin/myprintscript
- %p %s\fR
- .TP
- \fBprint ok (S)\fR
-@@ -5462,7 +5462,7 @@
- Default: \fBNone (set in compile).\fR
- Example: \fBprinter driver file = 
--/usr/local/samba/printers/drivers.def\fR
-+/etc/samba/drivers.def\fR
- .TP
- \fBprinter driver location (S)\fR
- \fBNote :\fRThis is a deprecated 
-@@ -6291,7 +6291,7 @@
- Examples: \fBsource environment = |/etc/smb.conf.sh
- \fR
- Example: \fBsource environment = 
--/usr/local/smb_env_vars\fR
-+/etc/samba/smb_env_vars\fR
- .TP
- \fBssl (G)\fR
- This variable is part of SSL-enabled Samba. This 
-@@ -6321,7 +6321,7 @@
- directory that don't fit into this naming scheme are ignored. You 
- don't need this variable if you don't verify client certificates.
--Default: \fBssl CA certDir = /usr/local/ssl/certs
-+Default: \fBssl CA certDir = /etc/samba/ssl/certs
- \fR.TP
- \fBssl CA certFile (G)\fR
- This variable is part of SSL-enabled Samba. This 
-@@ -6338,7 +6338,7 @@
- simple (you won't need to create the hashed file names). You 
- don't need this variable if you don't verify client certificates.
--Default: \fBssl CA certFile = /usr/local/ssl/certs/trustedCAs.pem
-+Default: \fBssl CA certFile = /etc/samba/ssl/certs/trustedCAs.pem
- \fR.TP
- \fBssl ciphers (G)\fR
- This variable is part of SSL-enabled Samba. This 
-@@ -6359,7 +6359,7 @@
- The certificate in this file is used by  \fBsmbclient(1)\fRif it exists. It's needed 
- if the server requires a client certificate.
--Default: \fBssl client cert = /usr/local/ssl/certs/smbclient.pem
-+Default: \fBssl client cert = /etc/samba/ssl/certs/smbclient.pem
- \fR.TP
- \fBssl client key (G)\fR
- This variable is part of SSL-enabled Samba. This 
-@@ -6370,7 +6370,7 @@
- This is the private key for  \fBsmbclient(1)\fR. It's only needed if the 
- client should have a certificate. 
--Default: \fBssl client key = /usr/local/ssl/private/smbclient.pem
-+Default: \fBssl client key = /etc/samba/ssl/private/smbclient.pem
- \fR.TP
- \fBssl compatibility (G)\fR
- This variable is part of SSL-enabled Samba. This 
-@@ -6989,7 +6989,7 @@
- Default: \fBno username map\fR
--Example: \fBusername map = /usr/local/samba/lib/users.map
-+Example: \fBusername map = /etc/samba/users.map
- \fR.TP
- \fButmp (G)\fR
- This boolean parameter is only available if 
---- samba-2.2.4/docs/manpages/smbd.8   Fri May  3 03:02:07 2002
-+++ samba-2.2.4/docs/manpages/smbd.8.org       Mon May 20 10:28:07 2002
-@@ -190,7 +190,7 @@
- See the UNIX_INSTALL.html
- document for details.
- .TP
--\fB\fI/usr/local/samba/lib/smb.conf\fB\fR
-+\fB\fI/etc/samba/smb.conf\fB\fR
- This is the default location of the
- \fIsmb.conf\fR
- server configuration file. Other common places that systems
---- samba-2.2.4/docs/manpages/swat.8   Fri May  3 03:02:08 2002
-+++ samba-2.2.4/docs/manpages/swat.8.org       Mon May 20 10:28:07 2002
-@@ -47,13 +47,13 @@
- these in: 
- .TP 0.2i
- \(bu
--/usr/local/samba/bin/swat
-+/usr/sbin/swat
- .TP 0.2i
- \(bu
--/usr/local/samba/swat/images/*
-+/usr/share/swat/images/*
- .TP 0.2i
- \(bu
--/usr/local/samba/swat/help/*
-+/usr/share/swat/help/*
- .SS "INETD INSTALLATION"
- .PP
- You need to edit your \fI/etc/inetd.conf
-@@ -78,7 +78,7 @@
- add a line like this: 
- .PP
- \fBswat stream tcp nowait.400 root
--/usr/local/samba/bin/swat swat\fR
-+/usr/sbin/swat swat\fR
- .PP
- One you have edited \fI/etc/services\fR 
- and \fI/etc/inetd.conf\fR you need to send a 
-@@ -104,7 +104,7 @@
- (e.g., swat) to service port (e.g., 901) and protocol type 
- (e.g., tcp). 
- .TP
--\fB\fI/usr/local/samba/lib/smb.conf\fB\fR
-+\fB\fI/etc/samba/smb.conf\fB\fR
- This is the default location of the \fIsmb.conf(5)
- \fRserver configuration file that swat edits. Other 
- common places that systems install this file are \fI /usr/samba/lib/smb.conf\fR and \fI/etc/smb.conf
---- samba-2.2.4/docs/manpages/winbindd.8       Fri May  3 03:02:08 2002
-+++ samba-2.2.4/docs/manpages/winbindd.8.org   Mon May 20 10:28:07 2002
-@@ -364,7 +364,7 @@
- Storage for the Windows NT rid to UNIX user/group 
- id mapping. The lock directory is specified when Samba is initially 
- compiled using the \fI--with-lockdir\fR option.
--This directory is by default \fI/usr/local/samba/var/locks
-+This directory is by default \fI/var/lock/samba
- \fR\&. 
- .TP
- \fB$LOCKDIR/winbindd_cache.tdb\fR
diff --git a/samba-nmbd_socket.patch b/samba-nmbd_socket.patch
deleted file mode 100644 (file)
index 1d9c336..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -durN samba-2.0.7.orig/source/nmbd/nmbd_packets.c samba-2.0.7/source/nmbd/nmbd_packets.c
---- samba-2.0.7.orig/source/nmbd/nmbd_packets.c        Wed Apr 26 01:06:58 2000
-+++ samba-2.0.7/source/nmbd/nmbd_packets.c     Sun Dec 31 17:05:04 2000
-@@ -59,7 +59,7 @@
-     if(ip_equal(local_ip, subrec->myip))
-       return subrec->nmb_sock;
--  return ClientNMB;
-+  return FIRST_SUBNET->nmb_sock;
- }
- /***************************************************************************
-@@ -222,7 +222,7 @@
-   packet->ip = to_ip;
-   packet->port = NMB_PORT;
--  packet->fd = ClientNMB;
-+  packet->fd = FIRST_SUBNET->nmb_sock;
-   packet->timestamp = time(NULL);
-   packet->packet_type = NMB_PACKET;
-   packet->locked = False;
diff --git a/samba-nocups.patch b/samba-nocups.patch
deleted file mode 100644 (file)
index e35038b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- samba-2.0.7/source/configure.in.cups       Mon Jul 31 14:31:10 2000
-+++ samba-2.0.7/source/configure.in    Mon Jul 31 14:31:21 2000
-@@ -236,7 +236,7 @@
- AC_CHECK_TYPE(ssize_t, int)
- # we need libcups for CUPS support...
--AC_CHECK_LIB(cups,httpConnect)
-+dnl AC_CHECK_LIB(cups,httpConnect)
- # we need libdl for PAM and the new VFS code
- AC_CHECK_LIB(dl,main)
diff --git a/samba-pam_smbpass.patch b/samba-pam_smbpass.patch
deleted file mode 100644 (file)
index a69fdb3..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-*** samba-2.2.3a/source/Makefile.in.orig       Mon Feb 25 10:17:32 2002\r
---- samba-2.2.3a/source/Makefile.in    Mon Feb 25 10:17:56 2002\r
-***************\r
-*** 364,367 ****\r
---- 364,368 ----\r
-               lib/util_sock.o lib/smbrun.o lib/util_sec.o lib/snprintf.o \\r
-               ubiqx/ubi_sLinkList.o libsmb/smbencrypt.o libsmb/smbdes.o \\r
-+              lib/interfaces.o \\r
-               $(PARAM_OBJ) $(TDB_OBJ) $(PASSDB_OBJ)\r
-  \r
diff --git a/samba-quota.patch b/samba-quota.patch
deleted file mode 100644 (file)
index aac1483..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-diff -urN samba-2.2.3a.org/source/configure.in samba-2.2.3a/source/configure.in
---- samba-2.2.3a.org/source/configure.in       Thu Apr 18 14:31:35 2002
-+++ samba-2.2.3a/source/configure.in   Thu Apr 18 14:56:02 2002
-@@ -2152,7 +2152,15 @@
-         AC_TRY_COMPILE([#include <stdio.h>
- #include <sys/types.h>
- #include <asm/types.h>
-+#define __KERNEL__
-+#include <asm/types.h>
-+#include <asm/semaphore.h>
-+#include <linux/list.h>
-+#include <linux/wait.h>
-+#include <linux/kdev_t.h>
-+#include <linux/sem.h>
- #include <linux/quota.h>
-+#undef __KERNEL__
- #include <mntent.h>
- #include <linux/unistd.h>],[struct mem_dqblk D;],
-       samba_cv_linux_2_4_quota_braindamage=yes,samba_cv_linux_2_4_quota_braindamage=no)])
-diff -urN samba-2.2.3a.org/source/smbd/quotas.c samba-2.2.3a/source/smbd/quotas.c
---- samba-2.2.3a.org/source/smbd/quotas.c      Thu Apr 18 14:31:36 2002
-+++ samba-2.2.3a/source/smbd/quotas.c  Thu Apr 18 16:50:28 2002
-@@ -54,6 +53,24 @@
-  * Linus synchronises with the AC patches. Sometimes I *hate* Linux :-). JRA.
-  */
-+#ifndef LINUX_QUOTAS_1
-+/*
-+ *  Data for one user/group kept in memory
-+ */
-+typedef __u64 qsize_t;          /* Type in which we store sizes */
-+
-+struct mem_dqblk {
-+        __u32 dqb_bhardlimit;   /* absolute limit on disk blks alloc */
-+        __u32 dqb_bsoftlimit;   /* preferred limit on disk blks */
-+        qsize_t dqb_curspace;   /* current used space */
-+        __u32 dqb_ihardlimit;   /* absolute limit on allocated inodes */
-+        __u32 dqb_isoftlimit;   /* preferred inode limit */
-+        __u32 dqb_curinodes;    /* current # allocated inodes */
-+        time_t dqb_btime;       /* time limit for excessive disk use */
-+        time_t dqb_itime;       /* time limit for excessive inode use */
-+};
-+#endif
-+
- #include <linux/quota.h>
- #ifdef HAVE_LINUX_XQM_H
- #include <linux/xqm.h>
diff --git a/samba-smbadduser.patch b/samba-smbadduser.patch
deleted file mode 100644 (file)
index 11120b2..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-diff -urN samba-2.2.0.org/source/smbadduser samba-2.2.0/source/smbadduser
---- samba-2.2.0.org/source/smbadduser  Wed Apr 18 01:27:35 2001
-+++ samba-2.2.0/source/smbadduser      Wed Apr 18 01:33:08 2001
-@@ -3,10 +3,10 @@
- # smbadduser - Written by Mike Zakharoff
- #
- unalias *
--set path = ($path /usr/local/samba/bin)
-+set path = ($path /usr/bin)
--set smbpasswd = /usr/local/samba/private/smbpasswd
--set user_map  = /usr/local/samba/lib/users.map
-+set smbpasswd = /etc/samba/smbpasswd
-+set user_map  = /etc/samba/users.map
- #
- # Set to site specific passwd command
- #
-@@ -46,19 +46,23 @@
-               echo "ERROR: $unix Not in passwd database SKIPPING..."
-               continue
-       endif
--        set tmp = `cat $smbpasswd | awk -F: '$1==USR {print $1}' USR=$unix`
--      if ($#tmp != 0) then
--              echo "ERROR: $unix is already in $smbpasswd SKIPPING..."
--              continue
--      endif
--      echo "Adding: $unix to $smbpasswd"
--      eval $passwd | \
--      awk -F: '$1==USR { \
--      printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:%s:%s:%s\n", $1, $3, $5, $6, $7) }' USR=$unix >> $smbpasswd
-+      # Fix 8/7/2000 Phil Knirsch: Removed the smbpasswd stuff here and fixed
-+      # the way the usermap gets updated as that one was really wrong: If a
-+      # user was added twice the usermap would contain 2 entries! We now
-+      # first select the existing entry, remove it from the usermap and add
-+      # a new one with the new ntid. If something goes wrong the new entry
-+      # will as before simply be added to the file (for manual fixing later).
-+        set usr = `eval cat $user_map | awk -F= '{if(match($1, USR" *") != 0) print $2}' USR=$unix`
-+
-       if ($unix != $ntid) then
--              echo "Adding: {$unix = $ntid} to $user_map"
--              echo "$unix = $ntid" >> $user_map
-+              echo "Adding: {$unix = $usr $ntid} to $user_map"
-+                cat $user_map | sed /"$unix.*"/d > $user_map.new
-+                if (-e $user_map.new) then
-+                    cp $user_map.new $user_map
-+                endif
-+                rm $user_map.new
-+              echo "$unix = $usr $ntid" >> $user_map
-       endif
-       set new = ($new $unix)
- end
-@@ -69,5 +73,9 @@
- foreach one ($new)
-       echo $line
-       echo "ENTER password for $one"
--      smbpasswd $one
-+
-+        # Fix Phil Knirsch 8/6/2000: Use the -a option to create the user
-+        # entry in case it didn't exist before. This way we get rid of the
-+        # file format dependent awk replacement in the previous version.
-+      smbpasswd -a $one
- end
diff --git a/samba-smbprint.patch b/samba-smbprint.patch
deleted file mode 100644 (file)
index a6608b9..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
---- samba-pre2.0.7/packaging/RedHat/smbprint.foo       Mon Nov 16 13:44:11 1998
-+++ samba-pre2.0.7/packaging/RedHat/smbprint   Tue Feb  1 23:04:21 2000
-@@ -1,5 +1,4 @@
- #!/bin/sh
--
- # This script is an input filter for printcap printing on a unix machine. It
- # uses the smbclient program to print the file to the specified smb-based 
- # server and service.
-@@ -18,7 +17,7 @@
- #
- # Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton)
- # so that the server, service, and password can be read from 
--# a /var/spool/lpd/PRINTNAME/.config file.
-+# a /usr/var/spool/lpd/PRINTNAME/.config file.
- #
- # In order for this to work the /etc/printcap entry must include an 
- # accounting file (af=...):
-@@ -32,46 +31,54 @@
- #     :lp=/dev/null:
- #
- # The /usr/var/spool/lpd/PRINTNAME/.config file should contain:
--#   server=PC_SERVER
--#   service=PR_SHARENAME
-+#   share=PC_SERVER
-+#   user="user"
- #   password="password"
- #
--# E.g.
--#   server=PAULS_PC
--#   service=CJET_371
-+# Please, do not modify the order in the file.
-+# Example:
-+#   share=\\server\deskjet
-+#   user="fred"
- #   password=""
- #
--# Debugging log file, change to /dev/null if you like.
--#
--# logfile=/tmp/smb-print.log
--logfile=/dev/null
--
--
--#
- # The last parameter to the filter is the accounting file name.
- #   Extract the directory name from the file name.
- #   Concat this with /.config to get the config file.
- #
--eval acct_file=\${$#}
-+eval acct_file=\$$#
- spool_dir=`dirname $acct_file` 
- config_file=$spool_dir/.config
- # Should read the following variables set in the config file:
--#   server
--#   service
-+#   share
-+#   hostip
-+#   user
- #   password
-+
- eval `cat $config_file`
--#
--# Some debugging help, change the >> to > if you want to same space.
--#
--echo "server $server, service $service" >> $logfile
-+share=`echo $share | sed "s/[\]/\//g"`
--(
--# NOTE You may wish to add the line `echo translate' if you want automatic
--# CR/LF translation when printing.
--#       echo translate
--      echo "print -"
--      cat
--) | /usr/bin/smbclient "\\\\$server\\$service" $password -U $server -N -P >> $logfile
-+if [ "$user" != "" ]; then
-+   usercmd="-U"
-+else
-+   usercmd=""
-+fi
-+
-+if [ "$workgroup" != "" ]; then
-+   workgroupcmd="-W"
-+else
-+   workgroupcmd=""
-+fi
-+
-+if [ "$translate" = "yes" ]; then
-+ command="translate ; print -"
-+else
-+ command="print -"
-+fi
-+#echo $share $password $translate $x_command > /tmp/smbprint.log
-+
-+cat | /usr/bin/smbclient "$share" "$password" -E ${hostip:+-I} \
-+     $hostip -N -P $usercmd "$user" $workgroupcmd "$workgroup" \
-+     -c "$command" 2>/dev/null
diff --git a/samba-srv_spoolss_nt.patch b/samba-srv_spoolss_nt.patch
deleted file mode 100644 (file)
index 218653b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -u -r1.115.2.150 srv_spoolss_nt.c\r
---- samba-2.2.3a/source/rpc_server/srv_spoolss_nt.c    12 Feb 2002 15:21:04 -0000      1.115.2.150\r
-+++ samba-2.2.3a/source/rpc_server/srv_spoolss_nt.c    12 Feb 2002 19:10:47 -0000\r
-@@ -4800,7 +4814,7 @@\r
-                * lookup previously saved driver initialization info, which is then\r
-                * bound to the printer, simulating what happens in the Windows arch.\r
-                */\r
--              if (strequal(printer->info_2->drivername, old_printer->info_2->drivername))\r
-+              if (!strequal(printer->info_2->drivername, old_printer->info_2->drivername))\r
-                       set_driver_init(printer, 2);\r
-       }\r
\r
diff --git a/samba-statfs-workaround.patch b/samba-statfs-workaround.patch
deleted file mode 100644 (file)
index a75d8a3..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
---- samba-3.0.0/source/include/includes.h.orig 2003-08-15 20:39:52.000000000 +0000
-+++ samba-3.0.0/source/include/includes.h      2003-11-09 16:02:50.000000000 +0000
-@@ -351,8 +351,12 @@
- #ifdef HAVE_SYS_CAPABILITY_H
--#if defined(BROKEN_REDHAT_7_SYSTEM_HEADERS) && !defined(_I386_STATFS_H)
-+#if defined(BROKEN_REDHAT_7_SYSTEM_HEADERS)
- #define _I386_STATFS_H
-+#define _ALPHA_STATFS_H
-+#define _PPC_STATFS_H
-+#define _SPARC_STATFS_H
-+#define _SPARC_BITOPS_H
- #define BROKEN_REDHAT_7_STATFS_WORKAROUND
- #endif
-@@ -360,6 +364,10 @@
- #ifdef BROKEN_REDHAT_7_STATFS_WORKAROUND
- #undef _I386_STATFS_H
-+#undef _ALPHA_STATFS_H
-+#undef _PPC_STATFS_H
-+#undef _SPARC_STATFS_H
-+#undef _SPARC_BITOPS_H
- #undef BROKEN_REDHAT_7_STATFS_WORKAROUND
- #endif
diff --git a/samba-vfs.patch b/samba-vfs.patch
deleted file mode 100644 (file)
index dd22818..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-diff -urN samba-2.2.3.orig/examples/VFS/audit.c samba-2.2.3/examples/VFS/audit.c
---- samba-2.2.3.orig/examples/VFS/audit.c      Sat Oct 13 22:08:56 2001
-+++ samba-2.2.3/examples/VFS/audit.c   Sun Feb  3 17:15:57 2002
-@@ -107,11 +107,13 @@
- /* VFS initialisation function.  Return initialised vfs_ops structure
-    back to SAMBA. */
--BOOL vfs_init(connection_struct *conn)
-+struct vfs_ops* vfs_init(int* Version, struct vfs_ops *ops)
- {
-       openlog("smbd_audit", LOG_PID, SYSLOG_FACILITY);
-       syslog(SYSLOG_PRIORITY, "VFS_INIT: vfs_ops loaded\n");
--      return True;
-+        *Version = SMB_VFS_INTERFACE_VERSION;
-+        return (&audit_ops);
-+
- }
- /* Implementation of vfs_ops.  Pass everything on to the default
-diff -urN samba-2.2.3.orig/source/Makefile.in samba-2.2.3/source/Makefile.in
---- samba-2.2.3.orig/source/Makefile.in        Sun Feb  3 01:46:05 2002
-+++ samba-2.2.3/source/Makefile.in     Sun Feb  3 17:16:35 2002
-@@ -487,7 +487,7 @@
- bin/smbd: $(SMBD_OBJ) bin/.dummy
-       @echo Linking $@
--      @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LIBS) 
-+      @$(CC) $(FLAGS) -rdynamic -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LIBS) 
- bin/nmbd: $(NMBD_OBJ) bin/.dummy
-       @echo Linking $@
-diff -urN samba-2.2.3.orig/source/include/proto.h samba-2.2.3/source/include/proto.h
---- samba-2.2.3.orig/source/include/proto.h    Sun Feb  3 01:46:40 2002
-+++ samba-2.2.3/source/include/proto.h Sun Feb  3 17:17:12 2002
-@@ -4543,7 +4543,7 @@
- /*The following definitions come from  smbd/vfs.c  */
--BOOL vfs_init(connection_struct *conn);
-+BOOL smbd_vfs_init(connection_struct *conn);
- BOOL vfs_directory_exist(connection_struct *conn, char *dname, SMB_STRUCT_STAT *st);
- int vfs_mkdir(connection_struct *conn, char *fname, mode_t mode);
- char *vfs_getwd(connection_struct *conn, char *unix_path);
-diff -urN samba-2.2.3.orig/source/include/stamp-h samba-2.2.3/source/include/stamp-h
---- samba-2.2.3.orig/source/include/stamp-h    Thu Jan  1 01:00:00 1970
-+++ samba-2.2.3/source/include/stamp-h Sun Feb  3 17:25:39 2002
-@@ -0,0 +1 @@
-+Sun Jul 18 20:32:29 UTC 1999
-diff -urN samba-2.2.3.orig/source/msdfs/msdfs.c samba-2.2.3/source/msdfs/msdfs.c
---- samba-2.2.3.orig/source/msdfs/msdfs.c      Sun Feb  3 01:46:44 2002
-+++ samba-2.2.3/source/msdfs/msdfs.c   Sun Feb  3 17:17:29 2002
-@@ -88,7 +88,7 @@
-       conn->service = snum;
-       conn->connectpath = lp_pathname(snum);
--      if (!vfs_init(conn)) {
-+      if (!smbd_vfs_init(conn)) {
-               DEBUG(0,("create_conn_struct: vfs init failed.\n"));
-               return False;
-       }
-diff -urN samba-2.2.3.orig/source/smbd/service.c samba-2.2.3/source/smbd/service.c
---- samba-2.2.3.orig/source/smbd/service.c     Sun Feb  3 01:46:56 2002
-+++ samba-2.2.3/source/smbd/service.c  Sun Feb  3 17:18:31 2002
-@@ -537,7 +537,7 @@
-       }
-       /* Initialise VFS function pointers */
--      if (!vfs_init(conn)) {
-+      if (!smbd_vfs_init(conn)) {
-               DEBUG(0, ("vfs_init failed for service %s\n", lp_servicename(SNUM(conn))));
-               yield_connection(conn, lp_servicename(SNUM(conn)));
-               conn_free(conn);
-diff -urN samba-2.2.3.orig/source/smbd/vfs.c samba-2.2.3/source/smbd/vfs.c
---- samba-2.2.3.orig/source/smbd/vfs.c Sun Feb  3 01:46:57 2002
-+++ samba-2.2.3/source/smbd/vfs.c      Sun Feb  3 17:37:54 2002
-@@ -273,7 +273,7 @@
-  Generic VFS init.
- ******************************************************************/
--BOOL vfs_init(connection_struct *conn)
-+BOOL smbd_vfs_init(connection_struct *conn)
- {
-       if (*lp_vfsobj(SNUM(conn))) {
- #ifdef HAVE_LIBDL
-@@ -281,13 +281,13 @@
-               /* Loadable object file */
-  
-               if (!vfs_init_custom(conn)) {
--                      DEBUG(0, ("vfs_init: vfs_init_custom failed\n"));
-+                      DEBUG(0, ("smbd_vfs_init: vfs_init_custom failed\n"));
-                       return False;
-               }
-               return True;
- #else
--              DEBUG(0, ("vfs_init: No libdl present - cannot use VFS objects\n"));
-+              DEBUG(0, ("smbd_vfs_init: No libdl present - cannot use VFS objects\n"));
-               return False;
- #endif
-       }
diff --git a/samba.logrotate b/samba.logrotate
deleted file mode 100644 (file)
index ede8766..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-/var/log/samba/log.* {
-       notifempty
-       missingok
-       olddir /var/log/archiv/samba
-       postrotate
-               /bin/killall -HUP nmbd
-               /bin/killall -HUP smbd
-       endscript
-}
diff --git a/samba.pamd b/samba.pamd
deleted file mode 100644 (file)
index 570ab59..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#%PAM-1.0
-auth           required        /lib/security/pam_listfile.so item=user sense=deny file=/etc/security/blacklist onerr=succeed
-auth           required        /lib/security/pam_listfile.so item=user sense=deny file=/etc/security/blacklist.samba onerr=succeed
-auth           required        /lib/security/pam_unix.so
-account                required        /lib/security/pam_unix.so
diff --git a/samba.sysconfig b/samba.sysconfig
deleted file mode 100644 (file)
index 404bea0..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# Customized setings for samba
-
-# Define nice level for samba & config 
-SERVICE_RUN_NICE_LEVEL="+5"
-
-# Define if you want to start winbindd
-WINBINDD="no"
diff --git a/samba3-smbtorture.patch b/samba3-smbtorture.patch
deleted file mode 100644 (file)
index 37d05b0..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- samba-3.0.0rc1/source/Makefile.in~ 2003-08-15 20:39:52.000000000 +0000
-+++ samba-3.0.0rc1/source/Makefile.in  2003-08-20 14:08:25.000000000 +0000
-@@ -831,7 +831,7 @@
- bin/smbtorture@EXEEXT@: $(SMBTORTURE_OBJ) bin/.dummy
-       @echo Linking $@
--      @$(CC) $(FLAGS) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAPLIBS) $(SECRETS_OBJ)
-+      @$(CC) $(FLAGS) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAPLIBS)
- bin/talloctort@EXEEXT@: $(TALLOCTORT_OBJ) bin/.dummy
-       @echo Linking $@
diff --git a/smb.conf b/smb.conf
deleted file mode 100644 (file)
index 2af732c..0000000
--- a/smb.conf
+++ /dev/null
@@ -1,291 +0,0 @@
-# This is the main Samba configuration file. You should read the
-# smb.conf(5) manual page in order to understand the options listed
-# here. Samba has a huge number of configurable options (perhaps too
-# many!) most of which are not shown in this example
-#
-# Any line which starts with a ; (semi-colon) or a # (hash) 
-# is a comment and is ignored. In this example we will use a #
-# for commentry and a ; for parts of the config file that you
-# may wish to enable
-#
-# NOTE: Whenever you modify this file you should run the command "testparm"
-# to check that you have not many any basic syntactic errors. 
-#
-#======================= Global Settings =====================================
-[global]
-
-# workgroup = NT-Domain-Name or Workgroup-Name
-   workgroup = MYGROUP
-
-# server string is the equivalent of the NT Description field
-   server string = Samba Server
-
-# This option is important for security. It allows you to restrict
-# connections to machines which are on your local network. The
-# following example restricts access to two C class networks and
-# the "loopback" interface. For more examples of the syntax see
-# the smb.conf man page
-;   hosts allow = 192.168.1. 192.168.2. 127.
-
-# if you want to automatically load your printer list rather
-# than setting them up individually then you'll need this
-   printcap name = /etc/printcap
-   load printers = yes
-
-# It should not be necessary to spell out the print system type unless
-# yours is non-standard. Currently supported print systems include:
-# bsd, sysv, plp, lprng, aix, hpux, qnx, cups
-   printing = lprng
-
-# Uncomment this if you want a guest account, you must add this to /etc/passwd
-# otherwise the user "nobody" is used
-;  guest account = pcguest
-
-# this tells Samba to use a separate log file for each machine
-# that connects
-   log file = /var/log/samba/log.%I
-
-# Put a capping on the size of the log files (in Kb).
-   max log size = 50
-
-# Security mode. Most people will want user level security. See
-# security_level.txt for details.
-   security = user
-# Use password server option only with security = server
-;   password server = <NT-Server-Name>
-
-# Password Level allows matching of _n_ characters of the password for
-# all combinations of upper and lower case.
-;  password level = 8
-;  username level = 8
-
-# You may wish to use password encryption. Please read
-# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
-# Do not enable this option unless you have read those documents
-;  encrypt passwords = yes
-;  smb passwd file = /etc/smbpasswd
-
-# The following are needed to allow password changing from Windows to
-# update the Linux system password also.
-# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
-# NOTE2: You do NOT need these to allow workstations to change only
-#        the encrypted SMB passwords. They allow the Unix password
-#        to be kept in sync with the SMB password.
-;  unix password sync = Yes
-;  passwd program = /usr/bin/passwd %u
-;  passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
-
-# Unix users can map to different SMB User names
-;  username map = /etc/samba/smbusers
-
-# Using the following line enables you to customise your configuration
-# on a per machine basis. The %m gets replaced with the netbios name
-# of the machine that is connecting
-;   include = /etc/samba/smb.conf.%m
-
-# Most people will find that this option gives better performance.
-# See speed.txt and the manual pages for details
-   socket options = TCP_NODELAY 
-
-# Configure Samba to use multiple interfaces
-# If you have multiple network interfaces then you must list them
-# here. See the man page for details.
-;   interfaces = 192.168.12.2/24 192.168.13.2/24 
-
-# Configure remote browse list synchronisation here
-#  request announcement to, or browse list sync from:
-#      a specific host or from / to a whole subnet (see below)
-;   remote browse sync = 192.168.3.25 192.168.5.255
-# Cause this host to announce itself to local subnets here
-;   remote announce = 192.168.1.255 192.168.2.44
-
-# Browser Control Options:
-# set local master to no if you don't want Samba to become a master
-# browser on your network. Otherwise the normal election rules apply
-;   local master = no
-
-# OS Level determines the precedence of this server in master browser
-# elections. The default value should be reasonable
-;   os level = 33
-
-# Domain Master specifies Samba to be the Domain Master Browser. This
-# allows Samba to collate browse lists between subnets. Don't use this
-# if you already have a Windows NT domain controller doing this job
-;   domain master = yes 
-
-# Preferred Master causes Samba to force a local browser election on startup
-# and gives it a slightly higher chance of winning the election
-;   preferred master = yes
-
-# Use only if you have an NT server on your network that has been
-# configured at install time to be a primary domain controller.
-;   domain controller = <NT-Domain-Controller-SMBName>
-
-# Enable this if you want Samba to be a domain logon server for 
-# Windows95 workstations. 
-;   domain logons = yes
-
-# If you enable domain logons then you may want a per-machine or
-# per user logon script
-# run a specific logon batch file per workstation (machine)
-;   logon script = %m.bat
-# run a specific logon batch file per username
-;   logon script = %U.bat
-
-# Where to store roving profiles (only for Win95 and WinNT)
-#        %L substitutes for this servers netbios name, %U is username
-#        You must uncomment the [Profiles] share below
-;   logon path = \\%L\Profiles\%U
-
-# All NetBIOS names must be resolved to IP Addresses
-# 'Name Resolve Order' allows the named resolution mechanism to be specified
-# the default order is "host lmhosts wins bcast". "host" means use the unix
-# system gethostbyname() function call that will use either /etc/hosts OR
-# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
-# and the /etc/resolv.conf file. "host" therefore is system configuration
-# dependant. This parameter is most often of use to prevent DNS lookups
-# in order to resolve NetBIOS names to IP Addresses. Use with care!
-# The example below excludes use of name resolution for machines that are NOT
-# on the local network segment
-# - OR - are not deliberately to be known via lmhosts or via WINS.
-; name resolve order = wins lmhosts bcast
-
-# Windows Internet Name Serving Support Section:
-# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
-;   wins support = yes
-
-# WINS Server - Tells the NMBD components of Samba to be a WINS Client
-#      Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
-;   wins server = w.x.y.z
-
-# WINS Proxy - Tells Samba to answer name resolution queries on
-# behalf of a non WINS capable client, for this to work there must be
-# at least one WINS Server on the network. The default is NO.
-;   wins proxy = yes
-
-# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
-# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
-# this has been changed in version 1.9.18 to no.
-   dns proxy = no 
-
-# Case Preservation can be handy - system default is _no_
-# NOTE: These can be set on a per share basis
-;  preserve case = no
-;  short preserve case = no
-# Default case is normally upper case for all DOS files
-;  default case = lower
-# Be very careful with case sensitivity - it can break things!
-;  case sensitive = no
-
-#============================ Share Definitions ==============================
-[homes]
-   comment = Home Directories
-   browseable = no
-   writable = yes
-
-# Un-comment the following and create the netlogon directory for Domain Logons
-; [netlogon]
-;   comment = Network Logon Service
-;   path = /home/netlogon
-;   guest ok = yes
-;   writable = no
-;   share modes = no
-
-
-# Un-comment the following to provide a specific roving profile share
-# the default is to use the user's home directory
-;[Profiles]
-;    path = /home/profiles
-;    browseable = no
-;    guest ok = yes
-
-
-# NOTE: If you have a BSD-style print system there is no need to 
-# specifically define each individual printer
-[printers]
-   comment = All Printers
-   path = /var/spool/samba
-   browseable = no
-# Set public = yes to allow user 'guest account' to print
-   guest ok = no
-   writable = no
-   printable = yes
-
-# This one is useful for people to share files
-;[tmp]
-;   comment = Temporary file space
-;   path = /tmp
-;   read only = no
-;   public = yes
-
-# A publicly accessible directory, but read only, except for people in
-# the "staff" group
-;[public]
-;   comment = Public Stuff
-;   path = /home/services/samba
-;   public = yes
-;   writable = yes
-;   printable = no
-;   write list = @staff
-
-# Other examples. 
-#
-# A private printer, usable only by fred. Spool data will be placed in fred's
-# home directory. Note that fred must have write access to the spool directory,
-# wherever it is.
-;[fredsprn]
-;   comment = Fred's Printer
-;   valid users = fred
-;   path = /homes/fred
-;   printer = freds_printer
-;   public = no
-;   writable = no
-;   printable = yes
-
-# A private directory, usable only by fred. Note that fred requires write
-# access to the directory.
-;[fredsdir]
-;   comment = Fred's Service
-;   path = /usr/somewhere/private
-;   valid users = fred
-;   public = no
-;   writable = yes
-;   printable = no
-
-# A service which has a different directory for each machine that connects
-# this allows you to tailor configurations to incoming machines. You could
-# also use the %u option to tailor it by user name.
-# The %m gets replaced with the machine name that is connecting.
-;[pchome]
-;  comment = PC Directories
-;  path = /usr/pc/%m
-;  public = no
-;  writable = yes
-
-# A publicly accessible directory, read/write to all users. Note that all files
-# created in the directory by users will be owned by the default user, so
-# any user with access can delete any other user's files. Obviously this
-# directory must be writable by the default user. Another user could of course
-# be specified, in which case all files would be owned by that user instead.
-;[public]
-;   path = /usr/somewhere/else/public
-;   public = yes
-;   only guest = yes
-;   writable = yes
-;   printable = no
-
-# The following two entries demonstrate how to share a directory so that two
-# users can place files there that will be owned by the specific users. In this
-# setup, the directory should be writable by both users and should have the
-# sticky bit set on it to prevent abuse. Obviously this could be extended to
-# as many users as required.
-;[myshare]
-;   comment = Mary's and Fred's stuff
-;   path = /usr/somewhere/shared
-;   valid users = mary fred
-;   public = no
-;   writable = yes
-;   printable = no
-;   create mask = 0765
-
-
diff --git a/smb.init b/smb.init
deleted file mode 100644 (file)
index e3bb91c..0000000
--- a/smb.init
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/bin/sh
-#
-# chkconfig:   345 91 35
-# description: Starts and stops the Samba smbd and nmbd daemons \
-#              used to provide SMB network services.
-#
-# config:      /etc/samba/smb.conf
-# config:      /etc/samba/lmhosts
-
-export PATH=/bin:/sbin:/usr/bin:/usr/sbin
-
-# Source function library.
-. /etc/rc.d/init.d/functions
-
-# Source networking configuration.
-. /etc/sysconfig/network
-
-# Demon specified configuration.
-. /etc/sysconfig/samba
-
-# Check that networking is up.
-if is_yes "${NETWORKING}"; then
-       if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
-               msg_network_down smb
-               exit 1
-       fi
-else
-       exit 0
-fi
-
-TMPDIR="/tmp"; export TMPDIR
-
-# Check that smb.conf exists.
-[ -f /etc/samba/smb.conf ] || exit 0
-
-RETVAL=0
-# See how we were called.
-case "$1" in
-  start)
-       # Check if the service is already running?
-       if [ ! -f /var/lock/subsys/smb ]; then
-               msg_starting smbd
-               daemon $NICELEVEL smbd -D
-               RETVAL=$?
-               msg_starting nmbd
-               daemon $NICELEVEL nmbd -D
-               [ $RETVAL -eq 0 ] && RETVAL=$?
-               if [ "$WINBINDD" = "yes" ]; then
-                       msg_starting winbindd
-                       daemon $NICELEVEL winbindd
-                       RET=$?
-                       [ $RETVAL -eq 0 ] && RETVAL=$RET
-               fi
-               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/smb
-       else
-               msg_already_running smb
-       fi
-       ;;
-  stop)
-       # Stop daemons.
-       if [ -f /var/lock/subsys/smb ]; then
-               msg_stopping smbd
-               killproc smbd
-               msg_stopping nmbd
-               killproc nmbd
-               if [ "$WINBINDD" = "yes" ]; then
-                       msg_stopping winbindd
-                       killproc winbindd
-               fi
-               rm -f /var/lock/subsys/smb >/dev/null 2>&1
-       else
-               msg_not_running smb
-       fi
-       ;;
-  status)
-       status smbd
-       RETVAL=$?       
-       status nmbd
-       RET=$?
-       [ $RETVAL -eq 0 ] && RETVAL=$RET
-       status winbindd
-       RET=$?
-       [ $RETVAL -eq 0 ] && RETVAL=$RET
-       smbstatus
-       ;;
-  restart)
-       $0 stop
-       $0 start
-       exit $?
-       ;;
-  reload|force-reload)
-       if [ -f /var/lock/subsys/smb ]; then
-               msg_reloading smb
-               killproc smbd -HUP
-               RETVAL=$?
-       else
-               msg_not_running smb >&2
-               exit 7
-       fi
-       ;;
-  *)
-       msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
-       exit 3
-esac
-
-exit $RETVAL
diff --git a/swat.inetd b/swat.inetd
deleted file mode 100644 (file)
index 0e175b0..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-SERVICE_NAME=swat
-SOCK_TYPE=stream
-PROTOCOL=tcp
-PORT=901
-FLAGS=nowait
-MAX_CONNECTIONS=400
-USER=root
-SERVER=tcpd
-DAEMON=/usr/sbin/swat
-FAMILY=ipv4
This page took 0.389279 seconds and 4 git commands to generate.