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

2013-06-14 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  acae464 Bug 8997: change libreplace GPL source to LGPL
  from  242cc0b When message-type is drvupgrade, MSG_DEBUG should be 
replaced with MSG_PRINTER_DRVUPGRADE.

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


- Log -
commit acae464f7fedd96bbddaed5227756328ea0fe32d
Author: David Disseldorp dd...@samba.org
Date:   Mon Jun 3 13:00:31 2013 +0200

Bug 8997: change libreplace GPL source to LGPL

libreplace currently includes socket.c and getifaddrs.c both of which
are GPL licensed.
Although not required, talloc and tdb build alongside this source,
leading to some ambiguity regarding their LGPL licences.

The following copyright holders have agreed to the GPL-LGPL change:
lib/replace/getifaddrs.c
   Copyright (C) Andrew Tridgell 1998
   Copyright (C) Jeremy Allison 2007
   Copyright (C) Jelmer Vernooij jel...@samba.org 2007

lib/replace/test/getifaddrs.c
lib/replace/socket.c
 * Copyright (C) Michael Adam ob...@samba.org 2008

Signed-off-by: David Disseldorp dd...@samba.org

Reviewed-by: Andrew Bartlett abart...@samba.org

(cherry picked from commit 8a6743e4edcdff1c7860d150720483f19f3b33bb)

---

Summary of changes:
 lib/replace/getifaddrs.c  |   28 
 lib/replace/socket.c  |   22 +-
 lib/replace/test/getifaddrs.c |   24 ++--
 3 files changed, 43 insertions(+), 31 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/getifaddrs.c b/lib/replace/getifaddrs.c
index 84d7906..8da022f 100644
--- a/lib/replace/getifaddrs.c
+++ b/lib/replace/getifaddrs.c
@@ -4,19 +4,23 @@
Copyright (C) Andrew Tridgell 1998
Copyright (C) Jeremy Allison 2007
Copyright (C) Jelmer Vernooij jel...@samba.org 2007
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
+
+ ** NOTE! The following LGPL license applies to the replace
+ ** library. This does NOT imply that all of Samba is released
+ ** under the LGPL
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 3 of the License, or (at your option) any later version.
+
+   This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see http://www.gnu.org/licenses/.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, see http://www.gnu.org/licenses/.
 */
 
 #define SOCKET_WRAPPER_NOT_REPLACE
diff --git a/lib/replace/socket.c b/lib/replace/socket.c
index 35e975f..4cd9d2e 100644
--- a/lib/replace/socket.c
+++ b/lib/replace/socket.c
@@ -5,18 +5,22 @@
  *
  * Copyright (C) Michael Adam ob...@samba.org 2008
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
+ *   ** NOTE! The following LGPL license applies to the replace
+ *   ** library. This does NOT imply that all of Samba is released
+ *   ** under the LGPL
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see http://www.gnu.org/licenses/.
+ * You should have received a 

[SCM] Samba Shared Repository - branch v4-0-test updated

2013-06-14 Thread Karolin Seeger
The branch, v4-0-test has been updated
   via  45ba921 Bug 8997: change libreplace GPL source to LGPL
   via  897bfd1 s4-dfs_server: check for netbios aliases in 
ad_get_referrals (bug #9947)
  from  57a6c8f dns: Support larger queries when asking forwarder

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


- Log -
commit 45ba92168ae958948986dab56e9024252370d2b6
Author: David Disseldorp dd...@samba.org
Date:   Mon Jun 3 13:00:31 2013 +0200

Bug 8997: change libreplace GPL source to LGPL

libreplace currently includes socket.c and getifaddrs.c both of which
are GPL licensed.
Although not required, talloc and tdb build alongside this source,
leading to some ambiguity regarding their LGPL licences.

The following copyright holders have agreed to the GPL-LGPL change:
lib/replace/getifaddrs.c
   Copyright (C) Andrew Tridgell 1998
   Copyright (C) Jeremy Allison 2007
   Copyright (C) Jelmer Vernooij jel...@samba.org 2007

lib/replace/test/getifaddrs.c
lib/replace/socket.c
 * Copyright (C) Michael Adam ob...@samba.org 2008

Signed-off-by: David Disseldorp dd...@samba.org

Reviewed-by: Andrew Bartlett abart...@samba.org

(cherry picked from commit 8a6743e4edcdff1c7860d150720483f19f3b33bb)

Autobuild-User(v4-0-test): Karolin Seeger ksee...@samba.org
Autobuild-Date(v4-0-test): Fri Jun 14 10:53:57 CEST 2013 on sn-devel-104

commit 897bfd1db60baf0690471b32b6b68b61cee3e2df
Author: Björn Baumbach b...@sernet.de
Date:   Wed Jun 5 15:01:14 2013 +0200

s4-dfs_server: check for netbios aliases in ad_get_referrals (bug #9947)

Without this patch ad_get_referrals checks for netbios, dns names
and ip, but not for netbios aliases set by netbios aliases option,
whether the requested name is our dns name.

Pair-programmed-with: Stefan Metzmacher me...@samba.org

Signed-off-by: Björn Baumbach b...@sernet.de
Signed-off-by: Stefan Metzmacher me...@samba.org
Reviewed-by: Michael Adam ob...@samba.org

Autobuild-User(master): Michael Adam ob...@samba.org
Autobuild-Date(master): Tue Jun 11 01:12:08 CEST 2013 on sn-devel-104
(cherry picked from commit 424a990e34278fae4888b00affb530ed1fbcb354)

---

Summary of changes:
 dfs_server/dfs_server_ad.c|   35 +++
 lib/replace/getifaddrs.c  |   28 
 lib/replace/socket.c  |   22 +-
 lib/replace/test/getifaddrs.c |   24 ++--
 4 files changed, 78 insertions(+), 31 deletions(-)


Changeset truncated at 500 lines:

diff --git a/dfs_server/dfs_server_ad.c b/dfs_server/dfs_server_ad.c
index ceabe05..8fa143d 100644
--- a/dfs_server/dfs_server_ad.c
+++ b/dfs_server/dfs_server_ad.c
@@ -751,6 +751,7 @@ NTSTATUS dfs_server_ad_get_referrals(struct 
loadparm_context *lp_ctx,
const char *dns_domain;
const char *netbios_name;
const char *dns_name;
+   const char **netbios_aliases;
 
if (!lpcfg_host_msdfs(lp_ctx)) {
return NT_STATUS_FS_DRIVER_REQUIRED;
@@ -827,6 +828,40 @@ NTSTATUS dfs_server_ad_get_referrals(struct 
loadparm_context *lp_ctx,
return NT_STATUS_NOT_FOUND;
}
 
+   netbios_aliases = lpcfg_netbios_aliases(lp_ctx);
+   while (netbios_aliases  *netbios_aliases) {
+   const char *netbios_alias = *netbios_aliases;
+   char *dns_alias;
+   int cmp;
+
+   cmp = strcasecmp_m(server_name, netbios_alias);
+   if (cmp == 0) {
+   /*
+* If it is not domain related do not
+* handle it here.
+*/
+   return NT_STATUS_NOT_FOUND;
+   }
+
+   dns_alias = talloc_asprintf(r, %s.%s,
+   netbios_alias,
+   dns_domain);
+   if (dns_alias == NULL) {
+   return NT_STATUS_NO_MEMORY;
+   }
+
+   cmp = strcasecmp_m(server_name, dns_alias);
+   talloc_free(dns_alias);
+   if (cmp == 0) {
+   /*
+* If it is not domain related do not
+* handle it here.
+*/
+   return NT_STATUS_NOT_FOUND;
+   }
+   netbios_aliases++;
+   }
+
if ((strcasecmp_m(server_name, netbios_domain) != 0) 
(strcasecmp_m(server_name, dns_domain) != 0)) {
/*
diff --git a/lib/replace/getifaddrs.c b/lib/replace/getifaddrs.c
index 84d7906..8da022f 100644
--- a/lib/replace/getifaddrs.c
+++ b/lib/replace/getifaddrs.c
@@ -4,19 +4,23 @@

[SCM] Samba Shared Repository - branch master updated

2013-06-14 Thread Jeremy Allison
The branch, master has been updated
   via  c71d6ec genrand: Slightly simplify do_reseed
   via  dd0e38b tevent: Fix Coverity ID 989236 Operands don't affect result
  from  f1781ad dsdb: remove a wrong comment in 
dsdb_check_access_on_dn_internal()

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


- Log -
commit c71d6ecbcb463dca64118652e941bb0a162d306f
Author: Volker Lendecke v...@samba.org
Date:   Thu Jun 13 21:55:43 2013 +0200

genrand: Slightly simplify do_reseed

The only caller set use_fd to true.

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Jeremy Allison j...@samba.org

Autobuild-User(master): Jeremy Allison j...@samba.org
Autobuild-Date(master): Fri Jun 14 20:29:56 CEST 2013 on sn-devel-104

commit dd0e38b5feb51c8aa44e76bb6c84202bf8373005
Author: Volker Lendecke v...@samba.org
Date:   Thu Jun 13 20:35:32 2013 +0200

tevent: Fix Coverity ID 989236 Operands don't affect result

unsigned could be less than uint64_t, so idx==UINT64_MAX is always false.

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Jeremy Allison j...@samba.org

---

Summary of changes:
 lib/tevent/tevent_poll.c |2 +-
 lib/util/genrand.c   |   24 +++-
 2 files changed, 12 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent_poll.c b/lib/tevent/tevent_poll.c
index c6e2a00..75d0ced 100644
--- a/lib/tevent/tevent_poll.c
+++ b/lib/tevent/tevent_poll.c
@@ -546,7 +546,7 @@ static int poll_event_loop_poll(struct tevent_context *ev,
   the handler to remove itself when called */
 
for (fde = ev-fd_events; fde; fde = fde-next) {
-   unsigned idx = fde-additional_flags;
+   uint64_t idx = fde-additional_flags;
struct pollfd *pfd;
uint16_t flags = 0;
 
diff --git a/lib/util/genrand.c b/lib/util/genrand.c
index 3dfaf08..0e5902f 100644
--- a/lib/util/genrand.c
+++ b/lib/util/genrand.c
@@ -163,25 +163,23 @@ static void do_filehash(const char *fname, unsigned char 
*the_hash)
  above...
 **/
 
-static int do_reseed(bool use_fd, int fd)
+static int do_reseed(int fd)
 {
unsigned char seed_inbuf[40];
uint32_t v1, v2; struct timeval tval; pid_t mypid;
int reseed_data = 0;
 
-   if (use_fd) {
-   if (fd == -1) {
-   fd = open( /dev/urandom, O_RDONLY,0);
-   if (fd != -1) {
-   smb_set_close_on_exec(fd);
-   }
-   }
-   if (fd != -1
-(read(fd, seed_inbuf, sizeof(seed_inbuf)) == 
sizeof(seed_inbuf))) {
-   seed_random_stream(seed_inbuf, sizeof(seed_inbuf));
-   return fd;
+   if (fd == -1) {
+   fd = open( /dev/urandom, O_RDONLY,0);
+   if (fd != -1) {
+   smb_set_close_on_exec(fd);
}
}
+   if (fd != -1
+(read(fd, seed_inbuf, sizeof(seed_inbuf)) == 
sizeof(seed_inbuf))) {
+   seed_random_stream(seed_inbuf, sizeof(seed_inbuf));
+   return fd;
+   }
 
/* Add in some secret file contents */
 
@@ -244,7 +242,7 @@ _PUBLIC_ void generate_random_buffer(uint8_t *out, int len)
}
}
 
-   urand_fd = do_reseed(true, urand_fd);
+   urand_fd = do_reseed(urand_fd);
done_reseed = true;
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2013-06-14 Thread Stefan Metzmacher
The branch, master has been updated
   via  9f25ad4 librpc: Shorten dcerpc_binding_handle_call a bit
   via  7982d2a librpc: Use tevent_req_poll_ntstatus
   via  20bede7 libsmbclient: Fix typos
   via  fffb701 tsocket: Add some const
   via  cf86f3e gencache: Simplify gencache_init a bit
  from  c71d6ec genrand: Slightly simplify do_reseed

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


- Log -
commit 9f25ad44a93da09b3a7c14a4a1a0e78c5a1b529c
Author: Volker Lendecke v...@samba.org
Date:   Thu Jun 6 11:37:59 2013 +0200

librpc: Shorten dcerpc_binding_handle_call a bit

... saves 200 bytes on 64 bit Linux with -O3

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

Autobuild-User(master): Stefan Metzmacher me...@samba.org
Autobuild-Date(master): Fri Jun 14 22:27:43 CEST 2013 on sn-devel-104

commit 7982d2aff89c7ff8a2371163bad5f9f88be6af46
Author: Volker Lendecke v...@samba.org
Date:   Thu Jun 6 11:31:37 2013 +0200

librpc: Use tevent_req_poll_ntstatus

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

commit 20bede7baa3576aa0f97ceb2533db6e33d587b69
Author: Volker Lendecke v...@samba.org
Date:   Thu May 16 10:26:09 2013 +0200

libsmbclient: Fix typos

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

commit fffb70168d8031dc1999fab963263ac7d3a2442a
Author: Volker Lendecke v...@samba.org
Date:   Tue Jun 11 19:36:09 2013 +0200

tsocket: Add some const

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

commit cf86f3e81b4e228d5f85cac283c51ca7d5e0cd16
Author: Volker Lendecke v...@samba.org
Date:   Tue Jun 11 21:03:22 2013 +0200

gencache: Simplify gencache_init a bit

Use the implicit cleanup facility CLEAR_IF_FIRST provides

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

---

Summary of changes:
 lib/tsocket/tsocket.h  |4 ++--
 lib/tsocket/tsocket_bsd.c  |2 +-
 librpc/rpc/binding_handle.c|   22 +++---
 source3/include/libsmbclient.h |8 
 source3/lib/gencache.c |   29 -
 5 files changed, 30 insertions(+), 35 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tsocket/tsocket.h b/lib/tsocket/tsocket.h
index 98f864e..6b0eef6 100644
--- a/lib/tsocket/tsocket.h
+++ b/lib/tsocket/tsocket.h
@@ -897,12 +897,12 @@ struct sockaddr;
  * @return  0 on success, -1 on error with errno set.
  */
 int tsocket_address_bsd_from_sockaddr(TALLOC_CTX *mem_ctx,
- struct sockaddr *sa,
+ const struct sockaddr *sa,
  size_t sa_socklen,
  struct tsocket_address **addr);
 #else
 int _tsocket_address_bsd_from_sockaddr(TALLOC_CTX *mem_ctx,
-  struct sockaddr *sa,
+  const struct sockaddr *sa,
   size_t sa_socklen,
   struct tsocket_address **_addr,
   const char *location);
diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c
index 89e5f4c..4417f8e 100644
--- a/lib/tsocket/tsocket_bsd.c
+++ b/lib/tsocket/tsocket_bsd.c
@@ -209,7 +209,7 @@ struct tsocket_address_bsd {
 };
 
 int _tsocket_address_bsd_from_sockaddr(TALLOC_CTX *mem_ctx,
-  struct sockaddr *sa,
+  const struct sockaddr *sa,
   size_t sa_socklen,
   struct tsocket_address **_addr,
   const char *location)
diff --git a/librpc/rpc/binding_handle.c b/librpc/rpc/binding_handle.c
index 89ada1d..9354bbd 100644
--- a/librpc/rpc/binding_handle.c
+++ b/librpc/rpc/binding_handle.c
@@ -515,7 +515,7 @@ NTSTATUS dcerpc_binding_handle_call(struct 
dcerpc_binding_handle *h,
TALLOC_CTX *frame = talloc_stackframe();
struct tevent_context *ev;
struct tevent_req *subreq;
-   NTSTATUS status;
+   NTSTATUS status = NT_STATUS_NO_MEMORY;
 
/*
 * TODO: allow only one sync call
@@ -527,30 +527,22 @@ NTSTATUS dcerpc_binding_handle_call(struct 
dcerpc_binding_handle *h,
ev = samba_tevent_context_init(frame);
}
if (ev == NULL) {
-   talloc_free(frame);
-   return NT_STATUS_NO_MEMORY;
+   goto fail;
}
 
subreq = dcerpc_binding_handle_call_send(frame, ev,