Build status as of Fri Aug 27 06:00:02 2010

2010-08-27 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2010-08-26 
00:00:03.0 -0600
+++ /home/build/master/cache/broken_results.txt 2010-08-27 00:00:04.0 
-0600
@@ -1,9 +1,9 @@
-Build status as of Thu Aug 26 06:00:01 2010
+Build status as of Fri Aug 27 06:00:02 2010
 
 Build counts:
 Tree Total  Broken Panic 
 build_farm   0  0  0 
-ccache   32 4  0 
+ccache   32 3  0 
 ccache-maint 30 2  0 
 ldb  32 10 0 
 libreplace   32 11 0 
@@ -16,7 +16,7 @@
 samba_3_current 32 32 4 
 samba_3_master 32 31 0 
 samba_3_next 32 32 5 
-samba_4_0_waf 36 35 0 
-talloc   32 7  0 
+samba_4_0_waf 36 33 1 
+talloc   32 8  0 
 tdb  30 8  0 
 


[SCM] Samba Shared Repository - branch master updated

2010-08-27 Thread Volker Lendecke
The branch, master has been updated
   via  c9e3640 s3: source/ is long gone :-)
  from  bdab6c3 s4-pynet: pynet depends on pyrpc_util

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


- Log -
commit c9e3640afeaa7684f2f05fc697592f116e74935a
Author: Volker Lendecke v...@samba.org
Date:   Fri Aug 27 10:29:26 2010 +0200

s3: source/ is long gone :-)

---

Summary of changes:
 Manifest |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/Manifest b/Manifest
index 20ee0ea..c112d03 100644
--- a/Manifest
+++ b/Manifest
@@ -56,7 +56,7 @@ source(The official Samba source files - 
expect more of these!):
 
Samba uses the GNU autoconf system. In
order to build a default Samba for your platform cd into
-   the source/ directory and then type :
+   the source3/ directory and then type :
 
./configure
 


-- 
Samba Shared Repository


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

2010-08-27 Thread Volker Lendecke
The branch, v3-6-test has been updated
   via  f87ecd7 s3: source/ is long gone :-)
  from  f86ed5e Fix bug #7651 - mknod and mkfifo fails with No such file 
or directory

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


- Log -
commit f87ecd7e2e3d5adb37c7c4d3bdabd98bd3c84f4e
Author: Volker Lendecke v...@samba.org
Date:   Fri Aug 27 10:29:26 2010 +0200

s3: source/ is long gone :-)

---

Summary of changes:
 Manifest |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/Manifest b/Manifest
index 20ee0ea..c112d03 100644
--- a/Manifest
+++ b/Manifest
@@ -56,7 +56,7 @@ source(The official Samba source files - 
expect more of these!):
 
Samba uses the GNU autoconf system. In
order to build a default Samba for your platform cd into
-   the source/ directory and then type :
+   the source3/ directory and then type :
 
./configure
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-08-27 Thread Nadezhda Ivanova
The branch, master has been updated
   via  c679290 s4-dsdb: Fixed a compiler warning.
  from  c9e3640 s3: source/ is long gone :-)

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


- Log -
commit c679290f6e942c44dac7c0bf8105a27d9260d5a8
Author: Nadezhda Ivanova nivan...@samba.org
Date:   Fri Aug 27 12:34:27 2010 +0300

s4-dsdb: Fixed a compiler warning.

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/util.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/util.c 
b/source4/dsdb/samdb/ldb_modules/util.c
index f046abf..36f0ae9 100644
--- a/source4/dsdb/samdb/ldb_modules/util.c
+++ b/source4/dsdb/samdb/ldb_modules/util.c
@@ -1184,7 +1184,6 @@ bool dsdb_block_anonymous_ops(struct ldb_module *module,
  TALLOC_CTX *mem_ctx)
 {
TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
-   struct ldb_context *ldb = ldb_module_get_ctx(module);
bool result;
const struct ldb_val *hr_val = dsdb_module_find_dsheuristics(module,
 tmp_ctx);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-08-27 Thread Günther Deschner
The branch, master has been updated
   via  6bcab32 s3-waf: build samldap passdb backend
  from  c679290 s4-dsdb: Fixed a compiler warning.

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


- Log -
commit 6bcab329e7d5d3c6a6f02f3ebdfe397bc18bb521
Author: Sumit Bose sb...@redhat.com
Date:   Fri Aug 27 11:29:08 2010 +0200

s3-waf: build samldap passdb backend

Signed-off-by: Günther Deschner g...@samba.org

---

Summary of changes:
 source3/wscript   |2 +-
 source3/wscript_build |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/wscript b/source3/wscript
index b61d110..54342d5 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -264,7 +264,7 @@ utimensat vsyslog _write __write __xstat
 conf.CHECK_SAMBA3_CHARSET() # see build/charset.py
 
 
-default_static_modules=TO_LIST('''pdb_smbpasswd pdb_tdbsam pdb_wbc_sam 
rpc_lsarpc rpc_samr
+default_static_modules=TO_LIST('''pdb_smbpasswd pdb_tdbsam pdb_wbc_sam 
pdb_ldap rpc_lsarpc rpc_samr
   rpc_winreg rpc_initshutdown rpc_dssetup 
rpc_wkssvc rpc_svcctl
   rpc_ntsvcs rpc_netlogon rpc_netdfs 
rpc_srvsvc rpc_spoolss
   rpc_eventlog auth_sam auth_unix 
auth_winbind auth_wbc auth_server
diff --git a/source3/wscript_build b/source3/wscript_build
index 90d1bb3..2387d15 100644
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -484,7 +484,7 @@ PASSDB_GET_SET_SRC = '''passdb/pdb_get_set.c'''
 
 PDB_STATIC =''
 PDB_TDBSAM_SRC ='passdb/pdb_tdb.c'
-PDB_LDAP_SRC =  'passdb/pdb_ldap.c'
+PDB_LDAP_SRC =  'passdb/pdb_ldap.c passdb/pdb_nds.c'
 PDB_ADS_SRC =   'passdb/pdb_ads.c'
 PDB_SMBPASSWD_SRC = 'passdb/pdb_smbpasswd.c'
 PDB_WBC_SAM_SRC =   'passdb/pdb_wbc_sam.c'


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-08-27 Thread Volker Lendecke
The branch, master has been updated
   via  8e1d3b5 s3: Pass rhost through to smb_pam_passchange
  from  6bcab32 s3-waf: build samldap passdb backend

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


- Log -
commit 8e1d3b5f8fe4b5bbb61a357e9db62adad7d767f1
Author: Volker Lendecke v...@samba.org
Date:   Wed Aug 18 19:51:45 2010 +0200

s3: Pass rhost through to smb_pam_passchange

---

Summary of changes:
 source3/auth/pampass.c  |5 +++--
 source3/include/proto.h |3 ++-
 source3/rpc_server/srv_samr_chgpasswd.c |   21 ++---
 source3/rpc_server/srv_samr_nt.c|   28 +---
 source3/rpc_server/srv_samr_util.h  |4 ++--
 5 files changed, 42 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/auth/pampass.c b/source3/auth/pampass.c
index 6f8be1a..9d5b9f5 100644
--- a/source3/auth/pampass.c
+++ b/source3/auth/pampass.c
@@ -863,7 +863,8 @@ NTSTATUS smb_pam_passcheck(const char * user, const char * 
password)
  * PAM Password Change Suite
  */
 
-bool smb_pam_passchange(const char * user, const char * oldpassword, const 
char * newpassword)
+bool smb_pam_passchange(const char *user, const char *rhost,
+   const char *oldpassword, const char *newpassword)
 {
/* Appropriate quantities of root should be obtained BEFORE calling 
this function */
struct pam_conv *pconv = NULL;
@@ -872,7 +873,7 @@ bool smb_pam_passchange(const char * user, const char * 
oldpassword, const char
if ((pconv = smb_setup_pam_conv(smb_pam_passchange_conv, user, 
oldpassword, newpassword)) == NULL)
return False;
 
-   if(!smb_pam_start(pamh, user, NULL, pconv))
+   if(!smb_pam_start(pamh, user, rhost, pconv))
return False;
 
if (!smb_pam_chauthtok(pamh, user)) {
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 4b34ec0..1cafe9b 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -223,7 +223,8 @@ bool smb_pam_claim_session(char *user, char *tty, char 
*rhost);
 bool smb_pam_close_session(char *user, char *tty, char *rhost);
 NTSTATUS smb_pam_accountcheck(const char *user, const char *rhost);
 NTSTATUS smb_pam_passcheck(const char * user, const char * password);
-bool smb_pam_passchange(const char * user, const char * oldpassword, const 
char * newpassword);
+bool smb_pam_passchange(const char *user, const char *rhost,
+   const char *oldpassword, const char *newpassword);
 bool smb_pam_claim_session(char *user, char *tty, char *rhost);
 bool smb_pam_close_session(char *in_user, char *tty, char *rhost);
 
diff --git a/source3/rpc_server/srv_samr_chgpasswd.c 
b/source3/rpc_server/srv_samr_chgpasswd.c
index 525f838..d31215b 100644
--- a/source3/rpc_server/srv_samr_chgpasswd.c
+++ b/source3/rpc_server/srv_samr_chgpasswd.c
@@ -486,7 +486,7 @@ while we were waiting\n, WTERMSIG(wstat)));
return (chstat);
 }
 
-bool chgpasswd(const char *name, const struct passwd *pass,
+bool chgpasswd(const char *name, const char *rhost, const struct passwd *pass,
   const char *oldpass, const char *newpass, bool as_root)
 {
char *passwordprogram = NULL;
@@ -546,9 +546,11 @@ bool chgpasswd(const char *name, const struct passwd *pass,
become_root();
 
if (pass) {
-   ret = smb_pam_passchange(pass-pw_name, oldpass, 
newpass);
+   ret = smb_pam_passchange(pass-pw_name, rhost,
+oldpass, newpass);
} else {
-   ret = smb_pam_passchange(name, oldpass, newpass);
+   ret = smb_pam_passchange(name, rhost, oldpass,
+newpass);
}
 
if (as_root)
@@ -961,7 +963,10 @@ NTSTATUS check_password_complexity(const char *username,
  is correct before calling. JRA.
 /
 
-static NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char 
*new_passwd, bool as_root, enum samPwdChangeReason *samr_reject_reason)
+static NTSTATUS change_oem_password(struct samu *hnd, const char *rhost,
+   char *old_passwd, char *new_passwd,
+   bool as_root,
+   enum samPwdChangeReason *samr_reject_reason)
 {
uint32 min_len;
uint32 refuse;
@@ -1054,7 +1059,8 @@ static NTSTATUS change_oem_password(struct samu *hnd, 
char *old_passwd, char *ne
 */
 
if(lp_unix_password_sync() 
-   !chgpasswd(username, pass, old_passwd, new_passwd, as_root)) {
+  !chgpasswd(username, rhost, pass, old_passwd, 

[SCM] Samba Shared Repository - branch master updated

2010-08-27 Thread Stefan Metzmacher
The branch, master has been updated
   via  44b2a79 lib/tsocket: sa_socklen is a macro on irix, so better use 
sasocklen
  from  8e1d3b5 s3: Pass rhost through to smb_pam_passchange

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


- Log -
commit 44b2a7941c1da4c565cb14bae7acc355787ecc6e
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Aug 27 11:42:05 2010 +0200

lib/tsocket: sa_socklen is a macro on irix, so better use sasocklen

metze

---

Summary of changes:
 lib/tsocket/tsocket.h |   16 +-
 lib/tsocket/tsocket_bsd.c |   58 
 lib/tsocket/tsocket_guide.txt |4 +-
 3 files changed, 39 insertions(+), 39 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tsocket/tsocket.h b/lib/tsocket/tsocket.h
index 3dd9666..fb76fe5 100644
--- a/lib/tsocket/tsocket.h
+++ b/lib/tsocket/tsocket.h
@@ -843,7 +843,7 @@ struct sockaddr;
  *
  * @param[in]  sa   The sockaddr structure to convert.
  *
- * @param[in]  sa_socklen   The lenth of the sockaddr sturucte.
+ * @param[in]  sasocklen   The lenth of the sockaddr sturucte.
  *
  * @param[out] addr The tsocket pointer to allocate and fill.
  *
@@ -851,17 +851,17 @@ struct sockaddr;
  */
 int tsocket_address_bsd_from_sockaddr(TALLOC_CTX *mem_ctx,
  struct sockaddr *sa,
- size_t sa_socklen,
+ size_t sasocklen,
  struct tsocket_address **addr);
 #else
 int _tsocket_address_bsd_from_sockaddr(TALLOC_CTX *mem_ctx,
   struct sockaddr *sa,
-  size_t sa_socklen,
+  size_t sasocklen,
   struct tsocket_address **_addr,
   const char *location);
 
-#define tsocket_address_bsd_from_sockaddr(mem_ctx, sa, sa_socklen, _addr) \
-   _tsocket_address_bsd_from_sockaddr(mem_ctx, sa, sa_socklen, _addr, \
+#define tsocket_address_bsd_from_sockaddr(mem_ctx, sa, sasocklen, _addr) \
+   _tsocket_address_bsd_from_sockaddr(mem_ctx, sa, sasocklen, _addr, \
   __location__)
 #endif
 
@@ -872,10 +872,10 @@ int _tsocket_address_bsd_from_sockaddr(TALLOC_CTX 
*mem_ctx,
  *
  * @param[in]  sa   The bsd sockaddr structure to fill out.
  *
- * @param[in]  sa_socklen   The length of the  bsd sockaddr structure to fill 
out.
+ * @param[in]  sasocklen   The length of the  bsd sockaddr structure to fill 
out.
  *
  * @return  The actual size of the sockaddr structure, -1 on error
- *  with errno set. The size could differ from sa_socklen.
+ *  with errno set. The size could differ from sasocklen.
  *
  * @code
  *   ssize_t socklen;
@@ -891,7 +891,7 @@ int _tsocket_address_bsd_from_sockaddr(TALLOC_CTX *mem_ctx,
  */
 ssize_t tsocket_address_bsd_sockaddr(const struct tsocket_address *addr,
 struct sockaddr *sa,
-size_t sa_socklen);
+size_t sasocklen);
 
 #ifdef DOXYGEN
 /**
diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c
index dfc9685..c8322f8 100644
--- a/lib/tsocket/tsocket_bsd.c
+++ b/lib/tsocket/tsocket_bsd.c
@@ -190,7 +190,7 @@ static ssize_t tsocket_bsd_pending(int fd)
 static const struct tsocket_address_ops tsocket_address_bsd_ops;
 
 struct tsocket_address_bsd {
-   socklen_t sa_socklen;
+   socklen_t sasocklen;
union {
struct sockaddr sa;
struct sockaddr_in in;
@@ -204,38 +204,38 @@ struct tsocket_address_bsd {
 
 int _tsocket_address_bsd_from_sockaddr(TALLOC_CTX *mem_ctx,
   struct sockaddr *sa,
-  size_t sa_socklen,
+  size_t sasocklen,
   struct tsocket_address **_addr,
   const char *location)
 {
struct tsocket_address *addr;
struct tsocket_address_bsd *bsda;
 
-   if (sa_socklen  sizeof(sa-sa_family)) {
+   if (sasocklen  sizeof(sa-sa_family)) {
errno = EINVAL;
return -1;
}
 
switch (sa-sa_family) {
case AF_UNIX:
-   if (sa_socklen  sizeof(struct sockaddr_un)) {
-   sa_socklen = sizeof(struct sockaddr_un);
+   if (sasocklen  sizeof(struct sockaddr_un)) {
+   sasocklen = sizeof(struct sockaddr_un);
}
break;
case AF_INET:
-   if (sa_socklen  sizeof(struct sockaddr_in)) {
+   if 

[SCM] Samba Shared Repository - branch master updated

2010-08-27 Thread Volker Lendecke
The branch, master has been updated
   via  e8cfc2f s3: Cache results of finding printer names
  from  44b2a79 lib/tsocket: sa_socklen is a macro on irix, so better use 
sasocklen

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


- Log -
commit e8cfc2f1de4b60f192a391dd02e405a152a7d5a6
Author: Volker Lendecke v...@samba.org
Date:   Fri Aug 27 14:44:16 2010 +0200

s3: Cache results of finding printer names

With hundreds of printers or on a slow machine, this can become expensive.

Problem reported and patch sponsored by DESY, Hamburg (www.desy.de)

---

Summary of changes:
 source3/rpc_server/srv_spoolss_nt.c |   39 +++
 1 files changed, 39 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index 5df20d4..4e97122 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -470,6 +470,14 @@ static bool set_printer_hnd_name(TALLOC_CTX *mem_ctx,
struct spoolss_PrinterInfo2 *info2 = NULL;
WERROR result;
 
+   /*
+* Hopefully nobody names his printers like this. Maybe \ or ,
+* are illegal in printer names even?
+*/
+   const char printer_not_found[] = Printer \\, !...@#$%^*( not found;
+   char *cache_key;
+   char *tmp;
+
DEBUG(4,(Setting printer name=%s (len=%lu)\n, handlename,
(unsigned long)strlen(handlename)));
 
@@ -509,6 +517,27 @@ static bool set_printer_hnd_name(TALLOC_CTX *mem_ctx,
found = true;
}
 
+   /*
+* With hundreds of printers, the for loop iterating all
+* shares can be quite expensive, as it is done on every
+* OpenPrinter. The loop maps aprinter to sname, the
+* result of which we cache in gencache.
+*/
+
+   cache_key = talloc_asprintf(talloc_tos(), PRINTERNAME/%s,
+   aprinter);
+   if ((cache_key != NULL)  gencache_get(cache_key, tmp, NULL)) {
+
+   found = (strcmp(tmp, printer_not_found) != 0);
+   if (!found) {
+   DEBUG(4, (Printer %s not found\n, aprinter));
+   SAFE_FREE(tmp);
+   return false;
+   }
+   fstrcpy(sname, tmp);
+   SAFE_FREE(tmp);
+   }
+
/* Search all sharenames first as this is easier than pulling
   the printer_info_2 off of disk. Don't use find_service() since
   that calls out to map_username() */
@@ -569,10 +598,20 @@ static bool set_printer_hnd_name(TALLOC_CTX *mem_ctx,
}
 
if ( !found ) {
+   if (cache_key != NULL) {
+   gencache_set(cache_key, printer_not_found,
+time(NULL)+300);
+   TALLOC_FREE(cache_key);
+   }
DEBUGADD(4,(Printer not found\n));
return false;
}
 
+   if (cache_key != NULL) {
+   gencache_set(cache_key, sname, time(NULL)+300);
+   TALLOC_FREE(cache_key);
+   }
+
DEBUGADD(4,(set_printer_hnd_name: Printer found: %s - %s\n, 
aprinter, sname));
 
fstrcpy(Printer-sharename, sname);


-- 
Samba Shared Repository


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

2010-08-27 Thread Volker Lendecke
The branch, v3-6-test has been updated
   via  03bfeb9 s3: Cache results of finding printer names
  from  f87ecd7 s3: source/ is long gone :-)

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


- Log -
commit 03bfeb96c9391d9e08b50b1133e5674256fe4b90
Author: Volker Lendecke v...@samba.org
Date:   Fri Aug 27 14:44:16 2010 +0200

s3: Cache results of finding printer names

With hundreds of printers or on a slow machine, this can become expensive.

Problem reported and patch sponsored by DESY, Hamburg (www.desy.de)

---

Summary of changes:
 source3/rpc_server/srv_spoolss_nt.c |   39 +++
 1 files changed, 39 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index d33801e..dc686e6 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -455,6 +455,14 @@ static bool set_printer_hnd_name(TALLOC_CTX *mem_ctx,
struct spoolss_PrinterInfo2 *info2 = NULL;
WERROR result;
 
+   /*
+* Hopefully nobody names his printers like this. Maybe \ or ,
+* are illegal in printer names even?
+*/
+   const char printer_not_found[] = Printer \\, !...@#$%^*( not found;
+   char *cache_key;
+   char *tmp;
+
DEBUG(4,(Setting printer name=%s (len=%lu)\n, handlename,
(unsigned long)strlen(handlename)));
 
@@ -494,6 +502,27 @@ static bool set_printer_hnd_name(TALLOC_CTX *mem_ctx,
found = true;
}
 
+   /*
+* With hundreds of printers, the for loop iterating all
+* shares can be quite expensive, as it is done on every
+* OpenPrinter. The loop maps aprinter to sname, the
+* result of which we cache in gencache.
+*/
+
+   cache_key = talloc_asprintf(talloc_tos(), PRINTERNAME/%s,
+   aprinter);
+   if ((cache_key != NULL)  gencache_get(cache_key, tmp, NULL)) {
+
+   found = (strcmp(tmp, printer_not_found) != 0);
+   if (!found) {
+   DEBUG(4, (Printer %s not found\n, aprinter));
+   SAFE_FREE(tmp);
+   return false;
+   }
+   fstrcpy(sname, tmp);
+   SAFE_FREE(tmp);
+   }
+
/* Search all sharenames first as this is easier than pulling
   the printer_info_2 off of disk. Don't use find_service() since
   that calls out to map_username() */
@@ -553,10 +582,20 @@ static bool set_printer_hnd_name(TALLOC_CTX *mem_ctx,
}
 
if ( !found ) {
+   if (cache_key != NULL) {
+   gencache_set(cache_key, printer_not_found,
+time(NULL)+300);
+   TALLOC_FREE(cache_key);
+   }
DEBUGADD(4,(Printer not found\n));
return false;
}
 
+   if (cache_key != NULL) {
+   gencache_set(cache_key, sname, time(NULL)+300);
+   TALLOC_FREE(cache_key);
+   }
+
DEBUGADD(4,(set_printer_hnd_name: Printer found: %s - %s\n, 
aprinter, sname));
 
fstrcpy(Printer-sharename, sname);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-08-27 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  ef334b9 s4:torture/rpc/winreg.c - set error_message to NULL in 
test_HKLM_wellknown
   via  e736ace s4:torture/spoolss_access.c - fix discarded const warning
   via  a133d83 s4:torture/raw/notify.c - freeable stuff shouldn't be 
const
   via  4def677 s4:ntvfs/posix/pvfs_*.c - quiet Solaris warnings
   via  e4afcd6 s4:credentials_krb5.c - quiet a Solaris warning
  from  e8cfc2f s3: Cache results of finding printer names

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


- Log -
commit ef334b95faaa8b8d97ff091299c454dfc8fd390c
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Aug 27 19:02:49 2010 +0200

s4:torture/rpc/winreg.c - set error_message to NULL in 
test_HKLM_wellknown

Hopefully this fixes the build on Solaris 8.

commit e736ace470cec34fe51ee0a7b03981ab9b16d6cd
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Aug 26 22:48:27 2010 +0200

s4:torture/spoolss_access.c - fix discarded const warning

discard_const_p seems the most appropriate here.

commit a133d83607ce9db9a4725b170001e934648150da
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Aug 26 22:43:05 2010 +0200

s4:torture/raw/notify.c - freeable stuff shouldn't be const

commit 4def6775b56242590b4f7d9cb0f5b0442e33248f
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Aug 26 22:35:09 2010 +0200

s4:ntvfs/posix/pvfs_*.c - quiet Solaris warnings

Fix the function argument of pvfs_xattr_ndr_load/save.

commit e4afcd62bccf04f2afc779d7292f49e10c29b970
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Aug 26 22:30:04 2010 +0200

s4:credentials_krb5.c - quiet a Solaris warning

---

Summary of changes:
 source4/auth/credentials/credentials_krb5.c |3 ++-
 source4/ntvfs/posix/pvfs_acl_nfs4.c |4 ++--
 source4/ntvfs/posix/pvfs_acl_xattr.c|6 ++
 source4/ntvfs/posix/pvfs_xattr.c|   18 +-
 source4/torture/raw/notify.c|2 +-
 source4/torture/rpc/spoolss_access.c|5 +++--
 source4/torture/rpc/winreg.c|   27 ++-
 7 files changed, 37 insertions(+), 28 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/credentials/credentials_krb5.c 
b/source4/auth/credentials/credentials_krb5.c
index 622f674..4021146 100644
--- a/source4/auth/credentials/credentials_krb5.c
+++ b/source4/auth/credentials/credentials_krb5.c
@@ -479,7 +479,8 @@ _PUBLIC_ int cli_credentials_get_client_gss_creds(struct 
cli_credentials *cred,
for (num_ktypes = 0; etypes[num_ktypes]; num_ktypes++);
 
maj_stat = gss_krb5_set_allowable_enctypes(min_stat, 
gcc-creds,
-  num_ktypes, etypes);
+  num_ktypes,
+  (int32_t *) etypes);
krb5_xfree (etypes);
if (maj_stat) {
talloc_free(gcc);
diff --git a/source4/ntvfs/posix/pvfs_acl_nfs4.c 
b/source4/ntvfs/posix/pvfs_acl_nfs4.c
index 8824602..ea620ba 100644
--- a/source4/ntvfs/posix/pvfs_acl_nfs4.c
+++ b/source4/ntvfs/posix/pvfs_acl_nfs4.c
@@ -47,7 +47,7 @@ static NTSTATUS pvfs_acl_load_nfs4(struct pvfs_state *pvfs, 
struct pvfs_filename
 
status = pvfs_xattr_ndr_load(pvfs, mem_ctx, name-full_name, fd, 
 NFS4ACL_XATTR_NAME,
-acl, ndr_pull_nfs4acl);
+acl, (void *) ndr_pull_nfs4acl);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(acl);
return status;
@@ -184,7 +184,7 @@ static NTSTATUS pvfs_acl_save_nfs4(struct pvfs_state *pvfs, 
struct pvfs_filename
privs = root_privileges();
status = pvfs_xattr_ndr_save(pvfs, name-full_name, fd, 
 NFS4ACL_XATTR_NAME, 
-acl, ndr_push_nfs4acl);
+acl, (void *) ndr_push_nfs4acl);
talloc_free(privs);
 
talloc_free(tmp_ctx);
diff --git a/source4/ntvfs/posix/pvfs_acl_xattr.c 
b/source4/ntvfs/posix/pvfs_acl_xattr.c
index 87bb6bc..dbeee82 100644
--- a/source4/ntvfs/posix/pvfs_acl_xattr.c
+++ b/source4/ntvfs/posix/pvfs_acl_xattr.c
@@ -43,8 +43,7 @@ static NTSTATUS pvfs_acl_load_xattr(struct pvfs_state *pvfs, 
struct pvfs_filenam
 
status = pvfs_xattr_ndr_load(pvfs, mem_ctx, name-full_name, fd, 
 XATTR_NTACL_NAME,
-acl, 
-(ndr_pull_flags_fn_t)ndr_pull_xattr_NTACL);
+acl, (void *) 

[SCM] Samba Shared Repository - branch master updated

2010-08-27 Thread Volker Lendecke
The branch, master has been updated
   via  619c348 s3: Pass private_data through string_combinations()
  from  ef334b9 s4:torture/rpc/winreg.c - set error_message to NULL in 
test_HKLM_wellknown

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


- Log -
commit 619c348ba325961c23dd7883bbaf33e7a99846e6
Author: Volker Lendecke v...@samba.org
Date:   Sat Aug 21 14:48:28 2010 +0200

s3: Pass private_data through string_combinations()

---

Summary of changes:
 source3/auth/pass_check.c |   36 
 1 files changed, 24 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/auth/pass_check.c b/source3/auth/pass_check.c
index ee35fba..5943761 100644
--- a/source3/auth/pass_check.c
+++ b/source3/auth/pass_check.c
@@ -492,8 +492,10 @@ try all combinations with N uppercase letters.
 offset is the first char to try and change (start with 0)
 it assumes the string starts lowercased
 /
-static NTSTATUS string_combinations2(char *s, int offset, NTSTATUS (*fn) 
(const char *),
-int N)
+static NTSTATUS string_combinations2(char *s, int offset,
+NTSTATUS (*fn)(const char *s,
+   void *private_data),
+int N, void *private_data)
 {
int len = strlen(s);
int i;
@@ -504,15 +506,17 @@ static NTSTATUS string_combinations2(char *s, int offset, 
NTSTATUS (*fn) (const
 #endif
 
if (N = 0 || offset = len)
-   return (fn(s));
+   return (fn(s, private_data));
 
for (i = offset; i  (len - (N - 1)); i++) {
char c = s[i];
if (!islower_ascii(c))
continue;
s[i] = toupper_ascii(c);
-   if (!NT_STATUS_EQUAL(nt_status = string_combinations2(s, i + 1, 
fn, N - 1),NT_STATUS_WRONG_PASSWORD)) {
-   return (nt_status);
+   nt_status = string_combinations2(s, i + 1, fn, N - 1,
+private_data);
+   if (!NT_STATUS_EQUAL(nt_status, NT_STATUS_WRONG_PASSWORD)) {
+   return nt_status;
}
s[i] = c;
}
@@ -526,13 +530,19 @@ try all combinations with up to N uppercase letters.
 offset is the first char to try and change (start with 0)
 it assumes the string starts lowercased
 /
-static NTSTATUS string_combinations(char *s, NTSTATUS (*fn) (const char *), 
int N)
+static NTSTATUS string_combinations(char *s,
+   NTSTATUS (*fn)(const char *s,
+  void *private_data),
+   int N, void *private_data)
 {
int n;
NTSTATUS nt_status;
-   for (n = 1; n = N; n++)
-   if (!NT_STATUS_EQUAL(nt_status = string_combinations2(s, 0, fn, 
n), NT_STATUS_WRONG_PASSWORD))
+   for (n = 1; n = N; n++) {
+   nt_status = string_combinations2(s, 0, fn, n, private_data);
+   if (!NT_STATUS_EQUAL(nt_status, NT_STATUS_WRONG_PASSWORD)) {
return nt_status;
+   }
+   }
return NT_STATUS_WRONG_PASSWORD;
 }
 
@@ -540,7 +550,7 @@ static NTSTATUS string_combinations(char *s, NTSTATUS (*fn) 
(const char *), int
 /
 core of password checking routine
 /
-static NTSTATUS password_check(const char *password)
+static NTSTATUS password_check(const char *password, void *private_data)
 {
 #ifdef WITH_PAM
return smb_pam_passcheck(get_this_user(), password);
@@ -820,7 +830,7 @@ NTSTATUS pass_check(const struct passwd *pass,
 #endif /* defined(WITH_PAM) */
 
/* try it as it came to us */
-   nt_status = password_check(password);
+   nt_status = password_check(password, NULL);
 if NT_STATUS_IS_OK(nt_status) {
return (nt_status);
} else if (!NT_STATUS_EQUAL(nt_status, NT_STATUS_WRONG_PASSWORD)) {
@@ -848,7 +858,8 @@ NTSTATUS pass_check(const struct passwd *pass,
/* try all lowercase if it's currently all uppercase */
if (strhasupper(pass2)) {
strlower_m(pass2);
-   if NT_STATUS_IS_OK(nt_status = password_check(pass2)) {
+   nt_status = password_check(pass2, NULL);
+   if NT_STATUS_IS_OK(nt_status) {
return (nt_status);
}
}
@@ -861,7 +872,8 @@ NTSTATUS pass_check(const struct 

[SCM] Samba Shared Repository - branch master updated

2010-08-27 Thread Volker Lendecke
The branch, master has been updated
   via  9322fa4 s3: Lift smbd_server_fd() from smb_pam_passcheck
   via  26ee305 s3: Lift smbd_server_fd() from smb_pam_start
  from  619c348 s3: Pass private_data through string_combinations()

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


- Log -
commit 9322fa4077a9c15c9b5431ac2369b50bfffbb73d
Author: Volker Lendecke v...@samba.org
Date:   Sat Aug 21 14:41:01 2010 +0200

s3: Lift smbd_server_fd() from smb_pam_passcheck

commit 26ee30585dbffd7e887c48ddf0900fe0afd90e47
Author: Volker Lendecke v...@samba.org
Date:   Sat Aug 21 14:38:11 2010 +0200

s3: Lift smbd_server_fd() from smb_pam_start

smb_pam_passcheck() is the only caller that fills in NULL, all other callers
now properly fill rhost

---

Summary of changes:
 source3/auth/pampass.c|   22 +-
 source3/auth/pass_check.c |9 -
 source3/include/proto.h   |3 ++-
 3 files changed, 15 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/auth/pampass.c b/source3/auth/pampass.c
index 9d5b9f5..7c09c16 100644
--- a/source3/auth/pampass.c
+++ b/source3/auth/pampass.c
@@ -479,10 +479,6 @@ static bool smb_pam_end(pam_handle_t *pamh, struct 
pam_conv *smb_pam_conv_ptr)
 static bool smb_pam_start(pam_handle_t **pamh, const char *user, const char 
*rhost, struct pam_conv *pconv)
 {
int pam_error;
-#if HAVE_PAM_RHOST
-   const char *our_rhost;
-   char addr[INET6_ADDRSTRLEN];
-#endif
 
*pamh = (pam_handle_t *)NULL;
 
@@ -495,17 +491,8 @@ static bool smb_pam_start(pam_handle_t **pamh, const char 
*user, const char *rho
}
 
 #if HAVE_PAM_RHOST
-   if (rhost == NULL) {
-   our_rhost = client_name(smbd_server_fd());
-   if (strequal(our_rhost,UNKNOWN))
-   our_rhost = client_addr(smbd_server_fd(), addr,
-   sizeof(addr));
-   } else {
-   our_rhost = rhost;
-   }
-
-   DEBUG(4,(smb_pam_start: PAM: setting rhost to: %s\n, our_rhost));
-   pam_error = pam_set_item(*pamh, PAM_RHOST, our_rhost);
+   DEBUG(4,(smb_pam_start: PAM: setting rhost to: %s\n, rhost));
+   pam_error = pam_set_item(*pamh, PAM_RHOST, rhost);
if(!smb_pam_error_handler(*pamh, pam_error, set rhost failed, 0)) {
smb_pam_end(*pamh, pconv);
*pamh = (pam_handle_t *)NULL;
@@ -819,7 +806,8 @@ NTSTATUS smb_pam_accountcheck(const char *user, const char 
*rhost)
  * PAM Password Validation Suite
  */
 
-NTSTATUS smb_pam_passcheck(const char * user, const char * password)
+NTSTATUS smb_pam_passcheck(const char * user, const char * password,
+  const char * rhost)
 {
pam_handle_t *pamh = NULL;
NTSTATUS nt_status = NT_STATUS_LOGON_FAILURE;
@@ -834,7 +822,7 @@ NTSTATUS smb_pam_passcheck(const char * user, const char * 
password)
if ((pconv = smb_setup_pam_conv(smb_pam_conv, user, password, NULL)) == 
NULL)
return NT_STATUS_LOGON_FAILURE;
 
-   if (!smb_pam_start(pamh, user, NULL, pconv))
+   if (!smb_pam_start(pamh, user, rhost, pconv))
return NT_STATUS_LOGON_FAILURE;
 
if (!NT_STATUS_IS_OK(nt_status = smb_pam_auth(pamh, user))) {
diff --git a/source3/auth/pass_check.c b/source3/auth/pass_check.c
index 5943761..a4bc6b5 100644
--- a/source3/auth/pass_check.c
+++ b/source3/auth/pass_check.c
@@ -553,7 +553,14 @@ core of password checking routine
 static NTSTATUS password_check(const char *password, void *private_data)
 {
 #ifdef WITH_PAM
-   return smb_pam_passcheck(get_this_user(), password);
+   const char *rhost;
+   char addr[INET6_ADDRSTRLEN];
+
+   rhost = client_name(smbd_server_fd());
+   if (strequal(rhost,UNKNOWN))
+   rhost = client_addr(smbd_server_fd(), addr, sizeof(addr));
+
+   return smb_pam_passcheck(get_this_user(), rhost, password);
 #else
 
bool ret;
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 1cafe9b..7d16559 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -222,7 +222,8 @@ NTSTATUS auth_wbc_init(void);
 bool smb_pam_claim_session(char *user, char *tty, char *rhost);
 bool smb_pam_close_session(char *user, char *tty, char *rhost);
 NTSTATUS smb_pam_accountcheck(const char *user, const char *rhost);
-NTSTATUS smb_pam_passcheck(const char * user, const char * password);
+NTSTATUS smb_pam_passcheck(const char * user, const char * password,
+  const char * rhost);
 bool smb_pam_passchange(const char *user, const char *rhost,
const char *oldpassword, const char *newpassword);
 bool smb_pam_claim_session(char *user, char *tty, char *rhost);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-08-27 Thread Jeremy Allison
The branch, master has been updated
   via  04f021e Fix bug #7653 - When SMB2 is on, Windows 7 clients can not 
connect as guest to a share.
  from  9322fa4 s3: Lift smbd_server_fd() from smb_pam_passcheck

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


- Log -
commit 04f021e69227a9c8094a5d617f53f3a1887e2da3
Author: Jeremy Allison j...@samba.org
Date:   Fri Aug 27 15:25:04 2010 -0700

Fix bug #7653 - When SMB2 is on, Windows 7 clients can not connect as guest 
to a share.

Fix security = share with SMB2 by mapping internally
to security = user and map to guest = Bad User.

Jeremy.

---

Summary of changes:
 source3/smbd/smb2_server.c |8 
 1 files changed, 8 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 6db50f9..b9fc3dc 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -2045,6 +2045,14 @@ void smbd_smb2_first_negprot(struct 
smbd_server_connection *sconn,
struct smbd_smb2_request *req;
struct tevent_req *subreq;
 
+   if (lp_security() == SEC_SHARE) {
+   DEBUG(2,(WARNING!!: \security = share\ is deprecated for 
+   SMB2 servers. Mapping to \security = user\ and 
+   \map to guest = Bad User\\n ));
+   lp_do_parameter(-1, security, user);
+   lp_do_parameter(-1, map to guest, Bad User);
+   }
+
DEBUG(10,(smbd_smb2_first_negprot: packet length %u\n,
 (unsigned int)size));
 


-- 
Samba Shared Repository


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

2010-08-27 Thread Jeremy Allison
The branch, v3-6-test has been updated
   via  6d4dead Fix bug #7653 - When SMB2 is on, Windows 7 clients can not 
connect as guest to a share.
  from  03bfeb9 s3: Cache results of finding printer names

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


- Log -
commit 6d4dead973d5124fc70e541d4b0630e23decd682
Author: Jeremy Allison j...@samba.org
Date:   Fri Aug 27 15:25:04 2010 -0700

Fix bug #7653 - When SMB2 is on, Windows 7 clients can not connect as guest 
to a share.

Fix security = share with SMB2 by mapping internally
to security = user and map to guest = Bad User.

Jeremy.
(cherry picked from commit 04f021e69227a9c8094a5d617f53f3a1887e2da3)

---

Summary of changes:
 source3/smbd/smb2_server.c |8 
 1 files changed, 8 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index e604728..5be83ff 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -2045,6 +2045,14 @@ void smbd_smb2_first_negprot(struct 
smbd_server_connection *sconn,
struct smbd_smb2_request *req;
struct tevent_req *subreq;
 
+   if (lp_security() == SEC_SHARE) {
+   DEBUG(2,(WARNING!!: \security = share\ is deprecated for 
+   SMB2 servers. Mapping to \security = user\ and 
+   \map to guest = Bad User\\n ));
+   lp_do_parameter(-1, security, user);
+   lp_do_parameter(-1, map to guest, Bad User);
+   }
+
DEBUG(10,(smbd_smb2_first_negprot: packet length %u\n,
 (unsigned int)size));
 


-- 
Samba Shared Repository