[SCM] Samba Shared Repository - branch master updated

2012-05-26 Thread Andrew Bartlett
The branch, master has been updated
   via  6634360 s3-build: Remove build of libaddns.a from the autoconf build
  from  e7e6276 s3-utils: Use ads_do_search_retry in net ads search

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 6634360ce55a84319f197be44d47fc4f4c3ef4d5
Author: Andrew Bartlett abart...@samba.org
Date:   Tue May 22 12:01:44 2012 +1000

s3-build: Remove build of libaddns.a from the autoconf build

We always link libaddns statically as part of the net object lists

This means that we no longer provide externally-available
libaddns, as the waf build declared this as a private library.

This never had a public API, .so or a header file.

Andrew Bartlett

Autobuild-User: Andrew Bartlett abart...@samba.org
Autobuild-Date: Sat May 26 09:45:34 CEST 2012 on sn-devel-104

---

Summary of changes:
 source3/Makefile.in  |   73 --
 source3/configure.in |2 -
 2 files changed, 0 insertions(+), 75 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 9bd4f90..ad731b3 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -2376,79 +2376,6 @@ showlibs:: showlibwbclient
 
 #---
 #
-# libaddns
-#
-#---
-
-
-LIBADDNS_SHARED_TARGET=@LIBADDNS_SHARED_TARGET@
-LIBADDNS_SOVER=@LIBADDNS_SOVER@
-LIBADDNS_FULLVER=@LIBADDNS_FULLVER@
-LIBADDNS_SHARED_TARGET_SONAME=@LIBADDNS_SHARED_TARGET_SOVER@
-LIBADDNS_STATIC_TARGET=@LIBADDNS_STATIC_TARGET@
-LIBADDNS=@LIBADDNS_STATIC@ @LIBADDNS_SHARED@
-#LIBADDNS_SYMS=$(srcdir)/exports/libaddns.@SYMSEXT@
-
-$(LIBADDNS_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBADDNS_OBJ) 
$(LIBTALLOC)
-   @echo Linking shared library $@
-   @$(SHLD_DSO) $(LIBADDNS_OBJ) $(LIBS) \
-   $(KRB5LIBS) $(UUID_LIBS) $(LIBTALLOC_LIBS) \
-   @SONAMEFLAG@`basename $@`
-
-$(LIBADDNS_SHARED_TARGET): $(LIBADDNS_SHARED_TARGET_SONAME)
-   @rm -f $@
-   @ln -f -s `basename $(LIBADDNS_SHARED_TARGET_SONAME)` $@
-
-$(LIBADDNS_STATIC_TARGET): $(BINARY_PREREQS) $(LIBADDNS_OBJ0)
-   @echo Linking non-shared library $@
-   @-$(AR) -rc $@ $(LIBADDNS_OBJ0)
-
-libaddns: $(LIBADDNS)
-
-cleanlibaddns::
-   -rm -f \
-   $(LIBADDNS_SHARED_TARGET) \
-   $(LIBADDNS_SHARED_TARGET_SONAME) \
-   $(LIBADDNS_STATIC_TARGET)
-
-installlibaddns:: installdirs libaddns
-   @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) 
$(DESTDIR) $(LIBDIR)
-   -$(INSTALLLIBCMD_SH) $(LIBADDNS_SHARED_TARGET_SONAME) 
$(DESTDIR)$(LIBDIR)
-   @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_SHARED_TARGET)`
-   -if test -r $(LIBADDNS_SHARED_TARGET_SONAME) ; then \
-   ln -f -s `basename $(LIBADDNS_SHARED_TARGET_SONAME)` \
-   $(DESTDIR)$(LIBDIR)/`basename 
$(LIBADDNS_SHARED_TARGET)` ; \
-   fi
-   -$(INSTALLLIBCMD_A) $(LIBADDNS_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
-
-uninstalllibaddns::
-   -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename 
$(LIBADDNS_SHARED_TARGET_SONAME)`
-   -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_SHARED_TARGET)`
-   -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename 
$(LIBADDNS_STATIC_TARGET)`
-
-libs:: libaddns
-installlibs:: @INSTALL_LIBADDNS@
-uninstalllibs:: @UNINSTALL_LIBADDNS@
-cleanlibs:: cleanlibaddns
-shlibs test_shlibs: @LIBADDNS_SHARED@
-
-showlibaddns:
-   @echo  
-   @echo LIBADDNS_SHARED   = @LIBADDNS_SHARED@
-   @echo LIBADDNS_STATIC   = @LIBADDNS_STATIC@
-   @echo LIBADDNS_LIBS = $(LIBADDNS_LIBS)
-   @echo 
-   @echo LIBADDNS_SHARED_TARGET= $(LIBADDNS_SHARED_TARGET)
-   @echo LIBADDNS_SOVER= $(LIBADDNS_SOVER)
-   @echo LIBADDNS_FULLVER  = $(LIBADDNS_FULLVER)
-   @echo LIBADDNS_SHARED TARGET_SONAME = $(LIBADDNS_SHARED_TARGET_SONAME)
-   @echo LIBADDNS_STATIC_TARGET= $(LIBADDNS_STATIC_TARGET)
-   @echo LIBADDNS  = $(LIBADDNS)
-
-showlibs:: showlibaddns
-
-#---
-#
 # libnetapi
 #
 #---
diff --git a/source3/configure.in b/source3/configure.in
index f0a76a1..a997e36 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1987,8 +1987,6 @@ fi
 SMB_LIBRARY(netapi, 0)
 SMB_LIBRARY(smbclient, 0)
 SMB_LIBRARY(smbsharemodes, 0)
-SMB_LIBRARY(addns, 0, [], no, [undefined API])
-
 
 
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2012-05-26 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  baac32c s3-passdb: Fix negative SID-uid/gid cache handling. (bug 
#8952)
  from  96b6f3a s3-auth: Don't lookup the system user in pdb.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit baac32c43460ed5e78e7f8bb2304f79cae2b15ef
Author: Ira Cooper i...@samba.org
Date:   Wed May 23 21:39:03 2012 -0400

s3-passdb: Fix negative SID-uid/gid cache handling. (bug #8952)

-1 uid/gid signals a non existent uid/gid.

Signed-off-by: Stefan Metzmacher me...@samba.org

---

Summary of changes:
 source3/passdb/lookup_sid.c |   17 +
 1 files changed, 17 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c
index 5cf391f..2afa86e 100644
--- a/source3/passdb/lookup_sid.c
+++ b/source3/passdb/lookup_sid.c
@@ -1490,7 +1490,24 @@ bool sids_to_unix_ids(const struct dom_sid *sids, 
uint32_t num_sids,
continue;
}
}
+
 done:
+   for (i=0; inum_sids; i++) {
+   switch(ids[i].type) {
+   case WBC_ID_TYPE_GID:
+   if (ids[i].id.gid == (gid_t)-1) {
+   ids[i].type = WBC_ID_TYPE_NOT_SPECIFIED;
+   }
+   break;
+   case WBC_ID_TYPE_UID:
+   if (ids[i].id.uid == (uid_t)-1) {
+   ids[i].type = WBC_ID_TYPE_NOT_SPECIFIED;
+   }
+   break;
+   case WBC_ID_TYPE_NOT_SPECIFIED:
+   break;
+   }
+   }
ret = true;
 fail:
TALLOC_FREE(wbc_ids);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2012-05-26 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  ee4ef9a Fix bug #8957 - Typo in pam_winbindd code MUST fix.
  from  baac32c s3-passdb: Fix negative SID-uid/gid cache handling. (bug 
#8952)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit ee4ef9a535a2d9db11bd94987fb96ae8f8771e79
Author: Jeremy Allison j...@samba.org
Date:   Fri May 25 17:19:29 2012 -0700

Fix bug #8957 - Typo in pam_winbindd code MUST fix.

---

Summary of changes:
 nsswitch/pam_winbind.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index 11599da..f676128 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -2277,7 +2277,7 @@ static const char *get_conf_item_string(struct 
pwb_context *ctx,
goto out;
}
 
-   parm_opt = iniparser_getstring,(ctx-dict, key, NULL);
+   parm_opt = iniparser_getstring(ctx-dict, key, NULL);
TALLOC_FREE(key);
 
_pam_log_debug(ctx, LOG_INFO, CONFIG file: %s '%s'\n,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated

2012-05-26 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  991f83f Fix bug #8957 - Typo in pam_winbindd code MUST fix. (cherry 
picked from commit ee4ef9a535a2d9db11bd94987fb96ae8f8771e79)
  from  19fc7d6 s3-pam_winbind: Fix the build.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test


- Log -
commit 991f83fed8f49fe4c6b4f47bd63b8064d57d811f
Author: Jeremy Allison j...@samba.org
Date:   Fri May 25 17:19:29 2012 -0700

Fix bug #8957 - Typo in pam_winbindd code MUST fix.
(cherry picked from commit ee4ef9a535a2d9db11bd94987fb96ae8f8771e79)

---

Summary of changes:
 nsswitch/pam_winbind.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index caae589..81055c9 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -2290,7 +2290,7 @@ static const char *get_conf_item_string(struct 
pwb_context *ctx,
goto out;
}
 
-   parm_opt = iniparser_getstring,(ctx-dict, key, NULL);
+   parm_opt = iniparser_getstring(ctx-dict, key, NULL);
TALLOC_FREE(key);
 
_pam_log_debug(ctx, LOG_INFO, CONFIG file: %s '%s'\n,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2012-05-26 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  7965801 Fix the loop unrolling inside resolve_ads(). If we don't 
get an IP list don't use interpret_string_addr(), as this only returns one 
address, use interpret_string_addr_internal() instead.
   via  495f12d Protect all of the name resolution methods from returning 
null addrs. Ensure all returns go through remove_duplicate_addrs2(). (cherry 
picked from commit 11973608186926e5417ee81c8709ea5b0a7ef2e1)
   via  d259cd4 Fix convert_ss2service() to filter out zero addresses.
   via  d7bddfe Fix remove_duplicate_addrs2 to do exactly what it says. 
Previously it could leave zero addresses in the list. (cherry picked from 
commit 01e884675e3d1cffb0149108225fbd21c3a73f4e)
  from  ee4ef9a Fix bug #8957 - Typo in pam_winbindd code MUST fix.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit 79658018ec73755bbd495963f977af61b4497bfb
Author: Jeremy Allison j...@samba.org
Date:   Mon Apr 30 11:05:51 2012 -0700

Fix the loop unrolling inside resolve_ads(). If we don't get an IP list 
don't use interpret_string_addr(), as this only returns one address, use 
interpret_string_addr_internal() instead.

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Mon Apr 30 23:21:16 CEST 2012 on sn-devel-104
(cherry picked from commit 1270cfb45ffa0bbcacf7254b5b45f492a8dcde77)

The last 4 patches address bug #8910 (resolve_ads() code can return zero
addresses and miss valid DC IP addresses).

commit 495f12d932a2ec2848a17917e6f1aa39590dc97d
Author: Jeremy Allison j...@samba.org
Date:   Fri Apr 27 16:25:58 2012 -0700

Protect all of the name resolution methods from returning null addrs. 
Ensure all returns go through remove_duplicate_addrs2(). (cherry picked from 
commit 11973608186926e5417ee81c8709ea5b0a7ef2e1)

commit d259cd40204108d262b6b3c18d1f2a9f9d0fee42
Author: Jeremy Allison j...@samba.org
Date:   Mon Apr 30 14:45:43 2012 -0700

Fix convert_ss2service() to filter out zero addresses.

commit d7bddfe22aca1663554757e9245232718adec92d
Author: Jeremy Allison j...@samba.org
Date:   Fri Apr 27 16:02:15 2012 -0700

Fix remove_duplicate_addrs2 to do exactly what it says. Previously it could 
leave zero addresses in the list. (cherry picked from commit 
01e884675e3d1cffb0149108225fbd21c3a73f4e)

---

Summary of changes:
 source3/libsmb/namequery.c |  199 +--
 1 files changed, 134 insertions(+), 65 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index c36773b..d0ab62f 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -1078,7 +1078,7 @@ static int remove_duplicate_addrs2(struct ip_service 
*iplist, int count )
DEBUG(10,(remove_duplicate_addrs2: 
looking for duplicate address/port pairs\n));
 
-   /* one loop to remove duplicates */
+   /* One loop to set duplicates to a zero addr. */
for ( i=0; icount; i++ ) {
if ( is_zero_addr(iplist[i].ss)) {
continue;
@@ -1092,18 +1092,17 @@ static int remove_duplicate_addrs2(struct ip_service 
*iplist, int count )
}
}
 
-   /* one loop to clean up any holes we left */
-   /* first ip should never be a zero_ip() */
-   for (i = 0; icount; ) {
-   if (is_zero_addr(iplist[i].ss) ) {
-   if (i != count-1) {
-   memmove(iplist[i], iplist[i+1],
-   (count - i - 1)*sizeof(iplist[i]));
+   /* Now remove any addresses set to zero above. */
+   for (i = 0; i  count; i++) {
+   while (i  count 
+   is_zero_addr(iplist[i].ss)) {
+   if (count-i-10) {
+   memmove(iplist[i],
+   iplist[i+1],
+   (count-i-1)*sizeof(struct ip_service));
}
count--;
-   continue;
}
-   i++;
}
 
return count;
@@ -1339,6 +1338,10 @@ static bool name_query_validator(struct packet_struct 
*p, void *private_data)
putip((char *)ip,nmb-answers-rdata[2+i*6]);
in_addr_to_sockaddr_storage(addr, ip);
 
+   if (is_zero_addr(addr)) {
+   continue;
+   }
+
for (j=0; jstate-num_addrs; j++) {
if (sockaddr_equal(
(struct sockaddr *)addr,
@@ -1476,32 +1479,53 @@ NTSTATUS name_query(const char *name, int name_type,
 }
 
 /
- convert an array if 

[SCM] Samba Shared Repository - branch v3-5-test updated

2012-05-26 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  b9d3f82 Fix the loop unrolling inside resolve_ads().
   via  6d5aae1 Protect all of the name resolution methods from returning 
null addrs. Ensure all returns go through remove_duplicate_addrs2().
   via  3226be5 Fix convert_ss2service() to filter out zero addresses.
   via  8e9db61 Fix remove_duplicate_addrs2 to do exactly what it says. 
Previously it could leave zero addresses in the list.
  from  991f83f Fix bug #8957 - Typo in pam_winbindd code MUST fix. (cherry 
picked from commit ee4ef9a535a2d9db11bd94987fb96ae8f8771e79)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test


- Log -
commit b9d3f8258396873d6ec8b6ea9ad066e2f1f8e973
Author: Jeremy Allison j...@samba.org
Date:   Mon Apr 30 16:32:51 2012 -0700

Fix the loop unrolling inside resolve_ads().

If we don't get an IP list don't use interpret_string_addr(), as this only 
returns one address, use interpret_string_addr_internal() instead.

The last 4 patches address bug #8910 (resolve_ads() code can return zero
addresses and miss valid DC IP addresses).

commit 6d5aae1d9680657c7021af2974db9b0dc2336f13
Author: Jeremy Allison j...@samba.org
Date:   Mon Apr 30 16:29:19 2012 -0700

Protect all of the name resolution methods from returning null addrs. 
Ensure all returns go through remove_duplicate_addrs2().

commit 3226be5b5ab771c8cdf98588c40713d36eae4702
Author: Jeremy Allison j...@samba.org
Date:   Mon Apr 30 16:24:27 2012 -0700

Fix convert_ss2service() to filter out zero addresses.

commit 8e9db61b447d22bad84a8c9ae450a71d9c3e6d58
Author: Jeremy Allison j...@samba.org
Date:   Mon Apr 30 16:16:39 2012 -0700

Fix remove_duplicate_addrs2 to do exactly what it says. Previously it could 
leave zero addresses in the list.

---

Summary of changes:
 source3/libsmb/namequery.c |  189 +---
 1 files changed, 126 insertions(+), 63 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index 858330d..af76f3f 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -571,7 +571,7 @@ static int remove_duplicate_addrs2(struct ip_service 
*iplist, int count )
DEBUG(10,(remove_duplicate_addrs2: 
looking for duplicate address/port pairs\n));
 
-   /* one loop to remove duplicates */
+   /* One loop to set duplicates to a zero addr. */
for ( i=0; icount; i++ ) {
if ( is_zero_addr((struct sockaddr *)iplist[i].ss)) {
continue;
@@ -585,18 +585,17 @@ static int remove_duplicate_addrs2(struct ip_service 
*iplist, int count )
}
}
 
-   /* one loop to clean up any holes we left */
-   /* first ip should never be a zero_ip() */
-   for (i = 0; icount; ) {
-   if (is_zero_addr((struct sockaddr *)iplist[i].ss) ) {
-   if (i != count-1) {
-   memmove(iplist[i], iplist[i+1],
-   (count - i - 1)*sizeof(iplist[i]));
+   /* Now remove any addresses set to zero above. */
+   for (i = 0; i  count; i++) {
+   while (i  count 
+   is_zero_addr((struct sockaddr *)iplist[i].ss)) 
{
+   if (count-i-10) {
+   memmove(iplist[i],
+   iplist[i+1],
+   (count-i-1)*sizeof(struct ip_service));
}
count--;
-   continue;
}
-   i++;
}
 
return count;
@@ -849,32 +848,53 @@ struct sockaddr_storage *name_query(int fd,
 }
 
 /
- convert an array if struct sockaddr_storage to struct ip_service
+ Convert an array if struct sockaddr_storage to struct ip_service
  return false on failure.  Port is set to PORT_NONE;
+ pcount is [in/out] - it is the length of ss_list on input,
+ and the length of return_iplist on output as we remove any
+ zero addresses from ss_list.
 */
 
 static bool convert_ss2service(struct ip_service **return_iplist,
const struct sockaddr_storage *ss_list,
-   int count)
+   int *pcount)
 {
int i;
+   int orig_count = *pcount;
+   int real_count = 0;
 
-   if ( count==0 || !ss_list )
+   if (orig_count==0 || !ss_list )
return False;
 
+   /* Filter out zero addrs. */
+   for ( i=0; iorig_count; i++ ) {
+   if (is_zero_addr((struct sockaddr *)ss_list[i])) {
+   continue;
+   }
+