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

2009-11-04 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  c572a5b... Remove Protocol as an extern, and add accessor 
functions. Jeremy. (cherry picked from commit 
cbafe17bb37acfb76acf9d9905be1029e274089e)
  from  fedf1a0... s3: add support for full windows timestamps resolution 
on files

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


- Log -
commit c572a5baa6645549e3bce8f2e049baba97fc4106
Author: Jeremy Allison j...@samba.org
Date:   Wed Nov 4 15:15:50 2009 -0800

Remove Protocol as an extern, and add accessor functions.
Jeremy.
(cherry picked from commit cbafe17bb37acfb76acf9d9905be1029e274089e)

---

Summary of changes:
 source3/include/proto.h |2 ++
 source3/lib/util.c  |   12 +++-
 source3/param/loadparm.c|3 +--
 source3/smbd/negprot.c  |   13 ++---
 source3/smbd/nttrans.c  |3 +--
 source3/smbd/reply.c|   12 +---
 source3/smbd/sesssetup.c|6 ++
 source3/smbd/smb2_negprot.c |4 +---
 source3/smbd/trans2.c   |6 ++
 9 files changed, 31 insertions(+), 30 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index e133b88..82705b7 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1073,6 +1073,8 @@ struct passwd *Get_Pwnam_alloc(TALLOC_CTX *mem_ctx, const 
char *user);
 
 /* The following definitions come from lib/util.c  */
 
+enum protocol_types get_Protocol(void);
+void set_Protocol(enum protocol_types  p);
 bool all_zero(const uint8_t *ptr, size_t size);
 bool set_global_myname(const char *myname);
 const char *global_myname(void);
diff --git a/source3/lib/util.c b/source3/lib/util.c
index b066a0d..247042d 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -55,7 +55,17 @@ extern unsigned int global_clobber_region_line;
 #endif /* WITH_NISPLUS_HOME */
 #endif /* HAVE_NETGROUP  WITH_AUTOMOUNT */
 
-enum protocol_types Protocol = PROTOCOL_COREPLUS;
+static enum protocol_types Protocol = PROTOCOL_COREPLUS;
+
+enum protocol_types get_Protocol(void)
+{
+   return Protocol;
+}
+
+void set_Protocol(enum protocol_types  p)
+{
+   Protocol = p;
+}
 
 static enum remote_arch_types ra_type = RA_UNKNOWN;
 
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 93be017..06fb962 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -64,7 +64,6 @@
 
 bool bLoaded = False;
 
-extern enum protocol_types Protocol;
 extern userdom_struct current_user_info;
 
 #ifndef GLOBAL_NAME
@@ -9720,7 +9719,7 @@ bool lp_use_sendfile(int snum, struct smb_signing_state 
*signing_state)
bool sign_active = false;
 
/* Using sendfile blows the brains out of any DOS or Win9x TCP stack... 
JRA. */
-   if (Protocol  PROTOCOL_NT1) {
+   if (get_Protocol()  PROTOCOL_NT1) {
return false;
}
if (signing_state) {
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index 372f38e..81d29d9 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -23,7 +23,6 @@
 #include ../libcli/auth/spnego.h
 
 extern fstring remote_proto;
-extern enum protocol_types Protocol;
 
 static void get_challenge(uint8 buff[8])
 {
@@ -61,7 +60,7 @@ static void reply_corep(struct smb_request *req, uint16 
choice)
reply_outbuf(req, 1, 0);
SSVAL(req-outbuf, smb_vwv0, choice);
 
-   Protocol = PROTOCOL_CORE;
+   set_Protocol(PROTOCOL_CORE);
 }
 
 /
@@ -81,7 +80,7 @@ static void reply_coreplus(struct smb_request *req, uint16 
choice)
SCVAL(req-outbuf,smb_flg,FLAG_REPLY|FLAG_SUPPORT_LOCKREAD);
SSVAL(req-outbuf,smb_vwv1,0x1); /* user level security, don't
  * encrypt */
-   Protocol = PROTOCOL_COREPLUS;
+   set_Protocol(PROTOCOL_COREPLUS);
 }
 
 /
@@ -114,7 +113,7 @@ static void reply_lanman1(struct smb_request *req, uint16 
choice)
SSVAL(req-outbuf,smb_vwv11, 8);
}
 
-   Protocol = PROTOCOL_LANMAN1;
+   set_Protocol(PROTOCOL_LANMAN1);
 
/* Reply, SMBlockread, SMBwritelock supported. */
SCVAL(req-outbuf,smb_flg,FLAG_REPLY|FLAG_SUPPORT_LOCKREAD);
@@ -163,7 +162,7 @@ static void reply_lanman2(struct smb_request *req, uint16 
choice)
SSVAL(req-outbuf,smb_vwv11, 8);
}
 
-   Protocol = PROTOCOL_LANMAN2;
+   set_Protocol(PROTOCOL_LANMAN2);
 
/* Reply, SMBlockread, SMBwritelock supported. */
SCVAL(req-outbuf,smb_flg,FLAG_REPLY|FLAG_SUPPORT_LOCKREAD);
@@ -345,7 +344,7 @@ static void reply_nt1(struct smb_request *req, uint16 
choice)
SSVAL(req-outbuf,smb_vwv0,choice);

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

2009-11-04 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  218aab2... Filter the returned DOS attributes by 0xFF for clients 
using older protocols (LANMAN2 or below). Jeremy. (cherry picked from commit 
f44d3754eeefb1a0d0282a424ae9901d72301766)
  from  c572a5b... Remove Protocol as an extern, and add accessor 
functions. Jeremy. (cherry picked from commit 
cbafe17bb37acfb76acf9d9905be1029e274089e)

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


- Log -
commit 218aab293e5c64484eac59b12f6e7bf27dd774b1
Author: Jeremy Allison j...@samba.org
Date:   Wed Nov 4 15:25:15 2009 -0800

Filter the returned DOS attributes by 0xFF for clients
using older protocols (LANMAN2 or below).
Jeremy.
(cherry picked from commit f44d3754eeefb1a0d0282a424ae9901d72301766)

---

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index 7cb84b3..199a673 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -380,6 +380,12 @@ uint32 dos_mode_msdfs(connection_struct *conn,
result |= aHIDDEN;
}
 
+   if (get_Protocol() = PROTOCOL_LANMAN2) {
+   DEBUG(10,(dos_mode_msdfs : filtering protocol 0x%x to 0xff\n,
+   (unsigned int)result ));
+   result = 0xff;
+   }
+
DEBUG(8,(dos_mode_msdfs returning ));
 
if (result  aHIDDEN) DEBUG(8, (h));
@@ -560,6 +566,12 @@ uint32 dos_mode(connection_struct *conn, const struct 
smb_filename *smb_fname)
result |= aHIDDEN;
}
 
+   if (get_Protocol() = PROTOCOL_LANMAN2) {
+   DEBUG(10,(dos_mode : filtering protocol 0x%x to 0xff\n,
+   (unsigned int)result ));
+   result = 0xff;
+   }
+
DEBUG(8,(dos_mode returning ));
 
if (result  aHIDDEN) DEBUG(8, (h));


-- 
Samba Shared Repository


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

2009-11-04 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  88f80ef... Fix debug comment (brain wasn't working...). Jeremy. 
(cherry picked from commit 170d6a3084dcf4a72d5bc7dca69b1036431e0022)
  from  218aab2... Filter the returned DOS attributes by 0xFF for clients 
using older protocols (LANMAN2 or below). Jeremy. (cherry picked from commit 
f44d3754eeefb1a0d0282a424ae9901d72301766)

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


- Log -
commit 88f80efa5b0f706ccd02dea4be4fe8b378f679f1
Author: Jeremy Allison j...@samba.org
Date:   Wed Nov 4 16:04:41 2009 -0800

Fix debug comment (brain wasn't working...).
Jeremy.
(cherry picked from commit 170d6a3084dcf4a72d5bc7dca69b1036431e0022)

---

Summary of changes:
 source3/smbd/dosmode.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index 199a673..949c438 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -381,7 +381,7 @@ uint32 dos_mode_msdfs(connection_struct *conn,
}
 
if (get_Protocol() = PROTOCOL_LANMAN2) {
-   DEBUG(10,(dos_mode_msdfs : filtering protocol 0x%x to 0xff\n,
+   DEBUG(10,(dos_mode_msdfs : filtering result 0x%x\n,
(unsigned int)result ));
result = 0xff;
}
@@ -567,7 +567,7 @@ uint32 dos_mode(connection_struct *conn, const struct 
smb_filename *smb_fname)
}
 
if (get_Protocol() = PROTOCOL_LANMAN2) {
-   DEBUG(10,(dos_mode : filtering protocol 0x%x to 0xff\n,
+   DEBUG(10,(dos_mode : filtering result 0x%x\n,
(unsigned int)result ));
result = 0xff;
}


-- 
Samba Shared Repository


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

2009-11-03 Thread Volker Lendecke
The branch, v3-5-test has been updated
   via  1725420... s3: Remove debug_ctx()
  from  21e527c... Convert from numbers to correct SMB_FIND_XX constant 
names. Jeremy.

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


- Log -
commit 172542036aa1047cc7ee95c8e0a33dead6b3076f
Author: Volker Lendecke v...@samba.org
Date:   Tue Nov 3 10:59:18 2009 +0100

s3: Remove debug_ctx()

smbd just crashed on me: In a debug message I called a routine preparing a
string that itself used debug_ctx. The outer routine also used it after the
inner routine had returned. It was still referencing the talloc context
that the outer debug_ctx() had given us, which the inner DEBUG had already
freed.

---

Summary of changes:
 source3/include/proto.h|1 -
 source3/lib/debug.c|   19 +
 source3/lib/util_sid.c |2 +-
 source3/libsmb/trusts_util.c   |2 +-
 source3/locking/brlock.c   |2 +-
 source3/locking/locking.c  |   12 
 source3/passdb/pdb_ads.c   |   56 
 source3/rpc_client/cli_pipe.c  |   34 
 source3/rpc_parse/parse_prs.c  |2 +-
 source3/smbd/change_trust_pw.c |2 +-
 source3/smbd/filename_util.c   |6 ++--
 source3/smbd/oplock.c  |   10 +++---
 source3/smbd/oplock_onefs.c|8 +++---
 13 files changed, 70 insertions(+), 86 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index c863d55..e133b88 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -491,7 +491,6 @@ void check_log_size( void );
 void dbgflush( void );
 bool dbghdrclass(int level, int cls, const char *location, const char *func);
 bool dbghdr(int level, const char *location, const char *func);
-TALLOC_CTX *debug_ctx(void);
 
 /* The following definitions come from lib/display_sec.c  */
 
diff --git a/source3/lib/debug.c b/source3/lib/debug.c
index 2e19f89..e851fd2 100644
--- a/source3/lib/debug.c
+++ b/source3/lib/debug.c
@@ -90,8 +90,6 @@ boolAllowDebugChange = True;
 */
 booloverride_logfile;
 
-static TALLOC_CTX *tmp_debug_ctx;
-
 /*
  * This is to allow assignment to DEBUGLEVEL before the debug
  * system has been initialized.
@@ -888,8 +886,6 @@ void check_log_size( void )
}
 
  done:
-   TALLOC_FREE(tmp_debug_ctx);
-
errno = old_errno;
 
return( 0 );
@@ -1057,12 +1053,12 @@ bool dbghdrclass(int level, int cls, const char 
*location, const char *func)
/* Print it all out at once to prevent split syslog output. */
if( lp_debug_prefix_timestamp() ) {
(void)Debug1( [%s, %2d%s] ,
-   current_timestring(debug_ctx(),
+   current_timestring(talloc_tos(),
   lp_debug_hires_timestamp()),
level, header_str);
} else {
(void)Debug1( [%s, %2d%s] %s(%s)\n,
-   current_timestring(debug_ctx(),
+   current_timestring(talloc_tos(),
   lp_debug_hires_timestamp()),
level, header_str, location, func );
}
@@ -1110,14 +1106,3 @@ bool dbghdr(int level, const char *location, const char 
*func)
SAFE_FREE(msgbuf);
return ret;
 }
-
-/*
- * Get us a temporary talloc context usable just for DEBUG arguments
- */
-TALLOC_CTX *debug_ctx(void)
-{
-if (tmp_debug_ctx == NULL) {
-tmp_debug_ctx = talloc_named_const(NULL, 0, debug_ctx);
-}
-return tmp_debug_ctx;
-}
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c
index 9e5d4d3..639269c 100644
--- a/source3/lib/util_sid.c
+++ b/source3/lib/util_sid.c
@@ -201,7 +201,7 @@ char *sid_string_talloc(TALLOC_CTX *mem_ctx, const DOM_SID 
*sid)
 
 char *sid_string_dbg(const DOM_SID *sid)
 {
-   return sid_string_talloc(debug_ctx(), sid);
+   return sid_string_talloc(talloc_tos(), sid);
 }
 
 /*
diff --git a/source3/libsmb/trusts_util.c b/source3/libsmb/trusts_util.c
index 584217d..5dda3c5 100644
--- a/source3/libsmb/trusts_util.c
+++ b/source3/libsmb/trusts_util.c
@@ -64,7 +64,7 @@ NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client 
*cli, TALLOC_CTX *m
 
if (NT_STATUS_IS_OK(nt_status)) {
DEBUG(3,(%s : trust_pw_change_and_store_it: Changed 
password.\n, 
-current_timestring(debug_ctx(), False)));
+current_timestring(talloc_tos(), False)));
/*
 * Return the result of trying to write the new password
 * back into the trust account file.
diff 

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

2009-11-03 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  10556ed... Fix more of the RAW-SEARCH test. Older info levels are 
not 4 byte aligned (levels 1 - 3). Jeremy. (cherry picked from commit 
6a61befe3798ecf0996887164f7437c3f25c33f9)
  from  cd2a18b... s3: re-run make samba3-idl.

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


- Log -
commit 10556edffac3f06b5de52cbc50aaff500a511cd4
Author: Jeremy Allison j...@samba.org
Date:   Tue Nov 3 11:19:24 2009 -0800

Fix more of the RAW-SEARCH test. Older info levels are
not 4 byte aligned (levels 1 - 3).
Jeremy.
(cherry picked from commit 6a61befe3798ecf0996887164f7437c3f25c33f9)

---

Summary of changes:
 source3/smbd/trans2.c |   11 +--
 1 files changed, 9 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index bc7a387..178c02a 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -1525,7 +1525,9 @@ static bool smbd_marshall_dir_entry(TALLOC_CTX *ctx,
pad -= off;
off += pad;
/* initialize padding to 0 */
-   memset(pdata, 0, pad);
+   if (pad) {
+   memset(pdata, 0, pad);
+   }
space_remaining -= pad;
 
pdata += pad;
@@ -2159,13 +2161,18 @@ static bool get_lanman2_dir_entry(TALLOC_CTX *ctx,
struct ea_list *name_list)
 {
bool resume_key = false;
-   const uint8_t align = 4;
+   uint8_t align = 4;
const bool do_pad = true;
 
if (requires_resume_key) {
resume_key = true;
}
 
+   if (info_level = 1  info_level = 3) {
+   /* No alignment on earlier info levels. */
+   align = 1;
+   }
+
return smbd_dirptr_lanman2_entry(ctx, conn, dirptr, flags2,
 path_mask, dirtype, info_level,
 resume_key, dont_descend, 
ask_sharemode,


-- 
Samba Shared Repository


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

2009-11-03 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  96f4bfc... Fix debug statements to use correct function name. 
Jeremy. (cherry picked from commit 31ce8eeb44d5060cfe85f42dc6ef092121b84a68)
   via  3404082... requires_resume_key is a bool not int. Jeremy. (cherry 
picked from commit 7ae10fb892084b821f29dd36287d6deeb360ea13)
  from  10556ed... Fix more of the RAW-SEARCH test. Older info levels are 
not 4 byte aligned (levels 1 - 3). Jeremy. (cherry picked from commit 
6a61befe3798ecf0996887164f7437c3f25c33f9)

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


- Log -
commit 96f4bfc6ce6bd783a9d21d064eb4ad43be3b2a57
Author: Jeremy Allison j...@samba.org
Date:   Tue Nov 3 11:22:19 2009 -0800

Fix debug statements to use correct function name.
Jeremy.
(cherry picked from commit 31ce8eeb44d5060cfe85f42dc6ef092121b84a68)

commit 34040826510a37b8a23dda8429b1520f990b5344
Author: Jeremy Allison j...@samba.org
Date:   Tue Nov 3 11:21:02 2009 -0800

requires_resume_key is a bool not int.
Jeremy.
(cherry picked from commit 7ae10fb892084b821f29dd36287d6deeb360ea13)

---

Summary of changes:
 source3/smbd/trans2.c |   35 +++
 1 files changed, 15 insertions(+), 20 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 178c02a..445817f 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -1541,7 +1541,7 @@ static bool smbd_marshall_dir_entry(TALLOC_CTX *ctx,
 
switch (info_level) {
case SMB_FIND_INFO_STANDARD:
-   DEBUG(10,(get_lanman2_dir_entry: SMB_FIND_INFO_STANDARD\n));
+   DEBUG(10,(smbd_marshall_dir_entry: SMB_FIND_INFO_STANDARD\n));
if(requires_resume_key) {
SIVAL(p,0,reskey);
p += 4;
@@ -1577,7 +1577,7 @@ static bool smbd_marshall_dir_entry(TALLOC_CTX *ctx,
break;
 
case SMB_FIND_EA_SIZE:
-   DEBUG(10,(get_lanman2_dir_entry: SMB_FIND_EA_SIZE\n));
+   DEBUG(10,(smbd_marshall_dir_entry: SMB_FIND_EA_SIZE\n));
if (requires_resume_key) {
SIVAL(p,0,reskey);
p += 4;
@@ -1621,7 +1621,7 @@ static bool smbd_marshall_dir_entry(TALLOC_CTX *ctx,
struct ea_list *file_list = NULL;
size_t ea_len = 0;
 
-   DEBUG(10,(get_lanman2_dir_entry: SMB_FIND_EA_LIST\n));
+   DEBUG(10,(smbd_marshall_dir_entry: SMB_FIND_EA_LIST\n));
if (!name_list) {
return false;
}
@@ -1646,7 +1646,7 @@ static bool smbd_marshall_dir_entry(TALLOC_CTX *ctx,
/* Max string size is 255 bytes. */
if (PTR_DIFF(p + 255 + ea_len,pdata)  space_remaining) {
*out_of_space = true;
-   DEBUG(9,(get_lanman2_dir_entry: out of space\n));
+   DEBUG(9,(smbd_marshall_dir_entry: out of space\n));
return False; /* Not finished - just out of space */
}
 
@@ -1676,7 +1676,7 @@ static bool smbd_marshall_dir_entry(TALLOC_CTX *ctx,
}
 
case SMB_FIND_FILE_BOTH_DIRECTORY_INFO:
-   DEBUG(10,(get_lanman2_dir_entry: 
SMB_FIND_FILE_BOTH_DIRECTORY_INFO\n));
+   DEBUG(10,(smbd_marshall_dir_entry: 
SMB_FIND_FILE_BOTH_DIRECTORY_INFO\n));
was_8_3 = mangle_is_8_3(fname, True, conn-params);
p += 4;
SIVAL(p,0,reskey); p += 4;
@@ -1743,7 +1743,7 @@ static bool smbd_marshall_dir_entry(TALLOC_CTX *ctx,
break;
 
case SMB_FIND_FILE_DIRECTORY_INFO:
-   DEBUG(10,(get_lanman2_dir_entry: 
SMB_FIND_FILE_DIRECTORY_INFO\n));
+   DEBUG(10,(smbd_marshall_dir_entry: 
SMB_FIND_FILE_DIRECTORY_INFO\n));
p += 4;
SIVAL(p,0,reskey); p += 4;
put_long_date_timespec(conn-ts_res,p,create_date_ts); p += 8;
@@ -1779,7 +1779,7 @@ static bool smbd_marshall_dir_entry(TALLOC_CTX *ctx,
break;
 
case SMB_FIND_FILE_FULL_DIRECTORY_INFO:
-   DEBUG(10,(get_lanman2_dir_entry: 
SMB_FIND_FILE_FULL_DIRECTORY_INFO\n));
+   DEBUG(10,(smbd_marshall_dir_entry: 
SMB_FIND_FILE_FULL_DIRECTORY_INFO\n));
p += 4;
SIVAL(p,0,reskey); p += 4;
put_long_date_timespec(conn-ts_res,p,create_date_ts); p += 8;
@@ -1822,7 +1822,7 @@ static bool smbd_marshall_dir_entry(TALLOC_CTX *ctx,
break;
 
case SMB_FIND_FILE_NAMES_INFO:
-   DEBUG(10,(get_lanman2_dir_entry: SMB_FIND_FILE_NAMES_INFO\n));
+   DEBUG(10,(smbd_marshall_dir_entry: 
SMB_FIND_FILE_NAMES_INFO\n));
p += 4;

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

2009-11-03 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  bdd1622... tsocket: rewrite tsocket_guide.txt to reflect the 
current APIs
   via  31f1d6f... tsocket_bsd: return -1 and set errno to ENAMETOOLONG if 
the unix path is too long
   via  36801f0... tsocket: remove prototype of non-existing 
tsocket_address_inet_set_broadcast()
  from  96f4bfc... Fix debug statements to use correct function name. 
Jeremy. (cherry picked from commit 31ce8eeb44d5060cfe85f42dc6ef092121b84a68)

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


- Log -
commit bdd16229819f524078eb6cc3a8acf9c775985a20
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Nov 3 18:06:17 2009 +0100

tsocket: rewrite tsocket_guide.txt to reflect the current APIs

metze
(cherry picked from commit 97a32035bec03b76b67cb7088a7be1b7b3b9ac48)

commit 31f1d6f658827519c5dc51a4e32f95931d01d0b7
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Nov 3 17:23:07 2009 +0100

tsocket_bsd: return -1 and set errno to ENAMETOOLONG if the unix path is 
too long

metze
(cherry picked from commit eb39f6694055267302580bbf6afa988c82c55fed)

commit 36801f06f389c2e5ecd7d53db1e38e601fa48160
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Nov 3 17:22:27 2009 +0100

tsocket: remove prototype of non-existing 
tsocket_address_inet_set_broadcast()

metze
(cherry picked from commit 9b5d1e9e355d3d04f03744e025c6685ca8ad12cd)

---

Summary of changes:
 lib/tsocket/tsocket.h |2 -
 lib/tsocket/tsocket_bsd.c |7 +-
 lib/tsocket/tsocket_guide.txt |  880 +++--
 3 files changed, 419 insertions(+), 470 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tsocket/tsocket.h b/lib/tsocket/tsocket.h
index 8b0c80b..ae73113 100644
--- a/lib/tsocket/tsocket.h
+++ b/lib/tsocket/tsocket.h
@@ -117,8 +117,6 @@ char *tsocket_address_inet_addr_string(const struct 
tsocket_address *addr,
 uint16_t tsocket_address_inet_port(const struct tsocket_address *addr);
 int tsocket_address_inet_set_port(struct tsocket_address *addr,
  uint16_t port);
-void tsocket_address_inet_set_broadcast(struct tsocket_address *addr,
-   bool broadcast);
 
 int _tsocket_address_unix_from_path(TALLOC_CTX *mem_ctx,
const char *path,
diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c
index 8f1ccbe..05f5be1 100644
--- a/lib/tsocket/tsocket_bsd.c
+++ b/lib/tsocket/tsocket_bsd.c
@@ -444,9 +444,14 @@ int _tsocket_address_unix_from_path(TALLOC_CTX *mem_ctx,
path = ;
}
 
+   if (strlen(path)  sizeof(un.sun_path)-1) {
+   errno = ENAMETOOLONG;
+   return -1;
+   }
+
ZERO_STRUCT(un);
un.sun_family = AF_UNIX;
-   strncpy(un.sun_path, path, sizeof(un.sun_path));
+   strncpy(un.sun_path, path, sizeof(un.sun_path)-1);
 
ret = _tsocket_address_bsd_from_sockaddr(mem_ctx,
 (struct sockaddr *)p,
diff --git a/lib/tsocket/tsocket_guide.txt b/lib/tsocket/tsocket_guide.txt
index a02fa37..ed903c6 100644
--- a/lib/tsocket/tsocket_guide.txt
+++ b/lib/tsocket/tsocket_guide.txt
@@ -2,32 +2,23 @@
 Basic design of the tsocket abstraction
 ===
 
-The tsocket layer is designed to match more or less
-the bsd socket layer, but it hides the filedescriptor
-within a opaque 'tsocket_context' structure to make virtual
-sockets possible. The virtual sockets can be encrypted tunnels
-(like TLS, SASL or GSSAPI) or named pipes over smb.
-
-The tsocket layer is a bit like an abstract class, which defines
-common methods to work with sockets in a non blocking fashion.
+The tsocket abstraction is splitted into two
+different kinds of communitation interfaces.
 
-The whole library is based on the talloc(3) and 'tevent' libraries.
+There's the tstream_context interface with abstracts
+the communication through a bidirectional
+byte stream between two endpoints.
 
-The 'tsocket_address' structure is the 2nd abstracted class
-which represends the address of a socket endpoint.
+And there's the tdgram_context interface
+with abstracts datagram based communication between any
+number of endpoints.
 
-Each different type of socket has its own constructor.
+Both interfaces share the tsocket_address abstraction
+for endpoint addresses.
 
-Typically the constructor for a tsocket_context is attached to
-the tsocket_address of the source endpoint. That means
-the tsocket_address_create_socket() function takes the
-tsocket_address of the local endpoint and creates a tsocket_context
-for the communication.
-
-For some usecases it's possible to wrap an existing socket into a
-tsocket_context, e.g. to wrap an existing pipe(2) 

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

2009-11-03 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  cd2a18b... s3: re-run make samba3-idl.
  from  1725420... s3: Remove debug_ctx()

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


- Log -
commit cd2a18bb56b872d730acd61b6bbecef2da5d3cab
Author: Günther Deschner g...@samba.org
Date:   Wed Oct 7 10:34:15 2009 +0200

s3: re-run make samba3-idl.

Guenther
(cherry picked from commit fea2a78beb1cb4a00f44a4b191f96602cdaa81b9)

---

Summary of changes:
 source3/librpc/gen_ndr/libnetapi.h |   30 ++--
 source3/librpc/gen_ndr/messaging.h |  104 +-
 source3/librpc/gen_ndr/ndr_libnetapi.c |  320 ++--
 source3/librpc/gen_ndr/ndr_messaging.c |   16 +-
 source3/librpc/gen_ndr/ndr_notify.c|   10 +
 source3/librpc/gen_ndr/ndr_perfcount.c |   12 ++
 source3/librpc/gen_ndr/ndr_wbint.c |  122 +++--
 7 files changed, 469 insertions(+), 145 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/librpc/gen_ndr/libnetapi.h 
b/source3/librpc/gen_ndr/libnetapi.h
index 4059c43..83acb3a 100644
--- a/source3/librpc/gen_ndr/libnetapi.h
+++ b/source3/librpc/gen_ndr/libnetapi.h
@@ -33,7 +33,7 @@
 enum NET_API_STATUS
 #ifndef USE_UINT_ENUMS
  {
-   NERR_Success=0
+   NERR_Success=(int)(0)
 }
 #else
  { __donnot_use_enum_NET_API_STATUS=0x7FFF}
@@ -65,10 +65,10 @@ struct domsid {
 enum NETSETUP_JOIN_STATUS
 #ifndef USE_UINT_ENUMS
  {
-   NetSetupUnknownStatus=0,
-   NetSetupUnjoined=1,
-   NetSetupWorkgroupName=2,
-   NetSetupDomainName=3
+   NetSetupUnknownStatus=(int)(0),
+   NetSetupUnjoined=(int)(1),
+   NetSetupWorkgroupName=(int)(2),
+   NetSetupDomainName=(int)(3)
 }
 #else
  { __donnot_use_enum_NETSETUP_JOIN_STATUS=0x7FFF}
@@ -1170,16 +1170,16 @@ struct LOCALGROUP_INFO_1002 {
 enum SID_NAME_USE
 #ifndef USE_UINT_ENUMS
  {
-   SidTypeUser=1,
-   SidTypeGroup=2,
-   SidTypeDomain=3,
-   SidTypeAlias=4,
-   SidTypeWellKnownGroup=5,
-   SidTypeDeletedAccount=6,
-   SidTypeInvalid=7,
-   SidTypeUnknown=8,
-   SidTypeComputer=9,
-   SidTypeLabel=10
+   SidTypeUser=(int)(1),
+   SidTypeGroup=(int)(2),
+   SidTypeDomain=(int)(3),
+   SidTypeAlias=(int)(4),
+   SidTypeWellKnownGroup=(int)(5),
+   SidTypeDeletedAccount=(int)(6),
+   SidTypeInvalid=(int)(7),
+   SidTypeUnknown=(int)(8),
+   SidTypeComputer=(int)(9),
+   SidTypeLabel=(int)(10)
 }
 #else
  { __donnot_use_enum_SID_NAME_USE=0x7FFF}
diff --git a/source3/librpc/gen_ndr/messaging.h 
b/source3/librpc/gen_ndr/messaging.h
index 79b097c..225440a 100644
--- a/source3/librpc/gen_ndr/messaging.h
+++ b/source3/librpc/gen_ndr/messaging.h
@@ -11,58 +11,58 @@
 enum messaging_type
 #ifndef USE_UINT_ENUMS
  {
-   MSG_DEBUG=(int)0x0001,
-   MSG_PING=(int)0x0002,
-   MSG_PONG=(int)0x0003,
-   MSG_PROFILE=(int)0x0004,
-   MSG_REQ_DEBUGLEVEL=(int)0x0005,
-   MSG_DEBUGLEVEL=(int)0x0006,
-   MSG_REQ_PROFILELEVEL=(int)0x0007,
-   MSG_PROFILELEVEL=(int)0x0008,
-   MSG_REQ_POOL_USAGE=(int)0x0009,
-   MSG_POOL_USAGE=(int)0x000A,
-   MSG_REQ_DMALLOC_MARK=(int)0x000B,
-   MSG_REQ_DMALLOC_LOG_CHANGED=(int)0x000C,
-   MSG_SHUTDOWN=(int)0x000D,
-   MSG_FORCE_ELECTION=(int)0x0101,
-   MSG_WINS_NEW_ENTRY=(int)0x0102,
-   MSG_SEND_PACKET=(int)0x0103,
-   MSG_PRINTER_NOTIFY=(int)0x2001,
-   MSG_PRINTER_NOTIFY2=(int)0x0202,
-   MSG_PRINTER_DRVUPGRADE=(int)0x0203,
-   MSG_PRINTERDATA_INIT_RESET=(int)0x0204,
-   MSG_PRINTER_UPDATE=(int)0x0205,
-   MSG_PRINTER_MOD=(int)0x0206,
-   MSG_SMB_CONF_UPDATED=(int)0x0301,
-   MSG_SMB_FORCE_TDIS=(int)0x0302,
-   MSG_SMB_SAM_SYNC=(int)0x0303,
-   MSG_SMB_SAM_REPL=(int)0x0304,
-   MSG_SMB_UNLOCK=(int)0x0305,
-   MSG_SMB_BREAK_REQUEST=(int)0x0306,
-   MSG_SMB_BREAK_RESPONSE=(int)0x0307,
-   MSG_SMB_ASYNC_LEVEL2_BREAK=(int)0x0308,
-   MSG_SMB_OPEN_RETRY=(int)0x0309,
-   MSG_SMB_KERNEL_BREAK=(int)0x030A,
-   MSG_SMB_FILE_RENAME=(int)0x030B,
-   MSG_SMB_INJECT_FAULT=(int)0x030C,
-   MSG_SMB_BLOCKING_LOCK_CANCEL=(int)0x030D,
-   MSG_SMB_NOTIFY=(int)0x030E,
-   MSG_SMB_STAT_CACHE_DELETE=(int)0x030F,
-   MSG_PVFS_NOTIFY=(int)0x0310,
-   MSG_SMB_BRL_VALIDATE=(int)0x0311,
-   MSG_SMB_RELEASE_IP=(int)0x0312,
-   MSG_SMB_CLOSE_FILE=(int)0x0313,
-   MSG_WINBIND_FINISHED=(int)0x0401,
-   MSG_WINBIND_FORGET_STATE=(int)0x0402,
-   MSG_WINBIND_ONLINE=(int)0x0403,
-   MSG_WINBIND_OFFLINE=(int)0x0404,
-   MSG_WINBIND_ONLINESTATUS=(int)0x0405,
-   MSG_WINBIND_TRY_TO_GO_ONLINE=(int)0x0406,
-   MSG_WINBIND_FAILED_TO_GO_ONLINE=(int)0x0407,
-   MSG_WINBIND_VALIDATE_CACHE=(int)0x0408,
-   MSG_WINBIND_DUMP_DOMAIN_LIST=(int)0x0409,
-   

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

2009-11-03 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  f805e94... Make samba3-idl to fix the build. Jeremy.
   via  dba206a... Merge branch 'v3-5-test' of 
ssh://j...@git.samba.org/data/git/samba into v3-5-test
   via  eea15d8... tdr: teach TDR about uint1632 enums
   via  99afc72... pidl: update PIDL tests for uint1632 enums (cherry 
picked from commit 7816f9d7abf5203537c3bb7afb9511b00d2d974f)
   via  0724f58... pidl: get the alignment right for uint1632 enums (NDR64)
  from  8e0c9e4... s3-lsa: fill in some more info levels in 
_lsa_QueryInfoPolicy().

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


- Log -
commit f805e9472936a24eee90eeadb26ee7f6fa8bc2a9
Author: Jeremy Allison j...@samba.org
Date:   Tue Nov 3 14:20:21 2009 -0800

Make samba3-idl to fix the build.
Jeremy.

commit dba206a0b506a3a89cfa140eb079856abd9ce2e3
Merge: eea15d8f117e07d3e121e087d23e50d94a7c6355 
8e0c9e40278265a1da959542178276bc042df006
Author: Jeremy Allison j...@samba.org
Date:   Tue Nov 3 13:41:22 2009 -0800

Merge branch 'v3-5-test' of ssh://j...@git.samba.org/data/git/samba into 
v3-5-test

commit eea15d8f117e07d3e121e087d23e50d94a7c6355
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Oct 7 06:39:03 2009 +1100

tdr: teach TDR about uint1632 enums

TDB doesn't have NDR64, but it needs to know how to map the new types
from pidl
(cherry picked from commit 1d0fb1e0fba3cf4d04d4602ed4e717912804e5de)

commit 99afc728ebe156d8a3c966d2afed2b63dd5082ec
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Oct 6 20:49:14 2009 +1100

pidl: update PIDL tests for uint1632 enums
(cherry picked from commit 7816f9d7abf5203537c3bb7afb9511b00d2d974f)

commit 0724f58489edb9fa25bcc593cbd5483450b5937f
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Oct 6 20:47:09 2009 +1100

pidl: get the alignment right for uint1632 enums (NDR64)

The default enum in NDR63 is 32 bits, not 16 bits. We need a uint1632
type to get the alignment right.
(cherry picked from commit 2bf8a7485cf0733c808bc97a399a1c73bb988414)

---

Summary of changes:
 lib/tdr/tdr.c|   10 ++
 librpc/gen_ndr/ndr_dcerpc.c  |   46 +++
 librpc/gen_ndr/ndr_dfs.c |   64 +-
 librpc/gen_ndr/ndr_drsblobs.c|  107 +--
 librpc/gen_ndr/ndr_drsuapi.c |  212 +-
 librpc/gen_ndr/ndr_dssetup.c |   28 +++--
 librpc/gen_ndr/ndr_echo.c|   22 +++-
 librpc/gen_ndr/ndr_epmapper.c|   66 +
 librpc/gen_ndr/ndr_eventlog.c|   18 +++-
 librpc/gen_ndr/ndr_krb5pac.c |   20 +++
 librpc/gen_ndr/ndr_lsa.c |  144 +++--
 librpc/gen_ndr/ndr_misc.c|   12 ++-
 librpc/gen_ndr/ndr_named_pipe_auth.c |   12 ++
 librpc/gen_ndr/ndr_nbt.c |   65 +
 librpc/gen_ndr/ndr_netlogon.c|  158 --
 librpc/gen_ndr/ndr_ntlmssp.c |   30 -
 librpc/gen_ndr/ndr_ntsvcs.c  |2 +
 librpc/gen_ndr/ndr_samr.c|  158 --
 librpc/gen_ndr/ndr_schannel.c|   24 +++-
 librpc/gen_ndr/ndr_security.c|   15 ++-
 librpc/gen_ndr/ndr_spoolss.c |  162 ++-
 librpc/gen_ndr/ndr_srvsvc.c  |  246 ++
 librpc/gen_ndr/ndr_svcctl.c  |   20 +++
 librpc/gen_ndr/ndr_winreg.c  |   14 ++
 librpc/gen_ndr/ndr_wkssvc.c  |  124 -
 librpc/gen_ndr/ndr_xattr.c   |   22 +++
 librpc/ndr/libndr.h  |3 +
 librpc/ndr/ndr_basic.c   |   78 +--
 pidl/lib/Parse/Pidl/NDR.pm   |2 +
 pidl/lib/Parse/Pidl/Samba4/TDR.pm|6 +-
 pidl/lib/Parse/Pidl/Typelist.pm  |4 +-
 pidl/tests/typelist.pl   |2 +-
 32 files changed, 1793 insertions(+), 103 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tdr/tdr.c b/lib/tdr/tdr.c
index 293436e..ce67003 100644
--- a/lib/tdr/tdr.c
+++ b/lib/tdr/tdr.c
@@ -92,6 +92,11 @@ NTSTATUS tdr_pull_uint16(struct tdr_pull *tdr, TALLOC_CTX 
*ctx, uint16_t *v)
return NT_STATUS_OK;
 }
 
+NTSTATUS tdr_pull_uint1632(struct tdr_pull *tdr, TALLOC_CTX *ctx, uint16_t *v)
+{
+   return tdr_pull_uint16(tdr, ctx, v);
+}
+
 NTSTATUS tdr_push_uint16(struct tdr_push *tdr, const uint16_t *v)
 {
TDR_PUSH_NEED_BYTES(tdr, 2);
@@ -100,6 +105,11 @@ NTSTATUS tdr_push_uint16(struct tdr_push *tdr, const 
uint16_t *v)
return NT_STATUS_OK;
 }
 
+NTSTATUS tdr_push_uint1632(struct tdr_push *tdr, const uint16_t *v)
+{
+   return tdr_push_uint16(tdr, v);
+}
+
 NTSTATUS tdr_print_uint16(struct tdr_print *tdr, const char *name, uint16_t *v)
 {
tdr-print(tdr, %-25s: 0x%02x (%u), name, *v, *v);
diff --git a/librpc/gen_ndr/ndr_dcerpc.c 

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

2009-11-03 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  8e0c9e4... s3-lsa: fill in some more info levels in 
_lsa_QueryInfoPolicy().
   via  3b53045... s4-smbtorture: skip three info levels while testing s3 
with RPC-LSA.
   via  505934c... s4-smbtorture: skip QueryInfoPolicy2 while running 
RPC-LSA against s3.
   via  fc8c1b2... s4-smbtorture: skip QueryDomainInformationPolicy test 
against s3 in RPC-LSA.
   via  18a00b7... s4-smbtorture: simplify some torture_comments in RPC-LSA.
   via  b8465e0... s3-passdb: cleanup some callers of 
pdb_get_trusteddom_pw().
   via  e182940... libndr: add int3264 ndr prototype.
  from  bdd1622... tsocket: rewrite tsocket_guide.txt to reflect the 
current APIs

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


- Log -
commit 8e0c9e40278265a1da959542178276bc042df006
Author: Günther Deschner g...@samba.org
Date:   Tue Nov 3 11:45:15 2009 +0100

s3-lsa: fill in some more info levels in _lsa_QueryInfoPolicy().

Add dummys (just like s4 does) and fill in some more appropriate error 
codes.

Guenther
(cherry picked from commit 97496bb3cafd8914a3a7c7b7d3a668ba3e533769)

commit 3b53045146803bbb046f52ba28a39d6ca4bf4870
Author: Günther Deschner g...@samba.org
Date:   Tue Nov 3 11:46:07 2009 +0100

s4-smbtorture: skip three info levels while testing s3 with RPC-LSA.

These are only supported by s3 when running pdb_ads atm.

Guenther
(cherry picked from commit a8de4f091ef10223e862b3cb6f0b9e5cef5cde2a)

commit 505934c56e0df600aff8d406b7c636f830360257
Author: Günther Deschner g...@samba.org
Date:   Mon Nov 2 20:11:14 2009 +0100

s4-smbtorture: skip QueryInfoPolicy2 while running RPC-LSA against s3.

This is only supported by s3 when running pdb_ads atm.

Guenther
(cherry picked from commit 58d401bb212b43d05213514f8bb2efa850d4e5c9)

commit fc8c1b23109b90daf2b185522728d08c921a91af
Author: Günther Deschner g...@samba.org
Date:   Mon Nov 2 16:51:00 2009 +0100

s4-smbtorture: skip QueryDomainInformationPolicy test against s3 in RPC-LSA.

Guenther
(cherry picked from commit bff9819521255b3dcd0f04aa585c1ad0385896fd)

commit 18a00b7c0c0fa6d3e2d8bcba2d3f0969697781f3
Author: Günther Deschner g...@samba.org
Date:   Mon Nov 2 19:59:47 2009 +0100

s4-smbtorture: simplify some torture_comments in RPC-LSA.

Guenther
(cherry picked from commit 074ad24653e85c60b9af863ac526832229754a96)

commit b8465e0dae7033e04e14d0808c5afc0d06b3a445
Author: Günther Deschner g...@samba.org
Date:   Fri Oct 30 02:15:45 2009 +0100

s3-passdb: cleanup some callers of pdb_get_trusteddom_pw().

Guenther
(cherry picked from commit 463b1eb2b55ae85cfc9539c936375a989cde1076)

commit e182940be3df57d412857cf6dad41170acbbbe88
Author: Günther Deschner g...@samba.org
Date:   Mon Oct 5 15:10:35 2009 +0200

libndr: add int3264 ndr prototype.

Guenther
(cherry picked from commit 76feeb1b97b1d8f24650c5198e9c61c4f5b1357a)

---

Summary of changes:
 librpc/ndr/libndr.h |1 +
 source3/auth/auth_domain.c  |4 +--
 source3/rpc_server/srv_lsa_nt.c |   32 
 source3/winbindd/winbindd_ads.c |4 +--
 source4/torture/rpc/lsa.c   |   51 +-
 5 files changed, 63 insertions(+), 29 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h
index 3236932..f4c649c 100644
--- a/librpc/ndr/libndr.h
+++ b/librpc/ndr/libndr.h
@@ -470,6 +470,7 @@ NDR_SCALAR_PROTO(int16, int16_t)
 NDR_SCALAR_PROTO(uint32, uint32_t)
 NDR_SCALAR_PROTO(uint3264, uint32_t)
 NDR_SCALAR_PROTO(int32, int32_t)
+NDR_SCALAR_PROTO(int3264, int32_t)
 NDR_SCALAR_PROTO(udlong, uint64_t)
 NDR_SCALAR_PROTO(udlongr, uint64_t)
 NDR_SCALAR_PROTO(dlong, int64_t)
diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c
index 084d84c..c527360 100644
--- a/source3/auth/auth_domain.c
+++ b/source3/auth/auth_domain.c
@@ -447,8 +447,6 @@ static NTSTATUS check_trustdomain_security(const struct 
auth_context *auth_conte
NTSTATUS nt_status = NT_STATUS_LOGON_FAILURE;
unsigned char trust_md4_password[16];
char *trust_password;
-   time_t last_change_time;
-   DOM_SID sid;
fstring dc_name;
struct sockaddr_storage dc_ss;
 
@@ -481,7 +479,7 @@ static NTSTATUS check_trustdomain_security(const struct 
auth_context *auth_conte
 */
 
if (!pdb_get_trusteddom_pw(user_info-domain, trust_password,
-  sid, last_change_time)) {
+  NULL, NULL)) {
DEBUG(0, (check_trustdomain_security: could not fetch trust 
  account password for domain %s\n,
  user_info-domain));
diff --git 

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

2009-11-02 Thread Volker Lendecke
The branch, v3-5-test has been updated
   via  cb1b5f9... s3: Make debug hires timestamp default to true
  from  54af185... s3:ldap: don't search when no values where found

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


- Log -
commit cb1b5f93332839eb8fc048895c9c9539f775d9a8
Author: Volker Lendecke v...@samba.org
Date:   Mon Nov 2 10:05:38 2009 +0100

s3: Make debug hires timestamp default to true

It does not cost much and can help a lot when debugging

---

Summary of changes:
 .../smbdotconf/logging/debughirestimestamp.xml |2 +-
 source3/param/loadparm.c   |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/logging/debughirestimestamp.xml 
b/docs-xml/smbdotconf/logging/debughirestimestamp.xml
index 6f32bd5..6cc7b71 100644
--- a/docs-xml/smbdotconf/logging/debughirestimestamp.xml
+++ b/docs-xml/smbdotconf/logging/debughirestimestamp.xml
@@ -14,5 +14,5 @@
 /para
 
 /description
-value type=defaultno/value
+value type=defaultyes/value
 /samba:parameter
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 049b5e9..93be017 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -4984,7 +4984,7 @@ static void init_globals(bool first_time_only)
Globals.bTimestampLogs = True;
string_set(Globals.szLogLevel, 0);
Globals.bDebugPrefixTimestamp = False;
-   Globals.bDebugHiresTimestamp = False;
+   Globals.bDebugHiresTimestamp = true;
Globals.bDebugPid = False;
Globals.bDebugUid = False;
Globals.bDebugClass = False;


-- 
Samba Shared Repository


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

2009-11-02 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  efbca60... WHATSNEW: Update release notes.
  from  cb1b5f9... s3: Make debug hires timestamp default to true

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


- Log -
commit efbca60e6d3258da997d11fdb126251c89678a01
Author: Karolin Seeger ksee...@samba.org
Date:   Mon Nov 2 12:45:53 2009 +0100

WHATSNEW: Update release notes.

Karolin

---

Summary of changes:
 WHATSNEW.txt |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 6f4b159..683b8ef 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -22,6 +22,7 @@ smb.conf changes
--  --- ---
 
create krb5 conf   New yes
+   debug hires timestamp  Changed Default yes
ldap follow referral   New auto
store create time  New no
 


-- 
Samba Shared Repository


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

2009-11-02 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  f39c257... s3-gencache: restore gencache_get behavior with NULL 
args (with torture test).
  from  efbca60... WHATSNEW: Update release notes.

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


- Log -
commit f39c2577fc649713cfd1e0fb9c164ee4423c96f7
Author: Günther Deschner g...@samba.org
Date:   Mon Nov 2 13:01:58 2009 +0100

s3-gencache: restore gencache_get behavior with NULL args (with torture 
test).

Without this, we panic in wins_srv_is_dead() and fail to start nmbd with
wins support.

Volker, please check.

Guenther
(cherry picked from commit f35a1b95aa6f50cb1bc919f4ab502ef2c38f6bf5)

---

Summary of changes:
 source3/lib/gencache.c|   12 
 source3/torture/torture.c |5 +
 2 files changed, 13 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c
index 6de653f..4889d7c 100644
--- a/source3/lib/gencache.c
+++ b/source3/lib/gencache.c
@@ -529,11 +529,15 @@ bool gencache_get(const char *keystr, char **value, 
time_t *ptimeout)
SAFE_FREE(blob.data);
return false;
}
-   *value = SMB_STRDUP((char *)blob.data);
-   data_blob_free(blob);
-   if (*value == NULL) {
-   return false;
+   if (value) {
+   *value = SMB_STRDUP((char *)blob.data);
+   data_blob_free(blob);
+   if (*value == NULL) {
+   return false;
+   }
+   return true;
}
+   data_blob_free(blob);
return true;
 }
 
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index ca499a9..bda82f2 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -6431,6 +6431,11 @@ static bool run_local_gencache(int dummy)
return False;
}
 
+   if (!gencache_get(foo, NULL, NULL)) {
+   d_printf(%s: gencache_get() failed\n, __location__);
+   return False;
+   }
+
if (!gencache_get(foo, val, tm)) {
d_printf(%s: gencache_get() failed\n, __location__);
return False;


-- 
Samba Shared Repository


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

2009-11-02 Thread Volker Lendecke
The branch, v3-5-test has been updated
   via  892f929... s3: Fix a 100% CPU loop when ctdbd dies during a traverse
  from  f39c257... s3-gencache: restore gencache_get behavior with NULL 
args (with torture test).

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


- Log -
commit 892f92972112e55fdea250c198623d2fd4f70d7c
Author: Volker Lendecke v...@samba.org
Date:   Mon Nov 2 16:59:15 2009 +0100

s3: Fix a 100% CPU loop when ctdbd dies during a traverse

---

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


Changeset truncated at 500 lines:

diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c
index 0af4204..ffd79c9 100644
--- a/source3/lib/ctdbd_conn.c
+++ b/source3/lib/ctdbd_conn.c
@@ -1167,6 +1167,7 @@ NTSTATUS ctdbd_traverse(uint32 db_id,
 
if (NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE)) {
status = NT_STATUS_OK;
+   break;
}
 
if (!NT_STATUS_IS_OK(status)) {


-- 
Samba Shared Repository


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

2009-11-02 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  6a11a1d... ndr64: added support for trailing gap alignment
  from  892f929... s3: Fix a 100% CPU loop when ctdbd dies during a traverse

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


- Log -
commit 6a11a1d720b12889b5cbe6ed1f7751ce0d22d4b9
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Oct 1 16:08:02 2009 +1000

ndr64: added support for trailing gap alignment

NDR64 has a 'trailing gap' alignment, which aligns the end of a
structure on the overall structure alignment.

This explains the discrepancy we had with the RPC-SAMR test and NDR64

---

Summary of changes:
 librpc/ndr/libndr.h  |2 ++
 librpc/ndr/ndr_basic.c   |   18 ++
 pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm |4 
 3 files changed, 24 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h
index f6f5170..3236932 100644
--- a/librpc/ndr/libndr.h
+++ b/librpc/ndr/libndr.h
@@ -500,6 +500,8 @@ enum ndr_err_code ndr_push_align(struct ndr_push *ndr, 
size_t size);
 enum ndr_err_code ndr_pull_align(struct ndr_pull *ndr, size_t size);
 enum ndr_err_code ndr_push_union_align(struct ndr_push *ndr, size_t size);
 enum ndr_err_code ndr_pull_union_align(struct ndr_pull *ndr, size_t size);
+enum ndr_err_code ndr_push_trailer_align(struct ndr_push *ndr, size_t size);
+enum ndr_err_code ndr_pull_trailer_align(struct ndr_pull *ndr, size_t size);
 enum ndr_err_code ndr_push_bytes(struct ndr_push *ndr, const uint8_t *data, 
uint32_t n);
 enum ndr_err_code ndr_push_zero(struct ndr_push *ndr, uint32_t n);
 enum ndr_err_code ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, 
const uint8_t *data, uint32_t n);
diff --git a/librpc/ndr/ndr_basic.c b/librpc/ndr/ndr_basic.c
index f3b7e75..807db59 100644
--- a/librpc/ndr/ndr_basic.c
+++ b/librpc/ndr/ndr_basic.c
@@ -573,6 +573,24 @@ _PUBLIC_ enum ndr_err_code ndr_pull_union_align(struct 
ndr_pull *ndr, size_t siz
return NDR_ERR_SUCCESS;
 }
 
+_PUBLIC_ enum ndr_err_code ndr_push_trailer_align(struct ndr_push *ndr, size_t 
size)
+{
+   /* MS-RPCE section 2.2.5.3.4.1 */
+   if (ndr-flags  LIBNDR_FLAG_NDR64) {
+   return ndr_push_align(ndr, size);
+   }
+   return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_trailer_align(struct ndr_pull *ndr, size_t 
size)
+{
+   /* MS-RPCE section 2.2.5.3.4.1 */
+   if (ndr-flags  LIBNDR_FLAG_NDR64) {
+   return ndr_pull_align(ndr, size);
+   }
+   return NDR_ERR_SUCCESS;
+}
+
 /*
   push some bytes
 */
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 
b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index 9a02d52..11a43b4 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -1235,6 +1235,8 @@ sub ParseStructPushPrimitives($)
}
 
$self-ParseElementPush($_, $ndr, $env, 1, 0) foreach 
(@{$struct-{ELEMENTS}});
+
+   $self-pidl(NDR_CHECK(ndr_push_trailer_align($ndr, 
$struct-{ALIGN})););
 }
 
 sub ParseStructPushDeferred()
@@ -1533,6 +1535,8 @@ sub ParseStructPullPrimitives($)
$self-ParseElementPull($_, $ndr, $env, 1, 0) foreach 
(@{$struct-{ELEMENTS}});
 
$self-add_deferred();
+
+   $self-pidl(NDR_CHECK(ndr_pull_trailer_align($ndr, 
$struct-{ALIGN})););
 }
 
 sub ParseStructPullDeferred($)


-- 
Samba Shared Repository


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

2009-11-02 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  a385927... Fix bug 6867 - trans2findnext returns reply_nterror(req, 
ntstatus) In a directory with a lot of files. Jeremy.
  from  6a11a1d... ndr64: added support for trailing gap alignment

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


- Log -
commit a38592722b05bf81905198c8f244d7303abee030
Author: Jeremy Allison j...@samba.org
Date:   Mon Nov 2 12:15:25 2009 -0800

Fix bug 6867 - trans2findnext returns reply_nterror(req, ntstatus) In a 
directory with a lot of files.
Jeremy.

---

Summary of changes:
 source3/smbd/trans2.c |   28 
 1 files changed, 16 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 59b778c..bc7a387 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -2575,23 +2575,26 @@ static void call_trans2findnext(connection_struct *conn,
requires_resume_key = (findnext_flags  
FLAG_TRANS2_FIND_REQUIRE_RESUME);
continue_bit = (findnext_flags  FLAG_TRANS2_FIND_CONTINUE);
 
-   srvstr_get_path_wcard(ctx, params, req-flags2, resume_name,
+   if (!continue_bit) {
+   /* We only need resume_name if continue_bit is zero. */
+   srvstr_get_path_wcard(ctx, params, req-flags2, resume_name,
  params+12,
  total_params - 12, STR_TERMINATE, ntstatus,
  mask_contains_wcard);
-   if (!NT_STATUS_IS_OK(ntstatus)) {
-   /* Win9x or OS/2 can send a resume name of .. or .. This 
will cause the parser to
-  complain (it thinks we're asking for the directory above the 
shared
-  path or an invalid name). Catch this as the resume name is 
only compared, never used in
-  a file access. JRA. */
-   srvstr_pull_talloc(ctx, params, req-flags2,
+   if (!NT_STATUS_IS_OK(ntstatus)) {
+   /* Win9x or OS/2 can send a resume name of .. or .. 
This will cause the parser to
+  complain (it thinks we're asking for the directory 
above the shared
+  path or an invalid name). Catch this as the resume 
name is only compared, never used in
+  a file access. JRA. */
+   srvstr_pull_talloc(ctx, params, req-flags2,
resume_name, params+12,
total_params - 12,
STR_TERMINATE);
 
-   if (!resume_name || !(ISDOT(resume_name) || 
ISDOTDOT(resume_name))) {
-   reply_nterror(req, ntstatus);
-   return;
+   if (!resume_name || !(ISDOT(resume_name) || 
ISDOTDOT(resume_name))) {
+   reply_nterror(req, ntstatus);
+   return;
+   }
}
}
 
@@ -2599,7 +2602,8 @@ static void call_trans2findnext(connection_struct *conn,
 close_after_request=%d, close_if_end = %d requires_resume_key = %d \
 resume_key = %d resume name = %s continue=%d level = %d\n,
dptr_num, max_data_bytes, maxentries, close_after_request, 
close_if_end, 
-   requires_resume_key, resume_key, resume_name, continue_bit, 
info_level));
+   requires_resume_key, resume_key,
+   resume_name ? resume_name : (NULL), continue_bit, 
info_level));
 
if (!maxentries) {
/* W2K3 seems to treat zero as 1. */
@@ -2724,7 +2728,7 @@ total_data=%u (should be %u)\n, (unsigned 
int)total_data, (unsigned int)IVAL(pd
 * depend on the last file name instead.
 */
 
-   if(*resume_name  !continue_bit) {
+   if(!continue_bit  resume_name  *resume_name) {
SMB_STRUCT_STAT st;
 
long current_pos = 0;


-- 
Samba Shared Repository


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

2009-11-02 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  21e527c... Convert from numbers to correct SMB_FIND_XX constant 
names. Jeremy.
  from  a385927... Fix bug 6867 - trans2findnext returns reply_nterror(req, 
ntstatus) In a directory with a lot of files. Jeremy.

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


- Log -
commit 21e527c5d3d98c6e730c23281d68b0b18737b704
Author: Jeremy Allison j...@samba.org
Date:   Mon Nov 2 16:17:36 2009 -0800

Convert from numbers to correct SMB_FIND_XX constant names.
Jeremy.

---

Summary of changes:
 source3/libsmb/clilist.c |   20 
 1 files changed, 12 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index a84a647..5a97204 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -38,8 +38,9 @@ static size_t calc_next_entry_offset(const char *base, const 
char *pdata_end)
 /
  Interpret a long filename structure - this is mostly guesses at the moment.
  The length of the structure is returned
- The structure of a long filename depends on the info level. 260 is used
- by NT and 2 is used by OS/2
+ The structure of a long filename depends on the info level.
+ SMB_FIND_FILE_BOTH_DIRECTORY_INFO is used
+ by NT and SMB_FIND_EA_SIZE is used by OS/2
 /
 
 static size_t interpret_long_filename(TALLOC_CTX *ctx,
@@ -64,7 +65,7 @@ static size_t interpret_long_filename(TALLOC_CTX *ctx,
finfo-cli = cli;
 
switch (level) {
-   case 1: /* OS/2 understands this */
+   case SMB_FIND_INFO_STANDARD: /* OS/2 understands this */
/* these dates are converted to GMT by
make_unix_date */
if (pdata_end - base  27) {
@@ -109,7 +110,7 @@ static size_t interpret_long_filename(TALLOC_CTX *ctx,
p += ret;
return PTR_DIFF(p, base);
 
-   case 2: /* this is what OS/2 uses mostly */
+   case SMB_FIND_EA_SIZE: /* this is what OS/2 uses mostly */
/* these dates are converted to GMT by
make_unix_date */
if (pdata_end - base  31) {
@@ -138,7 +139,7 @@ static size_t interpret_long_filename(TALLOC_CTX *ctx,
p += ret;
return PTR_DIFF(p, base) + 1;
 
-   case 260: /* NT uses this, but also accepts 2 */
+   case SMB_FIND_FILE_BOTH_DIRECTORY_INFO: /* NT uses this, but 
also accepts 2 */
{
size_t namelen, slen;
 
@@ -248,8 +249,10 @@ int cli_list_new(struct cli_state *cli,const char 
*Mask,uint16 attribute,
TALLOC_CTX *frame = talloc_stackframe();
DATA_BLOB last_name_raw = data_blob(NULL, 0);
 
-   /* NT uses 260, OS/2 uses 2. Both accept 1. */
-   info_level = (cli-capabilitiesCAP_NT_SMBS)?260:1;
+   /* NT uses SMB_FIND_FILE_BOTH_DIRECTORY_INFO,
+  OS/2 uses SMB_FIND_EA_SIZE. Both accept SMB_FIND_INFO_STANDARD. */
+   info_level = (cli-capabilitiesCAP_NT_SMBS)?
+   SMB_FIND_FILE_BOTH_DIRECTORY_INFO : SMB_FIND_INFO_STANDARD;
 
mask = SMB_STRDUP(Mask);
if (!mask) {
@@ -389,7 +392,8 @@ int cli_list_new(struct cli_state *cli,const char 
*Mask,uint16 attribute,
 
/* we might need the lastname for continuations */
for (p2=p,i=0;iff_searchcount  p2  rdata_end;i++) {
-   if ((info_level == 260)  (i == ff_searchcount-1)) {
+   if ((info_level == SMB_FIND_FILE_BOTH_DIRECTORY_INFO) 
+   (i == ff_searchcount-1)) {
/* Last entry - fixup the last offset length. */
SIVAL(p2,0,PTR_DIFF((rdata + data_len),p2));
}


-- 
Samba Shared Repository


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

2009-11-01 Thread Björn Jacke
The branch, v3-5-test has been updated
   via  54af185... s3:ldap: don't search when no values where found
  from  e5f4159... ѕ3:ldap: search for account policies in objectclass 
sambaDomain, not *

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


- Log -
commit 54af1851060fca79d064e40acca7dfd3e39b0a25
Author: Björn Jacke b...@sernet.de
Date:   Sat Oct 31 00:45:09 2009 +0100

s3:ldap: don't search when no values where found

---

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


Changeset truncated at 500 lines:

diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 54cb03d..87df75e 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -2683,7 +2683,7 @@ static NTSTATUS ldapsam_enum_group_members(struct 
pdb_methods *methods,
 
values = ldap_get_values(conn-ldap_struct, entry, memberUid);
 
-   if (values) {
+   if ((values != NULL)  (values[0] != NULL)) {
 
filter = talloc_asprintf(mem_ctx, ((objectClass=%s)(|, 
LDAP_OBJ_SAMBASAMACCOUNT);
if (filter == NULL) {


-- 
Samba Shared Repository


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

2009-10-31 Thread Björn Jacke
The branch, v3-5-test has been updated
   via  e5f4159... ѕ3:ldap: search for account policies in objectclass 
sambaDomain, not *
   via  751f087... s3:Makefile: add LIBREPLACE_LIBS for talloc, tdb and 
wbclient
   via  9568469... ѕ3:buildsystem: fix depenencies for libreplace
  from  5087e0c... s3/docs: Fix typo.

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


- Log -
commit e5f41591504769b5c7beb5a35bb0f95b33d27a8b
Author: Björn Jacke b...@sernet.de
Date:   Fri Oct 30 21:50:41 2009 +0100

ѕ3:ldap: search for account policies in objectclass sambaDomain, not *

commit 751f087f72fcfedbaeb1b9704b57fbb62d77e5e0
Author: Björn Jacke b...@sernet.de
Date:   Sat Oct 31 10:37:44 2009 +0100

s3:Makefile: add LIBREPLACE_LIBS for talloc, tdb and wbclient

commit 9568469c6af915b3c58accfe88b42379b3538700
Author: Björn Jacke b...@sernet.de
Date:   Fri Oct 30 19:54:52 2009 +0100

ѕ3:buildsystem: fix depenencies for libreplace

This problem became visible after adding the picky -z defs linker option: On
Solaris libreplace had unresolved symbols, which showed up in the libtalloc
build. PAM_WINBIND_EXTRA_LIBS and WINBIND_NSS_EXTRA_LIBS had been 
workarounds
to make things work at two placeѕ. These variables have been obsoleted now.
This patch introduces LIBREPLACE_LIBS which contans the linker flags needed 
for
linking anything using libreplace.

---

Summary of changes:
 source3/Makefile.in   |   13 ++---
 source3/configure.in  |8 
 source3/passdb/pdb_ldap.c |7 ++-
 3 files changed, 16 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 748bfd3..74a6c0b 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -72,14 +72,13 @@ nscd_li...@nscd_libs@
 uuid_li...@uuid_libs@
 libwbclie...@libwbclient_static@ @LIBWBCLIENT_SHARED@
 libwbclient_li...@libwbclient_libs@
-winbind_nss_extra_li...@winbind_nss_extra_libs@
 winbind_nss_pthre...@winbind_nss_pthread@
-pam_winbind_extra_li...@pam_winbind_extra_libs@
 dnssd_li...@dnssd_libs@
 avahi_li...@avahi_libs@
 popt_li...@poptlibs@
 libtall...@libtalloc_static@ @LIBTALLOC_SHARED@
 libtalloc_li...@libtalloc_libs@
+libreplace_li...@libreplace_libs@
 libt...@libtdb_static@ @LIBTDB_SHARED@
 libtdb_li...@libtdb_libs@
 libneta...@libnetapi_static@ @LIBNETAPI_SHARED@
@@ -1837,7 +1836,7 @@ $(LIBTALLOC_SYMS): $(LIBTALLOC_HEADERS)
 
 $(LIBTALLOC_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBTALLOC_OBJ) 
$(LIBTALLOC_SYMS)
@echo Linking shared library $@
-   @$(SHLD_DSO) $(LIBTALLOC_OBJ) @sonamef...@`basename $...@`
+   @$(SHLD_DSO) $(LIBTALLOC_OBJ) $(LIBREPLACE_LIBS) @sonamef...@`basename 
$...@`
 
 $(LIBTALLOC_SHARED_TARGET): $(LIBTALLOC_SHARED_TARGET_SONAME)
@rm -f $@
@@ -1915,7 +1914,7 @@ $(LIBTDB_SYMS): $(LIBTDB_HEADERS)
 
 $(LIBTDB_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBTDB_OBJ) $(LIBTDB_SYMS)
@echo Linking shared library $@
-   @$(SHLD_DSO) $(LIBTDB_OBJ) \
+   @$(SHLD_DSO) $(LIBTDB_OBJ) $(LIBREPLACE_LIBS) \
@sonamef...@`basename $...@`
 
 $(LIBTDB_SHARED_TARGET): $(LIBTDB_SHARED_TARGET_SONAME)
@@ -2011,7 +2010,7 @@ $(LIBWBCLIENT_SYMS): $(LIBWBCLIENT_HEADERS)
 
 $(LIBWBCLIENT_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ) 
$(LIBWBCLIENT_SYMS) $(LIBTALLOC)
@echo Linking shared library $@
-   @$(SHLD_DSO) $(LIBWBCLIENT_OBJ) $(LIBTALLOC_LIBS) \
+   @$(SHLD_DSO) $(LIBWBCLIENT_OBJ) $(LIBTALLOC_LIBS) $(LIBREPLACE_LIBS) \
@sonamef...@`basename $...@`
 
 $(LIBWBCLIENT_SHARED_TARGET): $(LIBWBCLIENT_SHARED_TARGET_SONAME)
@@ -2514,7 +2513,7 @@ bin/v...@exeext@: $(BINARY_PREREQS) $(VLP_OBJ) $(LIBTDB)
 @WINBIND_NSS@: $(BINARY_PREREQS) $(WINBIND_NSS_OBJ)
@echo Linking $@
@$(SHLD) $(WINBIND_NSS_LDSHFLAGS) -o $@ $(WINBIND_NSS_OBJ) \
-   $(WINBIND_NSS_EXTRA_LIBS) $(WINBIND_NSS_PTHREAD) \
+   $(LIBREPLACE_LIBS) $(WINBIND_NSS_PTHREAD) \
@sonamef...@`basename $...@`@NSSSONAMEVERSIONSUFFIX@
 
 @WINBIND_WINS_NSS@: $(BINARY_PREREQS) $(WINBIND_WINS_NSS_OBJ) $(LIBTALLOC) 
$(LIBTDB)
@@ -2531,7 +2530,7 @@ bin/winbind_krb5_locat...@shlibext@: $(BINARY_PREREQS) 
$(WINBIND_KRB5_LOCATOR_OB
 bin/pam_winbi...@shlibext@: $(BINARY_PREREQS) $(PAM_WINBIND_OBJ) $(LIBTALLOC) 
$(LIBWBCLIENT)
@echo Linking shared library $@
@$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_OBJ) -lpam @INIPARSERLIBS@ \
-   $(PAM_WINBIND_EXTRA_LIBS) $(LIBTALLOC_LIBS) $(LIBWBCLIENT_LIBS) 
@sonamef...@`basename $...@`
+   $(LIBREPLACE_LIBS) $(LIBTALLOC_LIBS) $(LIBWBCLIENT_LIBS) 
@sonamef...@`basename $...@`
 
 ##
 # Plugins:
diff --git a/source3/configure.in b/source3/configure.in
index b75ea76..790a0f0 100644
--- 

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

2009-10-30 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  e7fdabf... s4-smbtorture: skip bigendian tests against s3 in 
RPC-LSA-SECRETS.
   via  9cc63fe... s3-rpcclient: add deletetrustdom command.
   via  f547c3b... s3-rpcclient: add createtrustdom command.
   via  9a2ebc6... s3-lsa: expand struct lsa_info to carry name and sd.
   via  474a8e4... s3-lsa: use switch in _lsa_QuerySecurity().
   via  4522d79... s4-smbtorture: fix warning in RPC-WKSSVC torture test.
   via  3b11908... s3-secrets: use autogenerated code for TRUSTED_DOM_PASS 
struct parsing from a tdb.
   via  4899dc4... s3: add secrets.idl.
  from  11708ca... Start fixing the RAW-STREAMS test - ensure that the 
xattr used to store the stream info in streams_depot.so is not seen in when 
enumerating EAs. Jeremy.

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


- Log -
commit e7fdabff1fb8adeb6a58521811adfc85f41c34f3
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 29 14:50:56 2009 +0100

s4-smbtorture: skip bigendian tests against s3 in RPC-LSA-SECRETS.

Guenther
(cherry picked from commit 3587bb63e21c3f033a17bb493dceb64b05fe85d6)

commit 9cc63feb849ea59391f835f659ef8ff07c4d779e
Author: Günther Deschner g...@samba.org
Date:   Wed Oct 28 15:37:11 2009 +0100

s3-rpcclient: add deletetrustdom command.

Guenther
(cherry picked from commit 2f3a40844dbac11345a9aabf4a3edd71bab3fec6)

commit f547c3b997e56cd555f6133a131b1a3c00fc71df
Author: Günther Deschner g...@samba.org
Date:   Wed Oct 28 14:13:32 2009 +0100

s3-rpcclient: add createtrustdom command.

Guenther
(cherry picked from commit fbdda195498a9868b9a11a4e0621fadab1ce0963)

commit 9a2ebc6b33773ca02efeda03c4d699ed28fd3190
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 29 23:50:20 2009 +0100

s3-lsa: expand struct lsa_info to carry name and sd.

Guenther
(cherry picked from commit a98832189a429d7d36eb0decbe66d228061c8cd1)

commit 474a8e4d8c2c451c347d0826ca3008507ee20d95
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 29 12:36:30 2009 +0100

s3-lsa: use switch in _lsa_QuerySecurity().

Guenther
(cherry picked from commit 820b2f4cfaf0d5a954ed3bbf3e6b74ccdbfebe70)

commit 4522d79d90140f051e1d83a572f67564192ac5d8
Author: Günther Deschner g...@samba.org
Date:   Fri Oct 30 12:13:21 2009 +0100

s4-smbtorture: fix warning in RPC-WKSSVC torture test.

Guenther
(cherry picked from commit 5e8c86c558360ea3c507dae5b3088aa1c2c97bb4)

commit 3b11908e3ae3c98bf3ae4ad0581b756e5cb265ab
Author: Günther Deschner g...@samba.org
Date:   Wed Oct 28 16:42:44 2009 +0100

s3-secrets: use autogenerated code for TRUSTED_DOM_PASS struct parsing from 
a tdb.

Guenther
(cherry picked from commit 184afaa04ca90e089be0071ffb024a884d9d347f)

commit 4899dc43b0816393c0e3f2d474761d58eee1f1fd
Author: Günther Deschner g...@samba.org
Date:   Wed Oct 28 16:21:53 2009 +0100

s3: add secrets.idl.

Guenther
(cherry picked from commit e92e33238c79a917db7af9b6dfbf06ebaaba9fd8)

---

Summary of changes:
 source3/Makefile.in  |6 +-
 source3/include/secrets.h|   12 --
 source3/librpc/gen_ndr/ndr_secrets.c |   79 +++
 source3/librpc/gen_ndr/ndr_secrets.h |   13 ++
 source3/librpc/gen_ndr/secrets.h |   19 +++
 source3/librpc/idl/secrets.idl   |   27 
 source3/passdb/secrets.c |  256 +-
 source3/rpc_server/srv_lsa_nt.c  |   12 ++-
 source3/rpcclient/cmd_lsarpc.c   |  134 ++
 source4/torture/rpc/session_key.c|6 +
 source4/torture/rpc/wkssvc.c |8 +-
 11 files changed, 332 insertions(+), 240 deletions(-)
 create mode 100644 source3/librpc/gen_ndr/ndr_secrets.c
 create mode 100644 source3/librpc/gen_ndr/ndr_secrets.h
 create mode 100644 source3/librpc/gen_ndr/secrets.h
 create mode 100644 source3/librpc/idl/secrets.idl


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 6a150ac..748bfd3 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -451,7 +451,8 @@ LIBADS_SERVER_OBJ = libads/kerberos_verify.o 
libads/authdata.o \
../librpc/ndr/ndr_krb5pac.o \
../librpc/gen_ndr/ndr_krb5pac.o
 
-SECRETS_OBJ = passdb/secrets.o passdb/machine_sid.o
+SECRETS_OBJ = passdb/secrets.o passdb/machine_sid.o \
+ librpc/gen_ndr/ndr_secrets.o
 
 LIBNBT_OBJ = ../libcli/nbt/nbtname.o \
 ../libcli/netlogon.o \
@@ -1405,7 +1406,8 @@ samba3-idl::
@PIDL_OUTPUTDIR=librpc/gen_ndr PIDL_ARGS=$(PIDL_ARGS) CPP=$(CPP) 
PIDL=../pidl/pidl \
 srcdir=$(srcdir) $(srcdir)/script/build_idl.sh \
librpc/idl/messaging.idl librpc/idl/libnetapi.idl 
librpc/idl/notify.idl \
-   

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

2009-10-30 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  f6a1bcb... s3/docs: Remove reference to nonexistent file.
  from  e7fdabf... s4-smbtorture: skip bigendian tests against s3 in 
RPC-LSA-SECRETS.

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


- Log -
commit f6a1bcb69aea271a7afed409530da02595064f71
Author: Karolin Seeger ksee...@samba.org
Date:   Fri Oct 30 16:31:55 2009 +0100

s3/docs: Remove reference to nonexistent file.

Fix bug #4252. Thanks to TAKAHASHI Motonobu mo...@samba.gr.jp for 
reporting!

Karolin
(cherry picked from commit 52aa522a550de45aa28969d0a679ff4e9b6575d6)

---

Summary of changes:
 docs-xml/smbdotconf/locking/oplocks.xml |4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/locking/oplocks.xml 
b/docs-xml/smbdotconf/locking/oplocks.xml
index 0c6c269..a56e921 100644
--- a/docs-xml/smbdotconf/locking/oplocks.xml
+++ b/docs-xml/smbdotconf/locking/oplocks.xml
@@ -10,9 +10,7 @@
the speed of access to files on Samba servers. It allows the clients 
to aggressively cache files locally and you may want to disable this 
option for unreliable network environments (it is turned on by 
-   default in Windows NT Servers).  For more information see the file 
-   filename moreinfo=noneSpeed.txt/filename in the Samba 
-   filename moreinfo=nonedocs//filename directory.
+   default in Windows NT Servers).
/para
 
para


-- 
Samba Shared Repository


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

2009-10-30 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  5087e0c... s3/docs: Fix typo.
  from  f6a1bcb... s3/docs: Remove reference to nonexistent file.

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


- Log -
commit 5087e0ce311c68420c68c285fcdffc5174690621
Author: Karolin Seeger ksee...@samba.org
Date:   Fri Oct 30 16:47:22 2009 +0100

s3/docs: Fix typo.

Fix bug #4250. Thanks to TAKAHASHI Motonobu mo...@samba.gr.jp for 
reporting!

Karolin
(cherry picked from commit d1ad143a707b36b3aafcbb498554b73d2013f6e8)

---

Summary of changes:
 docs-xml/smbdotconf/filename/manglednames.xml |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/filename/manglednames.xml 
b/docs-xml/smbdotconf/filename/manglednames.xml
index 90bbc58..a4ec0bf 100644
--- a/docs-xml/smbdotconf/filename/manglednames.xml
+++ b/docs-xml/smbdotconf/filename/manglednames.xml
@@ -10,7 +10,7 @@
paraSee the section on smbconfoption name=name mangling/ for 
details on how to control the mangling process./para
 
-   paraIf mangling is used then the mangling algorithm is as 
follows:/para
+   paraIf mangling is used then the mangling method is as follows:/para
 
itemizedlist
listitem


-- 
Samba Shared Repository


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

2009-10-29 Thread Stefan Metzmacher
The branch, v3-5-test has been updated
   via  54d8b2f... s3:configure: only check for gpfs_gpl.h
  from  a5af824... s3-passdb: move open_schannel_session_store() to 
passdb/secrets_schannel.c.

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


- Log -
commit 54d8b2fcb14ee1b165feda764b0c2f16c4a6dc95
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Oct 28 11:21:27 2009 +0100

s3:configure: only check for gpfs_gpl.h

The header is everything we need in order to build vfs_gpfs.

metze

Signed-off-by: Michael Adam ob...@samba.org
(cherry picked from commit ee13e9c0becc2b4a4d3b233613d5e3e9bfb54938)

---

Summary of changes:
 source3/configure.in |   30 +-
 1 files changed, 5 insertions(+), 25 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index be93ce5..b75ea76 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1031,33 +1031,13 @@ AC_CHECK_LIB(exc, trace_back_stack)
 # check for sysctlbyname for BSD systems
 AC_CHECK_FUNCS(sysctlbyname)
 
-printf %s checking for GPFS GPL libs... 
-save_LIBS=$LIBS
-LIBS=$LIBS -lgpfs_gpl
-AC_TRY_LINK([#include gpfs_gpl.h],
-  [gpfs_set_share(0,GPFS_SHARE_READ,GPFS_DENY_NONE)],
-  samba_cv_HAVE_GPFS=yes,
-  samba_cv_HAVE_GPFS=no)
-echo $samba_cv_HAVE_GPFS
-if test x$samba_cv_HAVE_GPFS = xyes; then
-AC_DEFINE(HAVE_GPFS,1,[Whether GPFS GPL libs are available])
+#
+# check if building with gpfs
+AC_CHECK_HEADERS(gpfs_gpl.h)
+if test x$ac_cv_header_gpfs_gpl_h = xyes; then
+AC_DEFINE(HAVE_GPFS,1,[Whether GPFS GPL headers are available])
 default_shared_modules=$default_shared_modules vfs_gpfs
 fi
-LIBS=$save_LIBS
-
-printf %s checking for GPFS libs (with 3.2.1 PTF8 available as GPL)... 
-save_LIBS=$LIBS
-LIBS=$LIBS -lgpfs
-AC_TRY_LINK([#include gpfs.h],
-  [gpfs_set_share(0,GPFS_SHARE_READ,GPFS_DENY_NONE)],
-  samba_cv_HAVE_GPFS=yes,
-  samba_cv_HAVE_GPFS=no)
-echo $samba_cv_HAVE_GPFS
-if test x$samba_cv_HAVE_GPFS = xyes; then
-AC_DEFINE(HAVE_GPFS,1,[Whether GPFS GPL libs are available])
-default_shared_modules=$default_shared_modules vfs_gpfs
-fi
-LIBS=$save_LIBS
 
 #
 # check if building on Isilon OneFS


-- 
Samba Shared Repository


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

2009-10-29 Thread Jim McDonough
The branch, v3-5-test has been updated
   via  62d9450... s3: Fix incorrect rc check of nscd_flush_cache.
  from  54d8b2f... s3:configure: only check for gpfs_gpl.h

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


- Log -
commit 62d94502ca3f92b663dd30aeec9a78fa42f54ce6
Author: Jim McDonough j...@samba.org
Date:   Thu Oct 29 11:11:43 2009 -0400

s3: Fix incorrect rc check of nscd_flush_cache.

At least this only resulted in an incorrect debug message.

---

Summary of changes:
 source3/lib/util_nscd.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/util_nscd.c b/source3/lib/util_nscd.c
index f019bdd..4feab3b 100644
--- a/source3/lib/util_nscd.c
+++ b/source3/lib/util_nscd.c
@@ -22,7 +22,7 @@
 static void smb_nscd_flush_cache(const char *service)
 {
 #ifdef HAVE_NSCD_FLUSH_CACHE
-   if (!nscd_flush_cache(service)) {
+   if (nscd_flush_cache(service)) {
DEBUG(10,(failed to flush nscd cache for '%s' service: %s. 
  Is nscd running?\n,
  service, strerror(errno)));


-- 
Samba Shared Repository


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

2009-10-29 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  11708ca... Start fixing the RAW-STREAMS test - ensure that the 
xattr used to store the stream info in streams_depot.so is not seen in when 
enumerating EAs. Jeremy.
  from  62d9450... s3: Fix incorrect rc check of nscd_flush_cache.

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


- Log -
commit 11708ca1ee062e2462651aef82276d4403ebcc8a
Author: Jeremy Allison j...@samba.org
Date:   Thu Oct 29 16:14:12 2009 -0700

Start fixing the RAW-STREAMS test - ensure that the xattr
used to store the stream info in streams_depot.so is not
seen in when enumerating EAs.
Jeremy.

---

Summary of changes:
 source3/include/smb.h   |2 ++
 source3/modules/vfs_streams_depot.c |2 --
 source3/smbd/trans2.c   |1 +
 3 files changed, 3 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/smb.h b/source3/include/smb.h
index cee95a9..2ff60f6 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1889,6 +1889,8 @@ struct ea_list {
 #define SAMBA_XATTR_DOSSTREAM_PREFIX user.DosStream.
 /* Prefix for DOS timestamps. */
 #define SAMBA_XATTR_DOSTIMESTAMPS user.DosTimestamps
+/* Prefix for xattrs storing streams. */
+#define SAMBA_XATTR_MARKER user.SAMBA_STREAMS
 
 #define UUID_SIZE 16
 
diff --git a/source3/modules/vfs_streams_depot.c 
b/source3/modules/vfs_streams_depot.c
index 51cd56e..d7b878b 100644
--- a/source3/modules/vfs_streams_depot.c
+++ b/source3/modules/vfs_streams_depot.c
@@ -65,8 +65,6 @@ static uint32_t hash_fn(DATA_BLOB key)
  * an option to put in a special ACL entry for a non-existing group.
  */
 
-#define SAMBA_XATTR_MARKER user.SAMBA_STREAMS
-
 static bool file_is_valid(vfs_handle_struct *handle, const char *path,
  bool check_valid)
 {
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index ce45812..59b778c 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -73,6 +73,7 @@ static bool samba_private_attr_name(const char *unix_ea_name)
SAMBA_POSIX_INHERITANCE_EA_NAME,
SAMBA_XATTR_DOS_ATTRIB,
SAMBA_XATTR_DOSTIMESTAMPS,
+   SAMBA_XATTR_MARKER,
NULL
};
 


-- 
Samba Shared Repository


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

2009-10-28 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  a227073... Fix bug 6572 - libsmbclient: unable to access 'msdfs 
proxy' share.
  from  b053961... s3/docs: Document new pdbedit -K option.

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


- Log -
commit a227073609eb32b091f2c9e9a12504252ae380b8
Author: SATOH Fumiyasu fumi...@osstech.co.jp
Date:   Wed Oct 28 12:48:36 2009 -0700

Fix bug 6572 - libsmbclient: unable to access 'msdfs proxy' share.

---

Summary of changes:
 source3/include/proto.h|9 +++
 source3/libsmb/clidfs.c|   14 +
 source3/libsmb/libsmb_server.c |  143 ++--
 3 files changed, 120 insertions(+), 46 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 3da5768..b79ced7 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2258,6 +2258,15 @@ bool cli_resolve_path(TALLOC_CTX *ctx,
struct cli_state **targetcli,
char **pp_targetpath);
 
+bool cli_check_msdfs_proxy(TALLOC_CTX *ctx,
+   struct cli_state *cli,
+   const char *sharename,
+   char **pp_newserver,
+   char **pp_newshare,
+   bool force_encrypt,
+   const char *username,
+   const char *password,
+   const char *domain);
 /* The following definitions come from libsmb/clidgram.c  */
 
 bool send_getdc_request(TALLOC_CTX *mem_ctx,
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index 53dc6d7..3352959 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -32,16 +32,6 @@
as a separator when looking at the pathname part JRA.
 /
 
-static bool cli_check_msdfs_proxy(TALLOC_CTX *ctx,
-   struct cli_state *cli,
-   const char *sharename,
-   char **pp_newserver,
-   char **pp_newshare,
-   bool force_encrypt,
-   const char *username,
-   const char *password,
-   const char *domain);
-
 /
  Ensure a connection is encrypted.
 /
@@ -241,7 +231,7 @@ static struct cli_state *do_connect(TALLOC_CTX *ctx,
/* here's the fun partto support 'msdfs proxy' shares
   (on Samba or windows) we have to issues a TRANS_GET_DFS_REFERRAL
   here before trying to connect to the original share.
-  check_dfs_proxy() will fail if it is a normal share. */
+  cli_check_msdfs_proxy() will fail if it is a normal share. */
 
if ((c-capabilities  CAP_DFS) 
cli_check_msdfs_proxy(ctx, c, sharename,
@@ -984,7 +974,7 @@ bool cli_resolve_path(TALLOC_CTX *ctx,
 /
 /
 
-static bool cli_check_msdfs_proxy(TALLOC_CTX *ctx,
+bool cli_check_msdfs_proxy(TALLOC_CTX *ctx,
struct cli_state *cli,
const char *sharename,
char **pp_newserver,
diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c
index 50ecee2..db9d6de 100644
--- a/source3/libsmb/libsmb_server.c
+++ b/source3/libsmb/libsmb_server.c
@@ -7,6 +7,7 @@
Copyright (C) Tom Jansen (Ninja ISD) 2002 
Copyright (C) Derrell Lipman 2003-2008
Copyright (C) Jeremy Allison 2007, 2008
+   Copyright (C) SATOH Fumiyasu fumi...@osstech.co.jp 2009.
 
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
@@ -227,15 +228,16 @@ check_server_cache:
  * info we need, unless the username and password were passed in.
  */
 
-SMBCSRV *
-SMBC_server(TALLOC_CTX *ctx,
+static SMBCSRV *
+SMBC_server_internal(TALLOC_CTX *ctx,
 SMBCCTX *context,
 bool connect_if_not_found,
 const char *server,
 const char *share,
 char **pp_workgroup,
 char **pp_username,
-char **pp_password)
+char **pp_password,
+   bool *in_cache)
 {
SMBCSRV *srv=NULL;
char *workgroup = NULL;
@@ -250,9 +252,11 @@ SMBC_server(TALLOC_CTX *ctx,
uint32 fs_attrs = 0;
 const char *username_used;
NTSTATUS status;
+   char *newserver, *newshare;
 
zero_sockaddr(ss);

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

2009-10-28 Thread Björn Jacke
The branch, v3-5-test has been updated
   via  83344b3... s3:net: fix output of net rpc trustdom list
  from  a227073... Fix bug 6572 - libsmbclient: unable to access 'msdfs 
proxy' share.

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


- Log -
commit 83344b34d16e431ca8030585b383db1414154981
Author: Björn Jacke b...@sernet.de
Date:   Wed Oct 28 14:33:40 2009 +0100

s3:net: fix output of net rpc trustdom list

Move some messages from stderr to stdout. When some trusting DCs were
unreachable we lacked \n's on stdout which screwed up whole the output.

---

Summary of changes:
 source3/utils/net_rpc.c |8 +---
 1 files changed, 5 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 0e325b5..b06f62a 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -5770,7 +5770,9 @@ static NTSTATUS rpc_query_domain_sid(struct net_context 
*c,
const char **argv)
 {
fstring str_sid;
-   sid_to_fstring(str_sid, domain_sid);
+   if (!sid_to_fstring(str_sid, domain_sid)) {
+   return NT_STATUS_UNSUCCESSFUL;
+   }
d_printf(%s\n, str_sid);
return NT_STATUS_OK;
 }
@@ -6245,8 +6247,7 @@ static int rpc_trustdom_list(struct net_context *c, int 
argc, const char **argv)
ndr_table_lsarpc.syntax_id, 0,
rpc_query_domain_sid, argc,
argv))
-   d_fprintf(stderr,
- _(couldn't get domain's sid\n));
+   d_printf(_(strange - couldn't get 
domain's sid\n));
 
cli_shutdown(remote_cli);
 
@@ -6254,6 +6255,7 @@ static int rpc_trustdom_list(struct net_context *c, int 
argc, const char **argv)
d_fprintf(stderr, _(domain controller is not 
  responding: %s\n),
  nt_errstr(nt_status));
+   d_printf(_(couldn't get domain's sid\n));
};
};
 


-- 
Samba Shared Repository


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

2009-10-28 Thread Björn Jacke
The branch, v3-5-test has been updated
   via  53c6c53... s3:net: simplify padding to single printf call
   via  37ddb05... s3:net simplify padding to single printf call
  from  83344b3... s3:net: fix output of net rpc trustdom list

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


- Log -
commit 53c6c535cde05d4c102381d782f235f0339cf6f0
Author: Björn Jacke b...@sernet.de
Date:   Wed Oct 14 00:22:08 2009 +0200

s3:net: simplify padding to single printf call

commit 37ddb05a94342fbb84058c03685c87903e787c48
Author: Björn Jacke b...@sernet.de
Date:   Wed Oct 14 00:19:35 2009 +0200

s3:net simplify padding to single printf call

---

Summary of changes:
 source3/utils/net_rpc.c   |   10 ++
 source3/utils/net_rpc_audit.c |   10 +-
 2 files changed, 3 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index b06f62a..f5de1e6 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -5779,18 +5779,12 @@ static NTSTATUS rpc_query_domain_sid(struct net_context 
*c,
 
 static void print_trusted_domain(DOM_SID *dom_sid, const char 
*trusted_dom_name)
 {
-   fstring ascii_sid, padding;
-   int pad_len, col_len = 20;
+   fstring ascii_sid;
 
/* convert sid into ascii string */
sid_to_fstring(ascii_sid, dom_sid);
 
-   /* calculate padding space for d_printf to look nicer */
-   pad_len = col_len - strlen(trusted_dom_name);
-   padding[pad_len] = 0;
-   do padding[--pad_len] = ' '; while (pad_len);
-
-   d_printf(%s%s%s\n, trusted_dom_name, padding, ascii_sid);
+   d_printf(%-20s%s\n, trusted_dom_name, ascii_sid);
 }
 
 static NTSTATUS vampire_trusted_domain(struct rpc_pipe_client *pipe_hnd,
diff --git a/source3/utils/net_rpc_audit.c b/source3/utils/net_rpc_audit.c
index f0b440d..bc3ed3d 100644
--- a/source3/utils/net_rpc_audit.c
+++ b/source3/utils/net_rpc_audit.c
@@ -40,9 +40,6 @@ static int net_help_audit(struct net_context *c, int argc, 
const char **argv)
 
 static void print_auditing_category(const char *policy, const char *value)
 {
-   fstring padding;
-   int pad_len, col_len = 30;
-
if (policy == NULL) {
policy = N_(Unknown);
}
@@ -50,12 +47,7 @@ static void print_auditing_category(const char *policy, 
const char *value)
value = N_(Invalid);
}
 
-   /* calculate padding space for d_printf to look nicer */
-   pad_len = col_len - strlen(policy);
-   padding[pad_len] = 0;
-   do padding[--pad_len] = ' '; while (pad_len  0);
-
-   d_printf(_(\t%s%s%s\n), policy, padding, value);
+   d_printf(_(\t%-30s%s\n), policy, value);
 }
 
 /


-- 
Samba Shared Repository


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

2009-10-28 Thread Björn Jacke
The branch, v3-5-test has been updated
   via  a4556d4... s3:Makefile: rename LDSHFLAG variables to make meaning 
more obvious
  from  53c6c53... s3:net: simplify padding to single printf call

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


- Log -
commit a4556d443395c56e2ad442b62f20f73cd13e82eb
Author: Björn Jacke b...@sernet.de
Date:   Wed Oct 28 21:37:08 2009 +0100

s3:Makefile: rename LDSHFLAG variables to make meaning more obvious

---

Summary of changes:
 source3/Makefile.in |  176 +-
 1 files changed, 88 insertions(+), 88 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 35c8b82..0a9fb91 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -46,7 +46,7 @@ CPPFLAGS=-DHAVE_CONFIG_H @CPPFLAGS@
 exee...@exeext@
 a...@ar@
 ldshfla...@ldshflags@ @RELRO_LDFLAGS@ @LDFLAGS@ -lc @LDSHFLAGS_Z_DEFS@
-ldpluginfla...@ldshflags@ @RELRO_LDFLAGS@ @LDFLAGS@ @LDSHFLAGS_Z_NODEFS@
+ldshflags_modul...@ldshflags@ @RELRO_LDFLAGS@ @LDFLAGS@ @LDSHFLAGS_Z_NODEFS@
 ldfla...@pie_ldflags@ @RELRO_LDFLAGS@ @LDFLAGS@
 
 winbind_nss_ldshfla...@winbind_nss_ldshflags@ @LDFLAGS@ -lc @LDSHFLAGS_Z_DEFS@
@@ -2433,67 +2433,67 @@ bin/libbigballofm...@shlibext@: $(BINARY_PREREQS) 
$(LIBBIGBALLOFMUD_OBJ) $(LIBTA
 #
 
 # Linker command to link our shared libraries:
-SHLD_MODULE = $(SHLD) $(LDSHFLAGS) $(MODULE_EXPORTS) \
+SHLD_LIBRARY = $(SHLD) $(LDSHFLAGS) $(MODULE_EXPORTS) \
  -o $@ @sonamef...@`basename $...@`
 # Linker command to link samba internal plugin modules:
-SHLD_PLUGIN = $(SHLD) $(LDPLUGINFLAGS) $(MODULE_EXPORTS) \
+SHLD_MODULE = $(SHLD) $(LDSHFLAGS_MODULES) $(MODULE_EXPORTS) \
-o $@ @sonamef...@`basename $...@`
 
 bin/librpc_lsar...@shlibext@: $(BINARY_PREREQS) $(RPC_LSA_OBJ)
@echo Linking $@
-   @$(SHLD_MODULE) $(RPC_LSA_OBJ)
+   @$(SHLD_LIBRARY) $(RPC_LSA_OBJ)
 
 bin/librpc_sa...@shlibext@: $(BINARY_PREREQS) $(RPC_SAMR_OBJ)
@echo Linking $@
-   @$(SHLD_MODULE) $(RPC_SAMR_OBJ)
+   @$(SHLD_LIBRARY) $(RPC_SAMR_OBJ)
 
 bin/librpc_srvs...@shlibext@: $(BINARY_PREREQS) $(RPC_SVC_OBJ)
@echo Linking $@
-   @$(SHLD_MODULE) $(RPC_SVC_OBJ)
+   @$(SHLD_LIBRARY) $(RPC_SVC_OBJ)
 
 bin/librpc_svcc...@shlibext@: $(BINARY_PREREQS) $(RPC_SVCCTL_OBJ)
@echo Linking $@
-   @$(SHLD_MODULE) $(RPC_SVCCTL_OBJ)
+   @$(SHLD_LIBRARY) $(RPC_SVCCTL_OBJ)
 
 bin/librpc_ntsv...@shlibext@: $(BINARY_PREREQS) $(RPC_NTSVCS_OBJ)
@echo Linking $@
-   @$(SHLD_MODULE) $(RPC_NTSVCS_OBJ)
+   @$(SHLD_LIBRARY) $(RPC_NTSVCS_OBJ)
 
 bin/librpc_wkss...@shlibext@: $(BINARY_PREREQS) $(RPC_WKS_OBJ)
@echo Linking $@
-   @$(SHLD_MODULE) $(RPC_WKS_OBJ)
+   @$(SHLD_LIBRARY) $(RPC_WKS_OBJ)
 
 bin/librpc_netlog...@shlibext@: $(BINARY_PREREQS) $(RPC_NETLOG_OBJ)
@echo Linking $@
-   @$(SHLD_MODULE) $(RPC_NETLOG_OBJ)
+   @$(SHLD_LIBRARY) $(RPC_NETLOG_OBJ)
 
 bin/librpc_winr...@shlibext@: $(BINARY_PREREQS) $(RPC_REG_OBJ)
@echo Linking $@
-   @$(SHLD_MODULE) $(RPC_REG_OBJ)
+   @$(SHLD_LIBRARY) $(RPC_REG_OBJ)
 
 bin/librpc_initshutdo...@shlibext@: $(BINARY_PREREQS) $(RPC_INITSHUTDOWN_OBJ)
@echo Linking $@
-   @$(SHLD_MODULE) $(RPC_INITSHUTDOWN_OBJ)
+   @$(SHLD_LIBRARY) $(RPC_INITSHUTDOWN_OBJ)
 
 bin/librpc_dsset...@shlibext@: $(BINARY_PREREQS) $(RPC_DSSETUP_OBJ)
@echo Linking $@
-   @$(SHLD_MODULE) $(RPC_DSSETUP_OBJ)
+   @$(SHLD_LIBRARY) $(RPC_DSSETUP_OBJ)
 
 bin/librpc_spool...@shlibext@: $(BINARY_PREREQS) $(RPC_SPOOLSS_OBJ)
@echo Linking $@
-   @$(SHLD_MODULE) $(RPC_SPOOLSS_OBJ)
+   @$(SHLD_LIBRARY) $(RPC_SPOOLSS_OBJ)
 
 bin/librpc_eventl...@shlibext@: $(BINARY_PREREQS) $(RPC_EVENTLOG_OBJ)
@echo Linking $@
-   @$(SHLD_MODULE) $(RPC_EVENTLOG_OBJ)
+   @$(SHLD_LIBRARY) $(RPC_EVENTLOG_OBJ)
 
 bin/librpc_netd...@shlibext@: $(BINARY_PREREQS) $(RPC_DFS_OBJ)
@echo Linking $@
-   @$(SHLD_MODULE) $(RPC_DFS_OBJ)
+   @$(SHLD_LIBRARY) $(RPC_DFS_OBJ)
 
 bin/librpc_ec...@shlibext@: $(BINARY_PREREQS) $(RPC_ECHO_OBJ)
@echo Linking $@
-   @$(SHLD_MODULE) $(RPC_ECHO_OBJ)
+   @$(SHLD_LIBRARY) $(RPC_ECHO_OBJ)
 
 bin/winbi...@exeext@: $(BINARY_PREREQS) $(WINBINDD_OBJ) @BUILD_POPT@ 
$(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
@echo Linking $@
@@ -2536,290 +2536,290 @@ bin/pam_winbi...@shlibext@: $(BINARY_PREREQS) 
$(PAM_WINBIND_OBJ) $(LIBTALLOC) $(
 
 bin/built...@shlibext@: $(BINARY_PREREQS) $(AUTH_BUILTIN_OBJ)
@echo Building plugin $@
-   @$(SHLD_PLUGIN) $(AUTH_BUILTIN_OBJ)
+   @$(SHLD_MODULE) $(AUTH_BUILTIN_OBJ)
 
 bin/doma...@shlibext@: $(BINARY_PREREQS) $(AUTH_DOMAIN_OBJ)
@echo Building plugin $@
- 

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

2009-10-28 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  0ef863a... Add in Metze's new code to ndr encode the user.DOSATTRIB 
blobs. Next I'll change the create timestamp and dos attribute code to use this.
  from  a4556d4... s3:Makefile: rename LDSHFLAG variables to make meaning 
more obvious

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


- Log -
commit 0ef863ad21e017693a821912c96fc69471ffe9fe
Author: Stefan (metze) Metzmacher me...@samba.org
Date:   Wed Oct 28 15:42:47 2009 -0700

Add in Metze's new code to ndr encode the user.DOSATTRIB
blobs. Next I'll change the create timestamp and dos attribute
code to use this.

---

Summary of changes:
 librpc/gen_ndr/ndr_xattr.c |  234 +++-
 librpc/gen_ndr/ndr_xattr.h |   19 -
 librpc/gen_ndr/xattr.h |   40 -
 librpc/idl/xattr.idl   |   53 +-
 librpc/ndr/ndr_xattr.c |  148 
 librpc/ndr/ndr_xattr.h |   37 +++
 source3/Makefile.in|1 +
 source4/librpc/config.mk   |2 +-
 8 files changed, 525 insertions(+), 9 deletions(-)
 create mode 100644 librpc/ndr/ndr_xattr.c
 create mode 100644 librpc/ndr/ndr_xattr.h


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/ndr_xattr.c b/librpc/gen_ndr/ndr_xattr.c
index fcc803d..6a22539 100644
--- a/librpc/gen_ndr/ndr_xattr.c
+++ b/librpc/gen_ndr/ndr_xattr.c
@@ -4,6 +4,38 @@
 #include ../librpc/gen_ndr/ndr_xattr.h
 
 #include librpc/gen_ndr/ndr_security.h
+static enum ndr_err_code ndr_push_xattr_DosInfoCompat(struct ndr_push 
*ndr, int ndr_flags, const struct xattr_DosInfoCompat *r)
+{
+   if (ndr_flags  NDR_SCALARS) {
+   NDR_CHECK(ndr_push_align(ndr, 4));
+   NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r-attrib));
+   NDR_CHECK(ndr_push_trailer_align(ndr, 4));
+   }
+   if (ndr_flags  NDR_BUFFERS) {
+   }
+   return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_xattr_DosInfoCompat(struct ndr_pull 
*ndr, int ndr_flags, struct xattr_DosInfoCompat *r)
+{
+   if (ndr_flags  NDR_SCALARS) {
+   NDR_CHECK(ndr_pull_align(ndr, 4));
+   NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r-attrib));
+   NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
+   }
+   if (ndr_flags  NDR_BUFFERS) {
+   }
+   return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_xattr_DosInfoCompat(struct ndr_print *ndr, const 
char *name, const struct xattr_DosInfoCompat *r)
+{
+   ndr_print_struct(ndr, name, xattr_DosInfoCompat);
+   ndr-depth++;
+   ndr_print_uint32(ndr, attrib, r-attrib);
+   ndr-depth--;
+}
+
 static enum ndr_err_code ndr_push_xattr_DosInfo1(struct ndr_push *ndr, int 
ndr_flags, const struct xattr_DosInfo1 *r)
 {
if (ndr_flags  NDR_SCALARS) {
@@ -113,13 +145,94 @@ _PUBLIC_ void ndr_print_xattr_DosInfo2Old(struct 
ndr_print *ndr, const char *nam
ndr-depth--;
 }
 
-static enum ndr_err_code ndr_push_xattr_DosInfo(struct ndr_push *ndr, int 
ndr_flags, const union xattr_DosInfo *r)
+static enum ndr_err_code ndr_push_xattr_DosInfoValidFlags(struct ndr_push 
*ndr, int ndr_flags, uint32_t r)
+{
+   NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+   return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_xattr_DosInfoValidFlags(struct ndr_pull 
*ndr, int ndr_flags, uint32_t *r)
+{
+   uint32_t v;
+   NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, v));
+   *r = v;
+   return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_xattr_DosInfoValidFlags(struct ndr_print *ndr, const 
char *name, uint32_t r)
+{
+   ndr_print_uint32(ndr, name, r);
+   ndr-depth++;
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), XATTR_DOSINFO_ATTRIB, 
XATTR_DOSINFO_ATTRIB, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), XATTR_DOSINFO_EA_SIZE, 
XATTR_DOSINFO_EA_SIZE, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), XATTR_DOSINFO_SIZE, 
XATTR_DOSINFO_SIZE, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
XATTR_DOSINFO_ALLOC_SIZE, XATTR_DOSINFO_ALLOC_SIZE, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
XATTR_DOSINFO_CREATE_TIME, XATTR_DOSINFO_CREATE_TIME, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
XATTR_DOSINFO_CHANGE_TIME, XATTR_DOSINFO_CHANGE_TIME, r);
+   ndr-depth--;
+}
+
+static enum ndr_err_code ndr_push_xattr_DosInfo3(struct ndr_push *ndr, int 
ndr_flags, const struct xattr_DosInfo3 *r)
+{
+   if (ndr_flags  NDR_SCALARS) {
+   NDR_CHECK(ndr_push_align(ndr, 4));
+   NDR_CHECK(ndr_push_xattr_DosInfoValidFlags(ndr, NDR_SCALARS, 
r-valid_flags));
+   NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r-attrib));
+   NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r-ea_size));
+   

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

2009-10-28 Thread Simo Sorce
The branch, v3-5-test has been updated
   via  4b69d99... Fix map readonly in smb.conf, it is a single word
  from  0ef863a... Add in Metze's new code to ndr encode the user.DOSATTRIB 
blobs. Next I'll change the create timestamp and dos attribute code to use this.

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


- Log -
commit 4b69d99f28478f40a7c8fe96be74cb73198e1fda
Author: Simo Sorce i...@samba.org
Date:   Wed Oct 28 19:10:08 2009 -0400

Fix map readonly in smb.conf, it is a single word

---

Summary of changes:
 docs-xml/smbdotconf/filename/mapreadonly.xml |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/filename/mapreadonly.xml 
b/docs-xml/smbdotconf/filename/mapreadonly.xml
index f9ce03e..24a2c84 100644
--- a/docs-xml/smbdotconf/filename/mapreadonly.xml
+++ b/docs-xml/smbdotconf/filename/mapreadonly.xml
@@ -1,4 +1,4 @@
-samba:parameter name=map read only
+samba:parameter name=map readonly
  context=S
 type=enum
  xmlns:samba=http://www.samba.org/samba/DTD/samba-doc;


-- 
Samba Shared Repository


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

2009-10-28 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  a5af824... s3-passdb: move open_schannel_session_store() to 
passdb/secrets_schannel.c.
   via  50b1a41... s3-net: acct_flags are uint32_t in 
net_sam_set_userflag().
   via  ed9df48... adssearch: dump some more nttime timestamps.
   via  d8f6db0... s3-lsa: add lsa_trusted_domain_mapping.
   via  6e3444c... lsa: add LSA_TRUSTED_DOMAIN access masks.
   via  87c1eb2... s3-passdb: add secrets_delete_generic().
   via  cebefbe... s3-lsa: add lsa_secret_mapping.
   via  c765a61... lsa: add LSA_SECRET access masks.
   via  cd3b6ee... s3-lsa: use correct function name 
in_lsa_RemoveAccountRights().
   via  70e65d3... s3-lsa: pure cosmetic indentation fixes.
   via  48e7b9e... s3-lsa: use enum lsa_LookupNamesLevel in 
lsa_lookup_level_to_flags().
  from  4b69d99... Fix map readonly in smb.conf, it is a single word

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


- Log -
commit a5af824b953a7446ac7ce2e0efc18f0e1ca538bd
Author: Günther Deschner g...@samba.org
Date:   Wed Oct 28 11:36:13 2009 +0100

s3-passdb: move open_schannel_session_store() to passdb/secrets_schannel.c.

Guenther

commit 50b1a41bc19c6ca8a9364fe5a95e8bd6ba4f9894
Author: Günther Deschner g...@samba.org
Date:   Wed Oct 28 10:56:01 2009 +0100

s3-net: acct_flags are uint32_t in net_sam_set_userflag().

Guenther

commit ed9df48953fc3877013e2cf09bc782fce36ea825
Author: Günther Deschner g...@samba.org
Date:   Wed Oct 28 10:55:14 2009 +0100

adssearch: dump some more nttime timestamps.

Guenther

commit d8f6db0626c6a7e404e98fa708cd29d55ec9e381
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 27 15:29:02 2009 +0100

s3-lsa: add lsa_trusted_domain_mapping.

Guenther

commit 6e3444cc8b5c1989c3076f7656289b6226222e45
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 27 15:28:06 2009 +0100

lsa: add LSA_TRUSTED_DOMAIN access masks.

Guenther

commit 87c1eb24a5d63bdb53b7400d111ff13fb4d35c48
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 27 14:59:25 2009 +0100

s3-passdb: add secrets_delete_generic().

Guenther

commit cebefbeaeec5acf646964c52862e8337719fafb1
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 27 13:50:43 2009 +0100

s3-lsa: add lsa_secret_mapping.

Guenther

commit c765a61bbff44666d78f80ec2ce87a58f32bd034
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 27 13:49:21 2009 +0100

lsa: add LSA_SECRET access masks.

Guenther

commit cd3b6eead757434d32535107746713d9631c15be
Author: Günther Deschner g...@samba.org
Date:   Mon Oct 26 23:47:01 2009 +0100

s3-lsa: use correct function name in_lsa_RemoveAccountRights().

Guenther

commit 70e65d3c947b261f1d26d95b620627237a3c4fe2
Author: Günther Deschner g...@samba.org
Date:   Mon Oct 26 23:37:21 2009 +0100

s3-lsa: pure cosmetic indentation fixes.

Guenther

commit 48e7b9e2c0ef95b9e3fbf439ad68ff412c156ebd
Author: Günther Deschner g...@samba.org
Date:   Mon Oct 26 23:28:30 2009 +0100

s3-lsa: use enum lsa_LookupNamesLevel in lsa_lookup_level_to_flags().

Guenther

---

Summary of changes:
 examples/misc/adssearch.pl|2 +
 librpc/gen_ndr/lsa.h  |8 
 librpc/idl/lsa.idl|   48 +
 source3/include/proto.h   |3 +-
 source3/passdb/secrets.c  |   69 ++---
 source3/passdb/secrets_schannel.c |   63 +
 source3/rpc_server/srv_lsa_nt.c   |   63 -
 source3/utils/net_sam.c   |2 +-
 8 files changed, 173 insertions(+), 85 deletions(-)


Changeset truncated at 500 lines:

diff --git a/examples/misc/adssearch.pl b/examples/misc/adssearch.pl
index 026853d..13a85be 100755
--- a/examples/misc/adssearch.pl
+++ b/examples/misc/adssearch.pl
@@ -518,6 +518,7 @@ my %attr_handler = (
instanceType  = \dump_instance_type,
lastLogon = \dump_nttime,
lastLogonTimestamp= \dump_nttime,
+   lastSetTime   = \dump_nttime,
lockOutObservationWindow  = \dump_nttime_abs,
lockoutDuration   = \dump_nttime_abs,
lockoutTime   = \dump_nttime,
@@ -538,6 +539,7 @@ my %attr_handler = (
objectSid = \dump_sid,
pKT   = \dump_pkt,
pKTGuid   = \dump_guid,
+   priorSetTime  = \dump_nttime,
pwdLastSet= \dump_nttime,
pwdProperties = \dump_pwdproperties,
sAMAccountType= \dump_atype,
diff --git a/librpc/gen_ndr/lsa.h 

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

2009-10-27 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  b053961... s3/docs: Document new pdbedit -K option.
   via  0580198... s3: pdbedit: add option --kickoff-time/-K to set the 
user's kickoff time
  from  b3bb185... Second part of the fix for bug 6828 - infinite timeout 
occurs when byte lock held outside of samba. Fixes case where a connection with 
a pending lock can me marked idle, and ensures that the lock queue timeout is 
always recalculated. Jeremy.

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


- Log -
commit b053961f49697b11109b5f8ff82035f8b973b922
Author: Karolin Seeger ksee...@samba.org
Date:   Tue Oct 27 16:04:35 2009 +0100

s3/docs: Document new pdbedit -K option.

Karolin
(cherry picked from commit 354038f170f2541318336aa72c9f2a0426c6607e)

commit 058019838f10833c6023e63233edfbb38f9ee71f
Author: Michael Adam ob...@samba.org
Date:   Mon Oct 26 16:07:58 2009 +0100

s3: pdbedit: add option --kickoff-time/-K to set the user's kickoff time

Use never as argument to set this to unlimited.

Michael
(cherry picked from commit 8fdef14305ae1e32d61c80cb10859d41c5754023)

---

Summary of changes:
 docs-xml/manpages-3/pdbedit.8.xml |   10 ++
 source3/utils/pdbedit.c   |   32 
 2 files changed, 38 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/pdbedit.8.xml 
b/docs-xml/manpages-3/pdbedit.8.xml
index fdfce7a..15be78a 100644
--- a/docs-xml/manpages-3/pdbedit.8.xml
+++ b/docs-xml/manpages-3/pdbedit.8.xml
@@ -253,6 +253,16 @@ samba:45:0F2B255F7B67A7A9AAD3B435B51404EE:
/varlistentry
 
varlistentry
+   term-K|--kickoff-time/term
+   listitemparaThis option is used to modify the kickoff
+   time for a certain user. Use never as argument to set the
+   kickoff time to unlimited.
+   /para
+   paraExample: commandpdbedit -K never user/command/para
+   /listitem
+/varlistentry
+
+   varlistentry
term-a/term
listitemparaThis option is used to add a user into the
database. This command needs a user name specified with
diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c
index dce2f05..5d8a6fd 100644
--- a/source3/utils/pdbedit.c
+++ b/source3/utils/pdbedit.c
@@ -49,9 +49,10 @@
 #define BIT_FIX_INIT0x0400
 #define BIT_BADPWRESET 0x0800
 #define BIT_LOGONHOURS 0x1000
+#define BIT_KICKOFFTIME0x2000
 
 #define MASK_ALWAYS_GOOD   0x001F
-#define MASK_USER_GOOD 0x00405FE0
+#define MASK_USER_GOOD 0x20405FE0
 
 static int get_sid_from_cli_string(DOM_SID *sid, const char *str_sid)
 {
@@ -493,7 +494,8 @@ static int set_user_info(const char *username, const char 
*fullname,
 const char *drive, const char *script,
 const char *profile, const char *account_control,
 const char *user_sid, const char *user_domain,
-const bool badpw, const bool hours)
+const bool badpw, const bool hours,
+const char *kickoff_time)
 {
bool updated_autolock = False, updated_badpw = False;
struct samu *sam_pwent;
@@ -578,6 +580,24 @@ static int set_user_info(const char *username, const char 
*fullname,
pdb_set_bad_password_time(sam_pwent, 0, PDB_CHANGED);
}
 
+   if (kickoff_time) {
+   char *endptr;
+   time_t value = get_time_t_max();
+
+   if (strcmp(kickoff_time, never) != 0) {
+   uint32_t num = strtoul(kickoff_time, endptr, 10);
+
+   if ((endptr == kickoff_time) || (endptr[0] != '\0')) {
+   fprintf(stderr, Failed to parse kickoff 
time\n);
+   return -1;
+   }
+
+   value = convert_uint32_to_time_t(num);
+   }
+
+   pdb_set_kickoff_time(sam_pwent, value, PDB_CHANGED);
+   }
+
if (NT_STATUS_IS_OK(pdb_update_sam_account(sam_pwent))) {
print_user_info(username, True, False);
} else {
@@ -989,6 +1009,7 @@ int main (int argc, char **argv)
static char *pwd_time_format = NULL;
static int pw_from_stdin = False;
struct pdb_methods *bin, *bout;
+   static char *kickoff_time = NULL;
TALLOC_CTX *frame = talloc_stackframe();
NTSTATUS status;
poptContext pc;
@@ -1025,6 +1046,7 @@ int main (int argc, char **argv)
{logon-hours-reset, 'Z', POPT_ARG_NONE, hours_reset, 0, 
reset logon hours, NULL},
{time-format, 0, 

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

2009-10-26 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  77197f3... WHATSNEW: Update release notes.
  from  8aafa80... s3:docs: fake dir create times is a global parameter.

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


- Log -
commit 77197f3a610d121efca312d30eda829f30747f45
Author: Karolin Seeger ksee...@samba.org
Date:   Mon Oct 26 09:49:38 2009 +0100

WHATSNEW: Update release notes.

Karolin

---

Summary of changes:
 WHATSNEW.txt |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index f34e497..dbf8e16 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -21,8 +21,9 @@ smb.conf changes
Parameter Name  Description Default
--  --- ---
 
+   create krb5 conf   New yes
ldap ref followNew auto
-
+   store create time  New no
 
 
 ##


-- 
Samba Shared Repository


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

2009-10-26 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  7601427... s3:docs: Public is not a synonym for access based 
shareenum.
  from  77197f3... WHATSNEW: Update release notes.

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


- Log -
commit 7601427a2db1263b0192c1a78d8bacb7eb0b74da
Author: Karolin Seeger ksee...@samba.org
Date:   Mon Oct 26 10:14:51 2009 +0100

s3:docs: Public is not a synonym for access based shareenum.

Fix build warning.

Karolin
(cherry picked from commit 35dc481289c28a77f354dd76193d6298de32c66d)

---

Summary of changes:
 .../smbdotconf/security/accessbasedshareenum.xml   |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/security/accessbasedshareenum.xml 
b/docs-xml/smbdotconf/security/accessbasedshareenum.xml
index c2977c4..8b94648 100644
--- a/docs-xml/smbdotconf/security/accessbasedshareenum.xml
+++ b/docs-xml/smbdotconf/security/accessbasedshareenum.xml
@@ -3,7 +3,6 @@
  context=S
  basic=1 advanced=1 developer=1
 xmlns:samba=http://www.samba.org/samba/DTD/samba-doc;
- synonympublic/synonym
  description
  paraIf this parameter is constantyes/constant for a
 service, then the share hosted by the service will only be visible


-- 
Samba Shared Repository


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

2009-10-26 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  7e08fa0... s3: Rename new parameter ldap ref follow to ldap 
follow referral.
  from  7601427... s3:docs: Public is not a synonym for access based 
shareenum.

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


- Log -
commit 7e08fa0ddbe591611a32cf44a7cbd944c8afe9a4
Author: Karolin Seeger ksee...@samba.org
Date:   Mon Oct 26 12:11:59 2009 +0100

s3: Rename new parameter ldap ref follow to ldap follow referral.

This parameter will be introduced with Samba 3.5.0.

Karolin
(cherry picked from commit f381faa8d6fc2c4205e7d59c91f00324f70ca8b9)

---

Summary of changes:
 .../{ldapreffollow.xml = ldapfollowreferral.xml}  |2 +-
 source3/include/proto.h|2 +-
 source3/lib/smbldap.c  |4 ++--
 source3/param/loadparm.c   |   10 +-
 4 files changed, 9 insertions(+), 9 deletions(-)
 rename docs-xml/smbdotconf/ldap/{ldapreffollow.xml = ldapfollowreferral.xml} 
(90%)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/ldap/ldapreffollow.xml 
b/docs-xml/smbdotconf/ldap/ldapfollowreferral.xml
similarity index 90%
rename from docs-xml/smbdotconf/ldap/ldapreffollow.xml
rename to docs-xml/smbdotconf/ldap/ldapfollowreferral.xml
index f059f15..4c43b5b 100644
--- a/docs-xml/smbdotconf/ldap/ldapreffollow.xml
+++ b/docs-xml/smbdotconf/ldap/ldapfollowreferral.xml
@@ -1,4 +1,4 @@
-samba:parameter name=ldap ref follow context=G type=enum
+samba:parameter name=ldap follow referral context=G type=enum
advanced=1 developer=1
xmlns:samba=http://www.samba.org/samba/DTD/samba-doc;
 
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 6f81162..3da5768 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3985,7 +3985,7 @@ char *lp_ldap_suffix(void);
 char *lp_ldap_admin_dn(void);
 int lp_ldap_ssl(void);
 bool lp_ldap_ssl_ads(void);
-int lp_ldap_ref_follow(void);
+int lp_ldap_follow_referral(void);
 int lp_ldap_passwd_sync(void);
 bool lp_ldap_delete_dn(void);
 int lp_ldap_replication_sleep(void);
diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c
index 7287e3d..f7ca1c1 100644
--- a/source3/lib/smbldap.c
+++ b/source3/lib/smbldap.c
@@ -724,9 +724,9 @@ int smb_ldap_setup_conn(LDAP **ldap_struct, const char *uri)
return rc;
}
 
-   if (lp_ldap_ref_follow() != Auto) {
+   if (lp_ldap_follow_referral() != Auto) {
rc = ldap_set_option(*ldap_struct, LDAP_OPT_REFERRALS,
-lp_ldap_ref_follow() ? LDAP_OPT_ON : LDAP_OPT_OFF);
+lp_ldap_follow_referral() ? LDAP_OPT_ON : LDAP_OPT_OFF);
if (rc != LDAP_SUCCESS)
DEBUG(0, (Failed to set LDAP_OPT_REFERRALS: %s\n,
ldap_err2string(rc)));
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index fa0577b..049b5e9 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -260,7 +260,7 @@ struct global {
char *szLdapGroupSuffix;
int ldap_ssl;
bool ldap_ssl_ads;
-   int ldap_ref_follow;
+   int ldap_follow_referral;
char *szLdapSuffix;
char *szLdapAdminDn;
int ldap_debug_level;
@@ -3672,10 +3672,10 @@ static struct parm_struct parm_table[] = {
.flags  = FLAG_ADVANCED,
},
{
-   .label  = ldap ref follow,
+   .label  = ldap follow referral,
.type   = P_ENUM,
.p_class= P_GLOBAL,
-   .ptr= Globals.ldap_ref_follow,
+   .ptr= Globals.ldap_follow_referral,
.special= NULL,
.enum_list  = enum_bool_auto,
.flags  = FLAG_ADVANCED,
@@ -5052,7 +5052,7 @@ static void init_globals(bool first_time_only)
Globals.ldap_passwd_sync = LDAP_PASSWD_SYNC_OFF;
Globals.ldap_delete_dn = False;
Globals.ldap_replication_sleep = 1000; /* wait 1 sec for replication */
-   Globals.ldap_ref_follow = Auto;
+   Globals.ldap_follow_referral = Auto;
Globals.ldap_timeout = LDAP_DEFAULT_TIMEOUT;
Globals.ldap_connection_timeout = LDAP_CONNECTION_DEFAULT_TIMEOUT;
Globals.ldap_page_size = LDAP_PAGE_SIZE;
@@ -5402,7 +5402,7 @@ FN_GLOBAL_STRING(lp_ldap_suffix, Globals.szLdapSuffix)
 FN_GLOBAL_STRING(lp_ldap_admin_dn, Globals.szLdapAdminDn)
 FN_GLOBAL_INTEGER(lp_ldap_ssl, Globals.ldap_ssl)
 FN_GLOBAL_BOOL(lp_ldap_ssl_ads, Globals.ldap_ssl_ads)
-FN_GLOBAL_INTEGER(lp_ldap_ref_follow, Globals.ldap_ref_follow)
+FN_GLOBAL_INTEGER(lp_ldap_follow_referral, Globals.ldap_follow_referral)
 FN_GLOBAL_INTEGER(lp_ldap_passwd_sync, 

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

2009-10-26 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  855430f... WHATSNEW: Update changes.
  from  7e08fa0... s3: Rename new parameter ldap ref follow to ldap 
follow referral.

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


- Log -
commit 855430fcb9a950faa711d586d9ef78abb9a698a7
Author: Karolin Seeger ksee...@samba.org
Date:   Mon Oct 26 12:16:31 2009 +0100

WHATSNEW: Update changes.

Karolin

---

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


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index dbf8e16..6f4b159 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -22,7 +22,7 @@ smb.conf changes
--  --- ---
 
create krb5 conf   New yes
-   ldap ref followNew auto
+   ldap follow referral   New auto
store create time  New no
 
 


-- 
Samba Shared Repository


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

2009-10-26 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  b3bb185... Second part of the fix for bug 6828 - infinite timeout 
occurs when byte lock held outside of samba. Fixes case where a connection with 
a pending lock can me marked idle, and ensures that the lock queue timeout is 
always recalculated. Jeremy.
  from  855430f... WHATSNEW: Update changes.

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


- Log -
commit b3bb18554d4e414fb960b8d043af464c8b4ac43a
Author: Jeremy Allison j...@samba.org
Date:   Mon Oct 26 21:20:22 2009 -0700

Second part of the fix for bug 6828 - infinite timeout occurs when byte 
lock held outside of samba.
Fixes case where a connection with a pending lock can me marked idle, and 
ensures
that the lock queue timeout is always recalculated.
Jeremy.

---

Summary of changes:
 source3/smbd/blocking.c |   15 +--
 1 files changed, 9 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c
index 01d9ca8..deb7f8f 100644
--- a/source3/smbd/blocking.c
+++ b/source3/smbd/blocking.c
@@ -652,7 +652,6 @@ void process_blocking_lock_queue(void)
 {
struct timeval tv_curr = timeval_current();
struct blocking_lock_record *blr, *next = NULL;
-   bool recalc_timeout = False;
 
/*
 * Go through the queue and see if we can get any of the locks.
@@ -670,6 +669,14 @@ void process_blocking_lock_queue(void)
 
DEBUG(10, (Processing BLR = %p\n, blr));
 
+   /* We use set_current_service so connections with
+* pending locks are not marked as idle.
+*/
+
+   set_current_service(blr-fsp-conn,
+   SVAL(blr-req-inbuf,smb_flg),
+   false);
+
if(blocking_lock_record_process(blr)) {
struct byte_range_lock *br_lck = brl_get_locks(
talloc_tos(), blr-fsp);
@@ -690,7 +697,6 @@ void process_blocking_lock_queue(void)
 
DLIST_REMOVE(blocking_lock_queue, blr);
TALLOC_FREE(blr);
-   recalc_timeout = True;
continue;
}
 
@@ -729,13 +735,10 @@ void process_blocking_lock_queue(void)

blocking_lock_reply_error(blr,NT_STATUS_FILE_LOCK_CONFLICT);
DLIST_REMOVE(blocking_lock_queue, blr);
TALLOC_FREE(blr);
-   recalc_timeout = True;
}
}
 
-   if (recalc_timeout) {
-   recalc_brl_timeout();
-   }
+   recalc_brl_timeout();
 }
 
 /


-- 
Samba Shared Repository


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

2009-10-25 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  2466798... tdb: detect tdb store of identical records and skip
  from  1f3ea87... tdb: rename 'struct list_struct' into 'struct tdb_record'

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


- Log -
commit 2466798cc4cb46e8689d43bae0403119266dbe9e
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Oct 23 22:45:03 2009 +1100

tdb: detect tdb store of identical records and skip

This can help with ldb where we rewrite the index records

---

Summary of changes:
 lib/tdb/common/tdb.c |   20 
 1 files changed, 20 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tdb/common/tdb.c b/lib/tdb/common/tdb.c
index 0389d3c..564c5fe 100644
--- a/lib/tdb/common/tdb.c
+++ b/lib/tdb/common/tdb.c
@@ -121,6 +121,7 @@ tdb_off_t tdb_find_lock_hash(struct tdb_context *tdb, 
TDB_DATA key, uint32_t has
return rec_ptr;
 }
 
+static TDB_DATA _tdb_fetch(struct tdb_context *tdb, TDB_DATA key);
 
 /* update an entry in place - this only works if the new data size
is = the old data size and the key exists.
@@ -135,6 +136,25 @@ static int tdb_update_hash(struct tdb_context *tdb, 
TDB_DATA key, uint32_t hash,
if (!(rec_ptr = tdb_find(tdb, key, hash, rec)))
return -1;
 
+   /* it could be an exact duplicate of what is there - this is
+* surprisingly common (eg. with a ldb re-index). */
+   if (rec.key_len == key.dsize  
+   rec.data_len == dbuf.dsize 
+   rec.full_hash == hash) {
+   TDB_DATA data = _tdb_fetch(tdb, key);
+   if (data.dsize == dbuf.dsize 
+   memcmp(data.dptr, dbuf.dptr, data.dsize) == 0) {
+   if (data.dptr) {
+   free(data.dptr);
+   }
+   return 0;
+   }
+   if (data.dptr) {
+   free(data.dptr);
+   }
+   }
+
+
/* must be long enough key, data and tailer */
if (rec.rec_len  key.dsize + dbuf.dsize + sizeof(tdb_off_t)) {
tdb-ecode = TDB_SUCCESS; /* Not really an error */


-- 
Samba Shared Repository


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

2009-10-23 Thread Bo Yang
The branch, v3-5-test has been updated
   via  b46f0a7... s3: Fix crash in pam_winbind, another reference to freed 
memory.
  from  2b02c97... Simplify the logic. Jeremy.

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


- Log -
commit b46f0a7bda7101517435ef612c68e81976d15102
Author: Bo Yang boy...@samba.org
Date:   Sat Oct 24 09:20:00 2009 +0800

s3: Fix crash in pam_winbind, another reference to freed memory.

Signed-off-by: Bo Yang boy...@samba.org
(cherry picked from commit b9a3f1dd85d168c15df846dba525f4f882d1acf8)

---

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


Changeset truncated at 500 lines:

diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index 0eb24a2..7694251 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -1788,7 +1788,7 @@ static int winbind_auth_request(struct pwb_context *ctx,
if (logon.blobs) {
wbcFreeMemory(logon.blobs);
}
-   if (info  info-blobs) {
+   if (info  info-blobs  !p_info) {
wbcFreeMemory(info-blobs);
}
if (error  !p_error) {
@@ -3141,10 +3141,14 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
free(username_ret);
}
 
-   wbcFreeMemory(info);
-   wbcFreeMemory(policy);
}
 
+   if (info  info-blobs) {
+   wbcFreeMemory(info-blobs);
+   }
+   wbcFreeMemory(info);
+   wbcFreeMemory(policy);
+
goto out;
}
} else {


-- 
Samba Shared Repository


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

2009-10-23 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  dcdec16... util: fixed place where we could look one byte past end 
of string
  from  b46f0a7... s3: Fix crash in pam_winbind, another reference to freed 
memory.

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


- Log -
commit dcdec1663c1bba90ebe59abed0d0f70772f0eb64
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Oct 22 11:03:27 2009 +1100

util: fixed place where we could look one byte past end of string

We need to check the length before the value

---

Summary of changes:
 lib/util/charset/util_unistr.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/charset/util_unistr.c b/lib/util/charset/util_unistr.c
index 024dc70..045aa4a 100644
--- a/lib/util/charset/util_unistr.c
+++ b/lib/util/charset/util_unistr.c
@@ -483,7 +483,7 @@ _PUBLIC_ char *strupper_talloc_n(TALLOC_CTX *ctx, const 
char *src, size_t n)
return NULL;
}
 
-   while (*src  n--) {
+   while (n--  *src) {
size_t c_size;
codepoint_t c = next_codepoint_convenience(iconv_convenience, 
src, c_size);
src += c_size;


-- 
Samba Shared Repository


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

2009-10-23 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  d8d28f7... s4-torture: fixed double free in libnet_group test
  from  dcdec16... util: fixed place where we could look one byte past end 
of string

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


- Log -
commit d8d28f74aabce7c02c25c2c1543ebea0355d68a8
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Oct 22 18:45:43 2009 +1100

s4-torture: fixed double free in libnet_group test

---

Summary of changes:
 source4/torture/libnet/libnet_group.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/libnet/libnet_group.c 
b/source4/torture/libnet/libnet_group.c
index c7fdfbd..a98ecd1 100644
--- a/source4/torture/libnet/libnet_group.c
+++ b/source4/torture/libnet/libnet_group.c
@@ -273,7 +273,6 @@ bool torture_groupinfo_api(struct torture_context *torture)
if (!NT_STATUS_IS_OK(status)) {
printf(libnet_GroupInfo call failed: %s\n, nt_errstr(status));
ret = false;
-   talloc_free(mem_ctx);
goto done;
}
 


-- 
Samba Shared Repository


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

2009-10-23 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  e692241... Fix bug 6802 - A created folder does not properly 
inherit permissions from parent.
  from  d8d28f7... s4-torture: fixed double free in libnet_group test

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


- Log -
commit e6922418846b7ffc42d8d6db4c5a08385dd365fe
Author: Barry Sabsevitz barry_sabsev...@hp.com
Date:   Fri Oct 23 11:50:29 2009 -0700

Fix bug 6802 - A created folder does not properly inherit permissions from 
parent.

---

Summary of changes:
 source3/modules/vfs_acl_common.c |   42 ++---
 1 files changed, 38 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index 39fd2ad..a12f105 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -279,7 +279,8 @@ static NTSTATUS get_nt_acl_internal(vfs_handle_struct 
*handle,
 */
 
 static struct security_descriptor *default_file_sd(TALLOC_CTX *mem_ctx,
-   SMB_STRUCT_STAT *psbuf)
+   SMB_STRUCT_STAT *psbuf,
+   bool force_inherit)
 {
struct dom_sid owner_sid, group_sid;
size_t sd_size;
@@ -294,10 +295,22 @@ static struct security_descriptor 
*default_file_sd(TALLOC_CTX *mem_ctx,
return NULL;
}
 
+   /* If force_inherit is set, this means we are initializing the ACEs for
+* a container and we want the ACEs for owner_sid and SYSTEM to be
+* inheritable by their children (See Bug #6802).
+*/
+
init_sec_ace(pace[0], owner_sid, SEC_ACE_TYPE_ACCESS_ALLOWED,
-   SEC_RIGHTS_FILE_ALL, 0);
+   SEC_RIGHTS_FILE_ALL, (force_inherit ?
+   (SEC_ACE_FLAG_OBJECT_INHERIT|
+   SEC_ACE_FLAG_CONTAINER_INHERIT) :
+   0));
+
init_sec_ace(pace[1], global_sid_System, SEC_ACE_TYPE_ACCESS_ALLOWED,
-   SEC_RIGHTS_FILE_ALL, 0);
+   SEC_RIGHTS_FILE_ALL, (force_inherit ?
+   (SEC_ACE_FLAG_OBJECT_INHERIT|
+   SEC_ACE_FLAG_CONTAINER_INHERIT) :
+   0));
 
pacl = make_sec_acl(mem_ctx,
NT4_ACL_REVISION,
@@ -332,6 +345,7 @@ static NTSTATUS inherit_new_acl(vfs_handle_struct *handle,
DATA_BLOB blob;
size_t size;
char *parent_name;
+   bool force_inherit = false;
uint8_t hash[XATTR_SD_HASH_SIZE];
 
if (!parent_dirname(ctx, smb_fname-base_name, parent_name, NULL)) {
@@ -400,7 +414,27 @@ static NTSTATUS inherit_new_acl(vfs_handle_struct *handle,
return status;
}
 
-   psd = default_file_sd(ctx, smb_fname-st);
+   /* If we get here, we could have the following possibilities:
+*  1. No ACLs exist on the parent container.
+*  2. ACLs exist on the parent container but they were
+*  not inheritable.
+*
+*  Check to see if case #1 occurred.
+*
+*/
+   if (container 
+   (parent_desc == NULL || parent_desc-dacl == NULL)) {
+
+   /* If no parent descriptor exists, then there were
+* no ACLs on the parent and then we must create
+* the ACLs on this newly created folder so that they
+* will be inherited by their children (See Bug #6802).
+*/
+
+   force_inherit = true;
+   }
+
+   psd = default_file_sd(ctx, smb_fname-st, force_inherit);
if (!psd) {
return NT_STATUS_NO_MEMORY;
}


-- 
Samba Shared Repository


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

2009-10-23 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  129cd3b... s3:Makefile: add some explicit dependencies to libc
  from  e692241... Fix bug 6802 - A created folder does not properly 
inherit permissions from parent.

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


- Log -
commit 129cd3b703f53f21102edbc480f03e2af7fe8a58
Author: Björn Jacke b...@sernet.de
Date:   Fri Oct 23 12:07:08 2009 -0700

s3:Makefile: add some explicit dependencies to libc

Add libc as explicit dependency where we use -z defs linker flags. This is
to silence the Sun linker. Otherwise it whines:

malloc  ... (symbol belongs to implicit dependency /lib/libc.so.1)

---

Summary of changes:
 source3/Makefile.in |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index af0f53a..35c8b82 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -45,11 +45,11 @@ CPPFLAGS=-DHAVE_CONFIG_H @CPPFLAGS@
 
 exee...@exeext@
 a...@ar@
-ldshfla...@ldshflags@ @RELRO_LDFLAGS@ @LDFLAGS@ @LDSHFLAGS_Z_DEFS@
+ldshfla...@ldshflags@ @RELRO_LDFLAGS@ @LDFLAGS@ -lc @LDSHFLAGS_Z_DEFS@
 ldpluginfla...@ldshflags@ @RELRO_LDFLAGS@ @LDFLAGS@ @LDSHFLAGS_Z_NODEFS@
 ldfla...@pie_ldflags@ @RELRO_LDFLAGS@ @LDFLAGS@
 
-winbind_nss_ldshfla...@winbind_nss_ldshflags@ @LDFLAGS@ @LDSHFLAGS_Z_DEFS@
+winbind_nss_ldshfla...@winbind_nss_ldshflags@ @LDFLAGS@ -lc @LDSHFLAGS_Z_DEFS@
 a...@awk@
 picfl...@picflag@
 dyne...@dynexp@


-- 
Samba Shared Repository


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

2009-10-23 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  1f3ea87... tdb: rename 'struct list_struct' into 'struct tdb_record'
   via  d94a4d4... lib/tdb: make tdbtool use tdb_check() for check command
   via  2e6f7df... lib/tdb: add tdb_check()
   via  12da055... lib/tdb: add -t (always use transactions) option to 
tdbtorture
   via  2b13c21... lib/tdb: wean off TDB_ERRCODE.
   via  9797336... lib/tdb: TDB_TRACE support (for developers)
  from  129cd3b... s3:Makefile: add some explicit dependencies to libc

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


- Log -
commit 1f3ea8778ae8ef7daccaf3f1950637d19c98
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Oct 23 13:51:03 2009 +0200

tdb: rename 'struct list_struct' into 'struct tdb_record'

metze

commit d94a4d44ea644c82925c5901af491a35f0ba611d
Author: Rusty Russell ru...@rustcorp.com.au
Date:   Thu Oct 22 00:11:34 2009 +1030

lib/tdb: make tdbtool use tdb_check() for check command

Also, set logging function so we get more informative messages.

Signed-off-by: Rusty Russell ru...@rustcorp.com.au

commit 2e6f7dfa793e0a5c46397dc18f65974c77a73b23
Author: Rusty Russell ru...@rustcorp.com.au
Date:   Thu Oct 22 00:10:34 2009 +1030

lib/tdb: add tdb_check()

ctdb wants a quick way to detect corrupt tdbs; particularly, tdbs with
loops in their hash chains.  tdb_check() provides this.

Signed-off-by: Rusty Russell ru...@rustcorp.com.au

commit 12da0557bc3346972d65eaf05a0c80ce0884c4e0
Author: Rusty Russell ru...@rustcorp.com.au
Date:   Thu Oct 22 00:10:54 2009 +1030

lib/tdb: add -t (always use transactions) option to tdbtorture

This means you can kill it at any time and expect no corruption.

Signed-off-by: Rusty Russell ru...@rustcorp.com.au

commit 2b13c2108f8b746dbe866fc14dd5e6045b0d12ea
Author: Rusty Russell ru...@rustcorp.com.au
Date:   Thu Oct 22 00:09:43 2009 +1030

lib/tdb: wean off TDB_ERRCODE.

It was a regrettable hack which I used to reduce line count in tdb; in fact 
it caused confusion as can be seen in this patch.
In particular, ecode now needs to be set before TDB_LOG anyway, and having 
it exposed in
the header is useless (the struct tdb_context isn't defined, so it's doubly 
useless).
Also, we should never set errno, as io.c was doing.

Signed-off-by: Rusty Russell ru...@rustcorp.com.au

commit 97973362b405e365b9249d95da02ebf3465bb4e1
Author: Rusty Russell ru...@rustcorp.com.au
Date:   Tue Oct 20 12:19:41 2009 +1030

lib/tdb: TDB_TRACE support (for developers)

When TDB_TRACE is defined (in tdb_private.h), verbose tracing of tdb 
operations is enabled.
This can be replayed using replay_trace from 
http://ccan.ozlabs.org/info/tdb.

The majority of this patch comes from moving internal functions to 
_funcname to
avoid double-tracing.  There should be no additional overhead for the 
normal (!TDB_TRACE)
case.

Note that the verbose traces compress really well with rzip.

Signed-off-by: Rusty Russell ru...@rustcorp.com.au

---

Summary of changes:
 lib/tdb/common/check.c |  422 
 lib/tdb/common/dump.c  |4 +-
 lib/tdb/common/freelist.c  |   23 ++-
 lib/tdb/common/freelistcheck.c |8 +-
 lib/tdb/common/io.c|   43 +++--
 lib/tdb/common/lock.c  |   64 +--
 lib/tdb/common/open.c  |   37 +++-
 lib/tdb/common/tdb.c   |  271 ++
 lib/tdb/common/tdb_private.h   |   54 +-
 lib/tdb/common/transaction.c   |   70 ---
 lib/tdb/common/traverse.c  |   34 +++-
 lib/tdb/config.mk  |2 +-
 lib/tdb/configure.ac   |2 +-
 lib/tdb/docs/README|   11 +
 lib/tdb/docs/tracing.txt   |   46 +
 lib/tdb/include/tdb.h  |5 +-
 lib/tdb/libtdb.m4  |2 +-
 lib/tdb/tdb.exports|1 +
 lib/tdb/tdb.signatures |1 +
 lib/tdb/tools/tdbtool.c|   44 +++--
 lib/tdb/tools/tdbtorture.c |   41 +++--
 source4/min_versions.m4|2 +-
 22 files changed, 1012 insertions(+), 175 deletions(-)
 create mode 100644 lib/tdb/common/check.c
 create mode 100644 lib/tdb/docs/tracing.txt


Changeset truncated at 500 lines:

diff --git a/lib/tdb/common/check.c b/lib/tdb/common/check.c
new file mode 100644
index 000..4924734
--- /dev/null
+++ b/lib/tdb/common/check.c
@@ -0,0 +1,422 @@
+ /*
+   Unix SMB/CIFS implementation.
+
+   trivial database library
+
+   Copyright (C) Rusty Russell2009
+
+ ** NOTE! The following LGPL license applies to the tdb
+ ** 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 

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

2009-10-22 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  322f076... Fix bug 6829 - smbclient does not show special 
characters properly. All successful calls to cli_session_setup() *must* be 
followed by calls to cli_init_creds() to stash the credentials we successfully 
connected with. There were 2 codepaths where this was missing. This caused 
smbclient to be unable to open the \srvsvc pipe to do an RPC netserverenum, and 
cause it to fall back to a RAP netserverenum, which uses DOS codepage 
conversion rather than the full UCS2 of RPC, so the returned characters were 
not correct (unless the DOS codepage was set correctly). Phew. That was fun to 
track down :-). Jeremy.
   via  44b0dce... s4-torture: catch bad command line options
   via  3e447ed... s4-torture: fixed a pipe leak
   via  9f68deb... s4-torture: fixed a fd/mem leak in the RPC-LSA-SECRETS 
test
  from  b2b8363... s4-lsa: Fix dcesrv_lsa_EnumTrustDom() and avoid infite 
windows client loop.

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


- Log -
commit 322f0769b7a0cad2f5ee9be1b89676c2461d681b
Author: Jeremy Allison j...@samba.org
Date:   Thu Oct 22 15:06:38 2009 -0700

Fix bug 6829 - smbclient does not show special characters properly.
All successful calls to cli_session_setup() *must* be followed by
calls to cli_init_creds() to stash the credentials we successfully
connected with. There were 2 codepaths where this was missing. This
caused smbclient to be unable to open the \srvsvc pipe to do an RPC
netserverenum, and cause it to fall back to a RAP netserverenum,
which uses DOS codepage conversion rather than the full UCS2 of
RPC, so the returned characters were not correct (unless the DOS
codepage was set correctly). Phew. That was fun to track down :-).
Jeremy.

commit 44b0dcefb70cd8ffd18f6513c655c137fdd1985e
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Oct 15 18:27:57 2009 +1100

s4-torture: catch bad command line options

It is annoying when you mistype a command line option and aren't told.

commit 3e447ed62138fff14493a76a95a7fd2755e467f0
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Oct 20 16:34:42 2009 +1100

s4-torture: fixed a pipe leak

The RPC-SAMR-PASSWORDS* tests could leak RPC pipes, causing an
overallocation of fd's on the server

commit 9f68deb48c7264c89f7f235306ef0f14dcfc6865
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Oct 20 14:27:57 2009 +1100

s4-torture: fixed a fd/mem leak in the RPC-LSA-SECRETS test

This test left a large number of lsa pipes open, which could trigger
the server running out of fds

---

Summary of changes:
 source3/libsmb/clidfs.c   |9 +
 source3/libsmb/libsmb_server.c|   11 +++
 source4/torture/rpc/samr.c|2 ++
 source4/torture/rpc/session_key.c |   19 ---
 source4/torture/smbtorture.c  |3 +++
 5 files changed, 37 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index 5e944f1..53dc6d7 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -216,6 +216,15 @@ static struct cli_state *do_connect(TALLOC_CTX *ctx,
return NULL;
}
d_printf(Anonymous login successful\n);
+   status = cli_init_creds(c, , lp_workgroup(), );
+   } else {
+   status = cli_init_creds(c, username, lp_workgroup(), password);
+   }
+
+   if (!NT_STATUS_IS_OK(status)) {
+   DEBUG(10,(cli_init_creds() failed: %s\n, nt_errstr(status)));
+   cli_shutdown(c);
+   return NULL;
}
 
if ( show_sessetup ) {
diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c
index 60849c8..18b12a1 100644
--- a/source3/libsmb/libsmb_server.c
+++ b/source3/libsmb/libsmb_server.c
@@ -498,6 +498,17 @@ again:
 errno = EPERM;
 return NULL;
 }
+   status = cli_init_creds(c, username_used,
+   *pp_workgroup, *pp_password);
+   } else {
+   status = cli_init_creds(c, username_used,
+   *pp_workgroup, *pp_password);
+   }
+
+   if (!NT_STATUS_IS_OK(status)) {
+   errno = map_errno_from_nt_status(status);
+   cli_shutdown(c);
+   return NULL;
}
 
DEBUG(4,( session setup ok\n));
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index b3bc5cf..eb3c86e 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -3275,6 +3275,8 @@ static bool test_SetPassword_pwdlastset(struct 
dcerpc_pipe *p,
 #undef TEST_SET_LEVELS
 #undef TEST_QUERY_LEVELS
 
+   

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

2009-10-22 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  2b02c97... Simplify the logic. Jeremy.
  from  322f076... Fix bug 6829 - smbclient does not show special 
characters properly. All successful calls to cli_session_setup() *must* be 
followed by calls to cli_init_creds() to stash the credentials we successfully 
connected with. There were 2 codepaths where this was missing. This caused 
smbclient to be unable to open the \srvsvc pipe to do an RPC netserverenum, and 
cause it to fall back to a RAP netserverenum, which uses DOS codepage 
conversion rather than the full UCS2 of RPC, so the returned characters were 
not correct (unless the DOS codepage was set correctly). Phew. That was fun to 
track down :-). Jeremy.

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


- Log -
commit 2b02c9786fc96277bc18bb088c202d3a71df8868
Author: Jeremy Allison j...@samba.org
Date:   Thu Oct 22 15:26:22 2009 -0700

Simplify the logic.
Jeremy.

---

Summary of changes:
 source3/libsmb/libsmb_server.c |7 ++-
 1 files changed, 2 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c
index 18b12a1..50ecee2 100644
--- a/source3/libsmb/libsmb_server.c
+++ b/source3/libsmb/libsmb_server.c
@@ -498,13 +498,10 @@ again:
 errno = EPERM;
 return NULL;
 }
-   status = cli_init_creds(c, username_used,
-   *pp_workgroup, *pp_password);
-   } else {
-   status = cli_init_creds(c, username_used,
-   *pp_workgroup, *pp_password);
}
 
+   status = cli_init_creds(c, username_used,
+   *pp_workgroup, *pp_password);
if (!NT_STATUS_IS_OK(status)) {
errno = map_errno_from_nt_status(status);
cli_shutdown(c);


-- 
Samba Shared Repository


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

2009-10-20 Thread Björn Jacke
The branch, v3-5-test has been updated
   via  4d5f14b... s3:configure: add support for Solaris' ld -z ignore
   via  7aaec4f... s3: make unresolved symbols in libs throw errors
   via  78e8d76... s3: allow using different LDFLAGS for internal 
libs/plugins
  from  13ff1f6... s4-dsdb: fixed empty structure error on solaris8

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


- Log -
commit 4d5f14bfd3c5de9887145caa53c3f08a7fe75a1b
Author: Björn Jacke b...@sernet.de
Date:   Tue Oct 20 08:01:52 2009 +0200

s3:configure: add support for Solaris' ld -z ignore

try linker flags for ignoring unused libs in this order:
-Wl,--as-needed (gcc like + binutils)
-Wl,-z,ignore (gcc like + Solaris linker)
-z ignore (old Sun C)

commit 7aaec4fe68ce23b0b5880badac378f5ca4386389
Author: Björn Jacke b...@sernet.de
Date:   Tue Oct 20 01:13:56 2009 +0200

s3: make unresolved symbols in libs throw errors

except for the Samba internal plugins unresolved symbol references should 
not
show up in shared libraries. For historical reasons it's the default 
behaviour
of linkers to ignore those in shared libs. We use -z defs (alias
--no-undefined) to not ignore them in shared libs.

commit 78e8d767877621fc34de9c7bb96837f82e80e358
Author: Björn Jacke b...@sernet.de
Date:   Sun Oct 18 22:51:06 2009 +0200

s3: allow using different LDFLAGS for internal libs/plugins

internal libs have unresolved symbols intentionally.
Thanks to Buchan Milne for suggestion and patch. This addresses #6792.

---

Summary of changes:
 source3/Makefile.in  |  156 ++
 source3/configure.in |   48 +++-
 2 files changed, 116 insertions(+), 88 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 4dbc8cd..6ce4769 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -45,10 +45,11 @@ CPPFLAGS=-DHAVE_CONFIG_H @CPPFLAGS@
 
 exee...@exeext@
 a...@ar@
-ldshfla...@ldshflags@ @RELRO_LDFLAGS@ @LDFLAGS@
+ldshfla...@ldshflags@ @RELRO_LDFLAGS@ @LDFLAGS@ @LDSHFLAGS_Z_DEFS@
+ldpluginfla...@ldshflags@ @RELRO_LDFLAGS@ @LDFLAGS@ @LDSHFLAGS_Z_NODEFS@
 ldfla...@pie_ldflags@ @RELRO_LDFLAGS@ @LDFLAGS@
 
-winbind_nss_ldshfla...@winbind_nss_ldshflags@ @LDFLAGS@
+winbind_nss_ldshfla...@winbind_nss_ldshflags@ @LDFLAGS@ @LDSHFLAGS_Z_DEFS@
 a...@awk@
 picfl...@picflag@
 dyne...@dynexp@
@@ -2431,9 +2432,12 @@ bin/libbigballofm...@shlibext@: $(BINARY_PREREQS) 
$(LIBBIGBALLOFMUD_OBJ) $(LIBTA
 #
 #
 
-# Linker command to link a RPC, VFS, AUTH, CHARSET or PASSDB module.
+# Linker command to link our shared libraries:
 SHLD_MODULE = $(SHLD) $(LDSHFLAGS) $(MODULE_EXPORTS) \
  -o $@ @sonamef...@`basename $...@`
+# Linker command to link samba internal plugin modules:
+SHLD_PLUGIN = $(SHLD) $(LDPLUGINFLAGS) $(MODULE_EXPORTS) \
+   -o $@ @sonamef...@`basename $...@`
 
 bin/librpc_lsar...@shlibext@: $(BINARY_PREREQS) $(RPC_LSA_OBJ)
@echo Linking $@
@@ -2526,292 +2530,296 @@ bin/pam_winbi...@shlibext@: $(BINARY_PREREQS) 
$(PAM_WINBIND_OBJ) $(LIBTALLOC) $(
@$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_OBJ) -lpam @INIPARSERLIBS@ \
$(PAM_WINBIND_EXTRA_LIBS) $(LIBTALLOC_LIBS) $(LIBWBCLIENT_LIBS) 
@sonamef...@`basename $...@`
 
+##
+# Plugins:
+##
+
 bin/built...@shlibext@: $(BINARY_PREREQS) $(AUTH_BUILTIN_OBJ)
@echo Building plugin $@
-   @$(SHLD_MODULE) $(AUTH_BUILTIN_OBJ)
+   @$(SHLD_PLUGIN) $(AUTH_BUILTIN_OBJ)
 
 bin/doma...@shlibext@: $(BINARY_PREREQS) $(AUTH_DOMAIN_OBJ)
@echo Building plugin $@
-   @$(SHLD_MODULE) $(AUTH_DOMAIN_OBJ)
+   @$(SHLD_PLUGIN) $(AUTH_DOMAIN_OBJ)
 
 bin/scri...@shlibext@: $(BINARY_PREREQS) $(AUTH_SCRIPT_OBJ)
@echo Building plugin $@
-   @$(SHLD_MODULE) $(AUTH_SCRIPT_OBJ)
+   @$(SHLD_PLUGIN) $(AUTH_SCRIPT_OBJ)
 
 bin/netlogo...@shlibext@: $(BINARY_PREREQS) $(AUTH_NETLOGOND_OBJ)
@echo Building plugin $@
-   @$(SHLD_MODULE) $(AUTH_NETLOGOND_OBJ)
+   @$(SHLD_PLUGIN) $(AUTH_NETLOGOND_OBJ)
 
 bin/smbserv...@shlibext@: $(BINARY_PREREQS) $(AUTH_SERVER_OBJ)
@echo Building plugin $@
-   @$(SHLD_MODULE) $(AUTH_SERVER_OBJ)
+   @$(SHLD_PLUGIN) $(AUTH_SERVER_OBJ)
 
 bin/winbi...@shlibext@: $(BINARY_PREREQS) $(AUTH_WINBIND_OBJ)
@echo Building plugin $@
-   @$(SHLD_MODULE) $(AUTH_WINBIND_OBJ)
+   @$(SHLD_PLUGIN) $(AUTH_WINBIND_OBJ)
 
 bin/w...@shlibext@: $(BINARY_PREREQS) $(AUTH_WBC_OBJ)
@echo Building plugin $@
-   @$(SHLD_MODULE) $(AUTH_WBC_OBJ)
+   @$(SHLD_PLUGIN) $(AUTH_WBC_OBJ)
 
 bin/un...@shlibext@: $(BINARY_PREREQS) $(AUTH_UNIX_OBJ)
@echo Building plugin $@
-   @$(SHLD_MODULE) $(AUTH_UNIX_OBJ)

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

2009-10-20 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  6972bf2... s4-smbtorture: Make it simpler to specify number of 
trusted domains to create in RPC-LSA-TRUSTED-DOMAINS.
   via  23d93c7... s3-lsa: Fix _lsa_EnumTrustDom().
   via  157f377... s3-pdb_ldap: fix crash bug in 
ldapsam_set_trusteddom_pw().
   via  db628ea... s3-lsa: Fix _lsa_CreateAccount() for usage of 
SEC_FLAG_MAXIMUM_ALLOWED.
   via  74c50fb... s3-selftest: enable RPC-LSA-PRIVILEGES against Samba 3.
   via  1c34c07... s4-smbtorture: Fix wrong comment in 
RPC-LSA-TRUSTED-DOMAIN test.
   via  42b21db... s4-smbtorture: split out EnumTrustedDomainsEx test in 
RPC-LSA-TRUSTED-DOMAINS.
   via  f22f21c... s3-lsa: Allow to lookup 'NT AUTHORITY\Anonymous Logon' 
as well.
   via  f59b0c9... s3-lsa: allow to lookup BUILTIN\ in lsa_LookupNames.
   via  6e954e8... s3-lsa: When looking up domains in LookupNames, do not 
strip the sid.
   via  2d09c8f... s3-lsa: allow to have NULL strings in lsa LookupName 
queries.
   via  0bf4f0b... s4-smbtorture: add stricter tests for LSA-LOOKUPNAMES 
replies.
   via  ae0ae7b... s4-smbtorture: move all LookupNames tests into 
RPC-LSA-LOOKUPNAMES.
   via  a63fb15... wbinfo: use wbcLookupDomainControllerEx for wbinfo 
--dsgetdcname.
   via  f5a5c26... libwbclient: fix wbcLookupDomainController().
   via  95aab55... s4-smbtorture: test wbcLookupDomainController{Ex} in 
WINBIND-WBCLIENT.
   via  e01b09b... gitignore: remove old netlogon prototypes.
  from  4d5f14b... s3:configure: add support for Solaris' ld -z ignore

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


- Log -
commit 6972bf282c752581257119a847e821090c5b80de
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 20 18:34:09 2009 +0200

s4-smbtorture: Make it simpler to specify number of trusted domains to 
create in
RPC-LSA-TRUSTED-DOMAINS.

Guenther
(cherry picked from commit 9ee5d8466513a957128fcf511529fcd76fa3f05b)

commit 23d93c7e34a2de576c0233dfdb2119087fc34645
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 20 18:35:49 2009 +0200

s3-lsa: Fix _lsa_EnumTrustDom().

Windows clients were showing a lot of duplicates in their list of trusted
domains.

Found by RPC-LSA-TRUSTED-DOMAIN torture test.

Guenther
(cherry picked from commit 49a13234957ad241e6457bbf0edc15875321f03f)

commit 157f377eba415b97edc23657ba4db305d9e16cc3
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 20 18:35:16 2009 +0200

s3-pdb_ldap: fix crash bug in ldapsam_set_trusteddom_pw().

Thanks Volker for the hint.

Guenther
(cherry picked from commit d168d7fe3c7ec4b90cd526c4ea02e972ffac7835)

commit db628ea5dcd44e721ab55fe69ab99012548b6ac5
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 20 15:54:40 2009 +0200

s3-lsa: Fix _lsa_CreateAccount() for usage of SEC_FLAG_MAXIMUM_ALLOWED.

Found by RPC-LSA-PRIVILEGES torture test.

Guenther
(cherry picked from commit a5a7b9ebc220b6477c987fe5552561c41e9d1b85)

commit 74c50fbd70d85a5cf124866d4095cff54debd10a
Author: Günther Deschner g...@samba.org
Date:   Thu Jul 16 18:46:10 2009 +0200

s3-selftest: enable RPC-LSA-PRIVILEGES against Samba 3.

Guenther
(cherry picked from commit 870f2d336a57f16ed5f1018ced6fa4ef5d61539c)

commit 1c34c07a843e64eb00715f75de911ff2c10619f7
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 20 15:09:32 2009 +0200

s4-smbtorture: Fix wrong comment in RPC-LSA-TRUSTED-DOMAIN test.

Guenther
(cherry picked from commit 7e180101d3a460d30da7b5043034ef306913b2d1)

commit 42b21db724de27f27ec039064a467dfe6311c5c3
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 20 12:59:49 2009 +0200

s4-smbtorture: split out EnumTrustedDomainsEx test in 
RPC-LSA-TRUSTED-DOMAINS.

Guenther
(cherry picked from commit bf2746b537484a51b55a3000e4c34d08bd5aff7a)

commit f22f21cea39e90ddf08edd3bd12c127aa176a271
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 20 15:15:06 2009 +0200

s3-lsa: Allow to lookup 'NT AUTHORITY\Anonymous Logon' as well.

This is to finally pass RPC-LSA-LOOKUPNAMES test.

Guenther
(cherry picked from commit c7023c5a3dc1644e9b8ae667f7f9d6d1dfe49bb1)

commit f59b0c9d38e2e64ed880015e3250bdd519c34afe
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 20 15:13:56 2009 +0200

s3-lsa: allow to lookup BUILTIN\ in lsa_LookupNames.

Found by RPC-LSA-LOOKUPNAMES torture test.

Guenther
(cherry picked from commit 1f4d26c4870989c5a0aba773c97172f0c0185aba)

commit 6e954e87bd6af7e3c3cf8802edfd9808226691ea
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 20 15:12:58 2009 +0200

s3-lsa: When looking up domains in LookupNames, do not strip the sid.

Found by RPC-LSA-LOOKUPNAMES torture test.

Guenther
(cherry picked from 

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

2009-10-20 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  7034ef4... Fix the pam_smbpass.so build with the recent linker flag 
changes. Jeremy.
  from  6972bf2... s4-smbtorture: Make it simpler to specify number of 
trusted domains to create in RPC-LSA-TRUSTED-DOMAINS.

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


- Log -
commit 7034ef40040a940bf31266263067f4c3bb85f02a
Author: Jeremy Allison j...@samba.org
Date:   Tue Oct 20 13:09:42 2009 -0700

Fix the pam_smbpass.so build with the recent linker flag changes.
Jeremy.

---

Summary of changes:
 source3/Makefile.in |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 6ce4769..cce6e7c 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1124,10 +1124,10 @@ WINBIND_WINS_NSS_OBJ = ../nsswitch/wins.o $(PARAM_OBJ) \
$(LIBNDR_GEN_OBJ0) $(LDB_OBJ)
 
 PAM_SMBPASS_OBJ_0 = pam_smbpass/pam_smb_auth.o pam_smbpass/pam_smb_passwd.o \
-   pam_smbpass/pam_smb_acct.o pam_smbpass/support.o
+   pam_smbpass/pam_smb_acct.o pam_smbpass/support.o 
../lib/util/asn1.o
 PAM_SMBPASS_OBJ = $(PAM_SMBPASS_OBJ_0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) 
$(PASSDB_OBJ) $(GROUPDB_OBJ) \
$(SMBLDAP_OBJ) $(LIBSAMBA_OBJ) \
-   $(LDB_OBJ)
+   $(LDB_OBJ) $(LIBTSOCKET_OBJ)
 
 IDMAP_OBJ = winbindd/idmap.o winbindd/idmap_util.o @IDMAP_STATIC@
 


-- 
Samba Shared Repository


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

2009-10-20 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  20d9592... Remove pythonmods from the build in source3, it doesn't 
build anyway and isn't needed (as far as I can tell). Jeremy.
  from  7034ef4... Fix the pam_smbpass.so build with the recent linker flag 
changes. Jeremy.

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


- Log -
commit 20d95929295a7cb16a49b0e172856eca7b5ea3b5
Author: Jeremy Allison j...@samba.org
Date:   Tue Oct 20 13:28:05 2009 -0700

Remove pythonmods from the build in source3, it doesn't build anyway
and isn't needed (as far as I can tell).
Jeremy.

---

Summary of changes:
 source3/samba4.mk |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/samba4.mk b/source3/samba4.mk
index c988012..7e8687d 100644
--- a/source3/samba4.mk
+++ b/source3/samba4.mk
@@ -167,7 +167,7 @@ modules:: $(PLUGINS)
 
 pythonmods:: $(PYTHON_PYS) $(PYTHON_SO)
 
-all:: bin/samba4 bin/regpatch4 bin/regdiff4 bin/regshell4 bin/regtree4 
bin/smbclient4 pythonmods setup plugins
+all:: bin/samba4 bin/regpatch4 bin/regdiff4 bin/regshell4 bin/regtree4 
bin/smbclient4 setup plugins
 torture:: bin/smbtorture4
 everything:: $(patsubst %,%4,$(BINARIES))
 setup:


-- 
Samba Shared Repository


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

2009-10-20 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  9c7e31b... Fix make install by removing all references to python. 
Not currently needed in source3, and isn't working anyway. Jeremy.
  from  20d9592... Remove pythonmods from the build in source3, it doesn't 
build anyway and isn't needed (as far as I can tell). Jeremy.

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


- Log -
commit 9c7e31b64ca0564825d24c382cd9ac5f1d90ffdc
Author: Jeremy Allison j...@samba.org
Date:   Tue Oct 20 13:42:28 2009 -0700

Fix make install by removing all references to python. Not currently
needed in source3, and isn't working anyway.
Jeremy.

---

Summary of changes:
 source3/samba4.mk |   11 +--
 1 files changed, 9 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/samba4.mk b/source3/samba4.mk
index 7e8687d..1ad46f2 100644
--- a/source3/samba4.mk
+++ b/source3/samba4.mk
@@ -124,7 +124,7 @@ tallocsrcdir := $(samba4srcdir)/../lib/talloc
 comsrcdir := $(samba4srcdir)/lib/com
 override ASN1C = bin/asn1_compile4
 override ET_COMPILER = bin/compile_et4
-include $(samba4srcdir)/build/make/python.mk
+#include $(samba4srcdir)/build/make/python.mk
 include samba4-data.mk
 include $(samba4srcdir)/static_deps.mk
 
@@ -165,10 +165,17 @@ clean::
 proto:: $(PROTO_HEADERS)
 modules:: $(PLUGINS)
 
-pythonmods:: $(PYTHON_PYS) $(PYTHON_SO)
+#pythonmods:: $(PYTHON_PYS) $(PYTHON_SO)
 
 all:: bin/samba4 bin/regpatch4 bin/regdiff4 bin/regshell4 bin/regtree4 
bin/smbclient4 setup plugins
 torture:: bin/smbtorture4
+
+#
+## This is a fake rule to stop any python being invoked as currently the
+## build system is broken in source3 with python. JRA.
+#
+installpython:: bin/smbtorture4
+
 everything:: $(patsubst %,%4,$(BINARIES))
 setup:
@ln -sf ../source4/setup setup


-- 
Samba Shared Repository


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

2009-10-20 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  a016f4d... Add local (or NFS) lock test to smbtorture. Checks that 
local locks conflict with CIFS locks (see bug 6868). Jeremy.
  from  9c7e31b... Fix make install by removing all references to python. 
Not currently needed in source3, and isn't working anyway. Jeremy.

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


- Log -
commit a016f4ddc8e7e4d209f4c13cbfb444c92d3245db
Author: Jeremy Allison j...@samba.org
Date:   Tue Oct 20 17:37:43 2009 -0700

Add local (or NFS) lock test to smbtorture. Checks that local locks
conflict with CIFS locks (see bug 6868).
Jeremy.

---

Summary of changes:
 source3/torture/torture.c |  210 -
 1 files changed, 209 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index e9d03ea..7b92bea 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -40,6 +40,7 @@ static bool use_kerberos;
 static fstring multishare_conn_fname;
 static bool use_multishare_conn = False;
 static bool do_encrypt;
+static const char *local_path = NULL;
 
 bool torture_showall = False;
 
@@ -2176,6 +2177,209 @@ fail:
 }
 
 /*
+ * This test is designed to be run in conjunction with
+ * external NFS or POSIX locks taken in the filesystem.
+ * It will block until the lock is taken (and is designed
+ * to do so). Check out scripts/tests/test_nfslock_s3.sh.
+ * JRA.
+ */
+
+static bool got_alarm;
+static int alarm_fd;
+
+static void alarm_handler(int dummy)
+{
+got_alarm = True;
+}
+
+static void alarm_handler_parent(int dummy)
+{
+   close(alarm_fd);
+}
+
+static void do_local_lock(int read_fd, int write_fd)
+{
+   int fd;
+   char c = '\0';
+   struct flock lock;
+   const char *local_pathname = NULL;
+   int ret;
+
+   local_pathname = talloc_asprintf(talloc_tos(),
+   %s/lockt9.lck, local_path);
+   if (!local_pathname) {
+   printf(child: alloc fail\n);
+   exit(1);
+   }
+
+   unlink(local_pathname);
+   fd = open(local_pathname, O_RDWR|O_CREAT, 0666);
+   if (fd == -1) {
+   printf(child: open of %s failed %s.\n,
+   local_pathname, strerror(errno));
+   exit(1);
+   }
+
+   /* Now take a fcntl lock. */
+   lock.l_type = F_WRLCK;
+   lock.l_whence = SEEK_SET;
+   lock.l_start = 0;
+   lock.l_len = 4;
+   lock.l_pid = getpid();
+
+   ret = fcntl(fd,F_SETLK,lock);
+   if (ret == -1) {
+   printf(child: failed to get lock 0:4 on file %s. Error %s\n,
+   local_pathname, strerror(errno));
+   exit(1);
+   } else {
+   printf(child: got lock 0:4 on file %s.\n,
+   local_pathname );
+   fflush(stdout);
+   }
+
+   CatchSignal(SIGALRM, alarm_handler);
+   alarm(5);
+   /* Signal the parent. */
+   if (write(write_fd, c, 1) != 1) {
+   printf(child: start signal fail %s.\n,
+   strerror(errno));
+   exit(1);
+   }
+   alarm(0);
+
+   alarm(10);
+   /* Wait for the parent to be ready. */
+   if (read(read_fd, c, 1) != 1) {
+   printf(child: reply signal fail %s.\n,
+   strerror(errno));
+   exit(1);
+   }
+   alarm(0);
+
+   sleep(5);
+   close(fd);
+   printf(child: released lock 0:4 on file %s.\n,
+   local_pathname );
+   fflush(stdout);
+   exit(0);
+}
+
+static bool run_locktest9(int dummy)
+{
+   struct cli_state *cli1;
+   const char *fname = \\lockt9.lck;
+   uint16_t fnum;
+   bool correct = False;
+   int pipe_in[2], pipe_out[2];
+   pid_t child_pid;
+   char c = '\0';
+   int ret;
+   double seconds;
+   NTSTATUS status;
+
+   printf(starting locktest9\n);
+
+   if (local_path == NULL) {
+   d_fprintf(stderr, locktest9 must be given a local path via -l 
localpath\n);
+   return false;
+   }
+
+   if (pipe(pipe_in) == -1 || pipe(pipe_out) == -1) {
+   return false;
+   }
+
+   child_pid = fork();
+   if (child_pid == -1) {
+   return false;
+   }
+
+   if (child_pid == 0) {
+   /* Child. */
+   do_local_lock(pipe_out[0], pipe_in[1]);
+   exit(0);
+   }
+
+   close(pipe_out[0]);
+   close(pipe_in[1]);
+   pipe_out[0] = -1;
+   pipe_in[1] = -1;
+
+   /* Parent. */
+   ret = read(pipe_in[0], c, 1);
+   if (ret != 1) {
+   d_fprintf(stderr, failed to read start signal from child. 
%s\n,
+   

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

2009-10-20 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  8db60c4... Fix comments on new test. Jeremy
  from  a016f4d... Add local (or NFS) lock test to smbtorture. Checks that 
local locks conflict with CIFS locks (see bug 6868). Jeremy.

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


- Log -
commit 8db60c4a9bbcc5512091396dee49a7efa13d904f
Author: Jeremy Allison j...@samba.org
Date:   Tue Oct 20 17:41:27 2009 -0700

Fix comments on new test.
Jeremy

---

Summary of changes:
 source3/torture/torture.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 7b92bea..ca499a9 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -2,6 +2,7 @@
Unix SMB/CIFS implementation.
SMB torture tester
Copyright (C) Andrew Tridgell 1997-1998
+   Copyright (C) Jeremy Allison 2009
 
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
@@ -2179,9 +2180,8 @@ fail:
 /*
  * This test is designed to be run in conjunction with
  * external NFS or POSIX locks taken in the filesystem.
- * It will block until the lock is taken (and is designed
- * to do so). Check out scripts/tests/test_nfslock_s3.sh.
- * JRA.
+ * It checks that the smbd server will block until the
+ * lock is released and then acquire it. JRA.
  */
 
 static bool got_alarm;


-- 
Samba Shared Repository


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

2009-10-20 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  df0430e... Turn on LOCK9 test which will test for regressions in 
bug 6828. Jeremy.
   via  573c2cc... Fix bug 6828 - infinite timeout occurs when byte lock 
held outside of samba Jeremy.
  from  8db60c4... Fix comments on new test. Jeremy

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


- Log -
commit df0430e1c3753d4adbcbbdc717bab466c3a934ff
Author: Jeremy Allison j...@samba.org
Date:   Tue Oct 20 17:53:06 2009 -0700

Turn on LOCK9 test which will test for regressions in bug 6828.
Jeremy.

commit 573c2cc5c54ea3d46ac729c3e0e5a8eb6b6799ea
Author: Jeremy Allison j...@samba.org
Date:   Tue Oct 20 17:52:34 2009 -0700

Fix bug 6828 - infinite timeout occurs when byte lock held outside of samba
Jeremy.

---

Summary of changes:
 source3/script/tests/selftest.sh   |2 ++
 source3/script/tests/test_smbtorture_s3.sh |4 ++--
 source3/smbd/blocking.c|   26 ++
 3 files changed, 22 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/selftest.sh b/source3/script/tests/selftest.sh
index 43e7bf1..73d0aa4 100755
--- a/source3/script/tests/selftest.sh
+++ b/source3/script/tests/selftest.sh
@@ -89,6 +89,7 @@ NSS_WRAPPER_PASSWD=$PRIVATEDIR/passwd
 NSS_WRAPPER_GROUP=$PRIVATEDIR/group
 WINBINDD_SOCKET_DIR=$PREFIX_ABS/winbindd
 WINBINDD_PRIV_PIPE_DIR=$LOCKDIR/winbindd_privileged
+TEST_DIRECTORY=$DIRECTORY
 
 export PREFIX PREFIX_ABS
 export CONFIGURATION CONFFILE SAMBA4CONFIGURATION SAMBA4CONFFILE
@@ -99,6 +100,7 @@ export USERNAME PASSWORD
 export WORKGROUP SERVER SERVER_IP
 export NSS_WRAPPER_PASSWD NSS_WRAPPER_GROUP
 export WINBINDD_SOCKET_DIR WINBINDD_PRIV_PIPE_DIR
+export TEST_DIRECTORY
 
 PATH=bin:$PATH
 export PATH
diff --git a/source3/script/tests/test_smbtorture_s3.sh 
b/source3/script/tests/test_smbtorture_s3.sh
index 602433b..a6ac948 100755
--- a/source3/script/tests/test_smbtorture_s3.sh
+++ b/source3/script/tests/test_smbtorture_s3.sh
@@ -24,7 +24,7 @@ incdir=`dirname $0`
 SMB_CONF_PATH=$CONFFILE
 export SMB_CONF_PATH
 
-tests=FDPASS LOCK1 LOCK2 LOCK3 LOCK4 LOCK5 LOCK6 LOCK7
+tests=FDPASS LOCK1 LOCK2 LOCK3 LOCK4 LOCK5 LOCK6 LOCK7 LOCK9
 #tests=$tests UNLINK BROWSE ATTR TRANS2 MAXFID TORTURE 
 tests=$tests UNLINK BROWSE ATTR TRANS2 TORTURE 
 tests=$tests OPLOCK1 OPLOCK2 OPLOCK3 STREAMERROR
@@ -53,7 +53,7 @@ for t in $tests; do
 fi
 start=
 name=$t
-testit $name $VALGRIND $BINDIR/smbtorture $unc -U$username%$password 
$ADDARGS $t || failed=`expr $failed + 1`
+testit $name $VALGRIND $BINDIR/smbtorture $unc -U$username%$password 
-l$PREFIX_ABS/tmp $ADDARGS $t || failed=`expr $failed + 1`
 done
 
 testok $0 $failed
diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c
index e752194..01d9ca8 100644
--- a/source3/smbd/blocking.c
+++ b/source3/smbd/blocking.c
@@ -48,6 +48,22 @@ static void brl_timeout_fn(struct event_context *event_ctx,
 }
 
 /
+ We need a version of timeval_min that treats zero timval as infinite.
+/
+
+static struct timeval timeval_brl_min(const struct timeval *tv1,
+   const struct timeval *tv2)
+{
+   if (timeval_is_zero(tv1)) {
+   return *tv2;
+   }
+   if (timeval_is_zero(tv2)) {
+   return *tv1;
+   }
+   return timeval_min(tv1, tv2);
+}
+
+/
  After a change to blocking_lock_queue, recalculate the timed_event for the
  next processing.
 /
@@ -70,19 +86,13 @@ static bool recalc_brl_timeout(void)
 */
 if (blr-blocking_pid == 0x) {
struct timeval psx_to = timeval_current_ofs(10, 
0);
-   next_timeout = timeval_min(next_timeout, 
psx_to);
+   next_timeout = timeval_brl_min(next_timeout, 
psx_to);
 }
 
continue;
}
 
-   if (timeval_is_zero(next_timeout)) {
-   next_timeout = blr-expire_time;
-   }
-   else {
-   next_timeout = timeval_min(next_timeout,
-  blr-expire_time);
-   }
+   next_timeout = timeval_brl_min(next_timeout, 
blr-expire_time);
}
 
if (timeval_is_zero(next_timeout)) {


-- 
Samba Shared Repository


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

2009-10-20 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  b2b8363... s4-lsa: Fix dcesrv_lsa_EnumTrustDom() and avoid infite 
windows client loop.
   via  e91e374... s3-lsa: Fix _lsa_EnumTrustDom() and avoid infite windows 
client loop.
   via  1500ee6... s4-smbtorture: test whether an lsa_EnumTrustDom 
implementation would hang up a client.
   via  e669b7a... s3-lsa: make s3 pass against RPC-LSA-LOOKUPNAMES again.
   via  d48513e... nsswitch: fix the build of the winbind krb5 locator 
plugin.
   via  f8706be... s4-smbtorture: fix RPC-LSA-LSALOOKUP test against w2k3 
and w2k8.
  from  df0430e... Turn on LOCK9 test which will test for regressions in 
bug 6828. Jeremy.

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


- Log -
commit b2b836330c7c75130675354937a5609df54718c0
Author: Günther Deschner g...@samba.org
Date:   Wed Oct 21 02:18:54 2009 +0200

s4-lsa: Fix dcesrv_lsa_EnumTrustDom() and avoid infite windows client loop.

Found by RPC-LSA-TRUSTED-DOMAIN torture test.

Guenther
(cherry picked from commit 4b6cfbb6d27eea07400d0eacb08b2f69724b19ca)

commit e91e37485290c1c9132009a14488757936dc7e9e
Author: Günther Deschner g...@samba.org
Date:   Wed Oct 21 02:17:32 2009 +0200

s3-lsa: Fix _lsa_EnumTrustDom() and avoid infite windows client loop.

Found by RPC-LSA-TRUSTED-DOMAIN torture test.

Guenther
(cherry picked from commit 209a65bc6f783055f3f6a8cea3fb36587d346511)

commit 1500ee66e7b8d4d0644762aebed9be63b7cacb0b
Author: Günther Deschner g...@samba.org
Date:   Wed Oct 21 02:16:32 2009 +0200

s4-smbtorture: test whether an lsa_EnumTrustDom implementation would hang 
up a client.

Guenther
(cherry picked from commit 48520b2274638bde88b08361197c1056936bcba0)

commit e669b7a668b529bf239aad1039f3ce7d1e011bc4
Author: Günther Deschner g...@samba.org
Date:   Wed Oct 21 02:45:21 2009 +0200

s3-lsa: make s3 pass against RPC-LSA-LOOKUPNAMES again.

Do what W2k8 does and return the builtin domain for a NULL name.

Guenther
(cherry picked from commit 32f2cc448778ec6eeab8bbd42d459f7e57b188ac)

commit d48513e216cf8f9084dcb20454503d161aa232d7
Author: Günther Deschner g...@samba.org
Date:   Wed Oct 21 02:44:44 2009 +0200

nsswitch: fix the build of the winbind krb5 locator plugin.

Guenther
(cherry picked from commit b9d9353b548d9b2ab684aa171f511174e6414762)

commit f8706bef307b1de684ce91ed2e5ecbda7695db09
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 20 23:47:40 2009 +0200

s4-smbtorture: fix RPC-LSA-LSALOOKUP test against w2k3 and w2k8.

Make sure to split out lsa_LookupName NULL name test so that we can better 
track
results from bogus names and NULL names.

Guenther
(cherry picked from commit a4d54875768bbe6bcd019a788081d182ce9d4a80)

---

Summary of changes:
 source3/Makefile.in |2 +-
 source3/rpc_server/srv_lsa_nt.c |   22 +--
 source4/rpc_server/lsa/dcesrv_lsa.c |9 +++
 source4/torture/rpc/lsa.c   |  117 ---
 4 files changed, 121 insertions(+), 29 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index cce6e7c..af0f53a 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -2522,7 +2522,7 @@ bin/v...@exeext@: $(BINARY_PREREQS) $(VLP_OBJ) $(LIBTDB)
 
 bin/winbind_krb5_locat...@shlibext@: $(BINARY_PREREQS) 
$(WINBIND_KRB5_LOCATOR_OBJ) $(LIBWBCLIENT)
@echo Linking $@
-   @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_KRB5_LOCATOR_OBJ) 
$(LIBWBCLIENT_LIBS) \
+   @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_KRB5_LOCATOR_OBJ) 
$(LIBWBCLIENT_LIBS) $(KRB5_LIBS) \
@sonamef...@`basename $...@`
 
 bin/pam_winbi...@shlibext@: $(BINARY_PREREQS) $(PAM_WINBIND_OBJ) $(LIBTALLOC) 
$(LIBWBCLIENT)
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index eafbd51..a9a4fa5 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -159,12 +159,13 @@ static NTSTATUS lookup_lsa_rids(TALLOC_CTX *mem_ctx,
 
/* Split name into domain and user component */
 
-   full_name = name[i].string;
-   if (full_name == NULL) {
-   prid[i].sid_type= type;
-   prid[i].rid = 0;
-   prid[i].sid_index   = (uint32_t)-1;
-   continue;
+   /* follow w2k8 behavior and return the builtin domain when no
+* input has been passed in */
+
+   if (name[i].string) {
+   full_name = name[i].string;
+   } else {
+   full_name = BUILTIN;
}
 
DEBUG(5, (lookup_lsa_rids: looking up name %s\n, full_name));

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

2009-10-19 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  cf0617b... Fix typo.
  from  5d62b2f... s3: Don't fail authentication when one or some group of 
require-membership-of is invalid.

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


- Log -
commit cf0617b40ba2affa4f2135cc44741afa71b967e3
Author: Karolin Seeger ksee...@samba.org
Date:   Mon Oct 19 09:47:33 2009 +0200

Fix typo.

privilage - privilege

Karolin
(cherry picked from commit fa08d0b44bf80f6caaeb004a0f27d8346c2820e2)

---

Summary of changes:
 docs-xml/Samba3-HOWTO/TOSHARG-DomainMember.xml |2 +-
 docs-xml/using_samba/appf.xml  |2 +-
 source3/change-log |2 +-
 source3/rpc_server/srv_samr_nt.c   |4 ++--
 source3/winbindd/winbindd_misc.c   |2 +-
 source4/build/m4/check_path.m4 |2 +-
 source4/client/tests/test_smbclient.sh |2 +-
 source4/libnet/libnet_samsync_ldb.c|2 +-
 source4/librpc/idl/irpc.idl|2 +-
 source4/torture/rpc/samsync.c  |2 +-
 10 files changed, 11 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/Samba3-HOWTO/TOSHARG-DomainMember.xml 
b/docs-xml/Samba3-HOWTO/TOSHARG-DomainMember.xml
index fb66f66..d017863 100644
--- a/docs-xml/Samba3-HOWTO/TOSHARG-DomainMember.xml
+++ b/docs-xml/Samba3-HOWTO/TOSHARG-DomainMember.xml
@@ -484,7 +484,7 @@ with the version of Windows.
A Samba administrator account (i.e., a Samba account that has 
literalroot/literal privileges on the
Samba server) must be entered here; the operation will fail if an 
ordinary user account is given.
The necessary privilege can be assured by creating a Samba SAM account 
for literalroot/literal or
-   by granting the literalSeMachineAccountPrivilege/literal privilage 
to the user account.
+   by granting the literalSeMachineAccountPrivilege/literal privilege 
to the user account.
/para
 
para
diff --git a/docs-xml/using_samba/appf.xml b/docs-xml/using_samba/appf.xml
index b4965f0..031484f 100644
--- a/docs-xml/using_samba/appf.xml
+++ b/docs-xml/using_samba/appf.xml
@@ -38,7 +38,7 @@
 paraThe default guest account was literalnobody/literal, uid -1, which 
produced log messages on one of our machines saying your server is being 
unfriendly, so we created a specific Samba guest account for browsing and 
printing:/para
 
 
-programlisting# superuser account - admin privilages to shares, with no
+programlisting# superuser account - admin privileges to shares, with no
# restrictions
# WARNING - use this with care: files can be modified,
# regardless of file permissions
diff --git a/source3/change-log b/source3/change-log
index 1f7798b..b614802 100644
--- a/source3/change-log
+++ b/source3/change-log
@@ -1440,7 +1440,7 @@ changes to samba. This change-log is now obsolete.
timezone
- attempted alignment fixups (to speed up memcpy)
- added some DCE/DFS support (thanks to Jim Doyle do...@oec.com)
-   - added fix so that root doesn't have special privilages to open
+   - added fix so that root doesn't have special privileges to open
readonly files for writing (but admin users do). This fixes the MS
office install problem.
- fixed trans2 response bug in client
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 9e95c48..b153bed 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -2271,7 +2271,7 @@ NTSTATUS _samr_OpenUser(pipes_struct *p,
se_map_generic(des_access, usr_generic_mapping);
 
/*
-* Get the sampass first as we need to check privilages
+* Get the sampass first as we need to check privileges
 * based on what kind of user object this is.
 * But don't reveal info too early if it didn't exist.
 */
@@ -2319,7 +2319,7 @@ NTSTATUS _samr_OpenUser(pipes_struct *p,
 * Cheat - allow GENERIC_RIGHTS_USER_WRITE if pipe user is
 * in DOMAIN_GROUP_RID_ADMINS. This is almost certainly not
 * what Windows does but is a hack for people who haven't
-* set up privilages on groups in Samba.
+* set up privileges on groups in Samba.
 */
if (acb_info  (ACB_SVRTRUST|ACB_DOMTRUST)) {
if (lp_enable_privileges()  
nt_token_check_domain_rid(p-server_info-ptok,
diff --git a/source3/winbindd/winbindd_misc.c b/source3/winbindd/winbindd_misc.c
index 9e62a1b..1917718 100644
--- a/source3/winbindd/winbindd_misc.c
+++ b/source3/winbindd/winbindd_misc.c
@@ -465,7 +465,7 @@ void winbindd_netbios_name(struct winbindd_cli_state *state)

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

2009-10-19 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  1a300b7... s4:test: Fix typo.
  from  cf0617b... Fix typo.

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


- Log -
commit 1a300b7a345f962591e356335aed005a8c304711
Author: Karolin Seeger ksee...@samba.org
Date:   Mon Oct 19 10:40:15 2009 +0200

s4:test: Fix typo.

Karolin
(cherry picked from commit b7b548411c3868bb6008d0221ac59e56fdd5aefe)

---

Summary of changes:
 source4/torture/rpc/samr.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index f8853c1..b3bc5cf 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -6455,7 +6455,7 @@ static bool test_OpenDomain(struct dcerpc_pipe *p, struct 
torture_context *tctx,
}
ret = test_CreateUser(p, tctx, domain_handle, 
TEST_ACCOUNT_NAME, user_handle, sid, which_ops, NULL, true);
if (!ret) {
-   torture_warning(tctx, Testing PASSWORDS or PRIVILAGES 
on domain %s failed!\n, dom_sid_string(tctx, sid));
+   torture_warning(tctx, Testing PASSWORDS or PRIVILEGES 
on domain %s failed!\n, dom_sid_string(tctx, sid));
}
break;
case TORTURE_SAMR_USER_ATTRIBUTES:


-- 
Samba Shared Repository


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

2009-10-19 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  72ae449... util: fixed generate_unique_strs() to be portable
  from  1a300b7... s4:test: Fix typo.

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


- Log -
commit 72ae44918a6c8e0a11747441f2bbd5152022f98c
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Oct 19 22:47:45 2009 +1100

util: fixed generate_unique_strs() to be portable

'place' was going negative, and giving undefined results. The result
was duplicate names which gave errors in SMB2-DIR on PPC and other
systems.

---

Summary of changes:
 lib/util/genrand.c |   44 +---
 1 files changed, 13 insertions(+), 31 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/genrand.c b/lib/util/genrand.c
index 8c7d88a..6002c06 100644
--- a/lib/util/genrand.c
+++ b/lib/util/genrand.c
@@ -362,24 +362,6 @@ again:
 }
 
 /**
- * Define our own pow() function to avoid linking in libm
- */
-static double s_pow(double x, double y)
-{
-   int i;
-   double ret = x;
-
-   if (y == 0)
-   return 1;
-
-   for (i = 1; i  y; i++)
-   ret *= x;
-
-   return ret;
-}
-
-
-/**
  * Generate an array of unique text strings all of the same length.
  * The returned string will be allocated.
  * Returns NULL if the number of unique combinations cannot be created.
@@ -390,30 +372,30 @@ _PUBLIC_ char** generate_unique_strs(TALLOC_CTX *mem_ctx, 
size_t len,
 uint32_t num)
 {
const char *c_list = abcdefghijklmnopqrstuvwxyz0123456789+_-#.,;
-   const int c_size = 42;
-   int i, j, rem;
+   const unsigned c_size = 42;
+   int i, j;
+   unsigned rem;
long long place;
char ** strs = NULL;
 
if (num == 0 || len == 0)
return NULL;
 
-   /* We'll never return more than UINT32_MAX strings. Since 42^6 is more
-* than UINT32_MAX, we only have to check if we've been asked to return
-* more than the total number of permutations for lengths less than 6.*/
-   if ((len  6)  (num  s_pow(c_size, len)))
-   return NULL;
-
strs = talloc_array(mem_ctx, char *, num);
+   if (strs == NULL) return NULL;
 
for (i = 0; i  num; i++) {
-   char *retstr = (char *)talloc_zero_size(mem_ctx, len + 1);
+   char *retstr = (char *)talloc_size(strs, len + 1);
+   if (retstr == NULL) {
+   talloc_free(strs);
+   return NULL;
+   }
rem = i;
-   for (j = len - 1; j = 0; j--) {
-   place = s_pow(c_size, j);
-   retstr[j] = c_list[rem / place];
-   rem = rem % place;
+   for (j = 0; j  len; j++) {
+   retstr[j] = c_list[rem % c_size];
+   rem = rem / c_size;
}
+   retstr[j] = 0;
strs[i] = retstr;
}
 


-- 
Samba Shared Repository


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

2009-10-19 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  7e75d3c... tdb: fixed the intermittent failure of tdbtorture in the 
build farm
  from  72ae449... util: fixed generate_unique_strs() to be portable

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


- Log -
commit 7e75d3c4fa1a7a6d3c967d6f108df0ab2ffa02ad
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Oct 20 10:59:40 2009 +1100

tdb: fixed the intermittent failure of tdbtorture in the build farm

There was a race condition that caused the torture.tdb to be left in a
state that needed recovery. The torture code thought that any message
from the tdb code was an error, so the recovered message, which is a
TDB_DEBUG_TRACE message, marked the run as being an error when it
isn't.

---

Summary of changes:
 lib/tdb/tools/tdbtorture.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tdb/tools/tdbtorture.c b/lib/tdb/tools/tdbtorture.c
index c754b81..bd5fb20 100644
--- a/lib/tdb/tools/tdbtorture.c
+++ b/lib/tdb/tools/tdbtorture.c
@@ -36,8 +36,11 @@ static void tdb_log(struct tdb_context *tdb, enum 
tdb_debug_level level, const c
 static void tdb_log(struct tdb_context *tdb, enum tdb_debug_level level, const 
char *format, ...)
 {
va_list ap;
-
-   error_count++;
+
+   /* trace level messages do not indicate an error */
+   if (level != TDB_DEBUG_TRACE) {
+   error_count++;
+   }
 
va_start(ap, format);
vfprintf(stdout, format, ap);


-- 
Samba Shared Repository


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

2009-10-19 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  13ff1f6... s4-dsdb: fixed empty structure error on solaris8
   via  4f1a1bf... s4-idl: don't call a variable 'stat'
   via  e94c54f... lib-util: check for too many combinations in 
generate_unique_strs()
  from  7e75d3c... tdb: fixed the intermittent failure of tdbtorture in the 
build farm

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


- Log -
commit 13ff1f6c01f8f79b63bd62fb6e5edff0b34439bd
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Oct 20 13:00:12 2009 +1100

s4-dsdb: fixed empty structure error on solaris8

Nadya, I'm guessing you plan on adding some real elements to this
structure later. For now I've added _dummy so the build can continue
with the Solaris C compiler.

commit 4f1a1bf8a4afe82e35d9a4d545255d63201f269a
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Oct 20 12:13:15 2009 +1100

s4-idl: don't call a variable 'stat'

never call a structure member by the name of a standard C lib call. It
breaks the build on some systems.

commit e94c54ff3c83d0d19e0157216632bc99d5f8d0e3
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Oct 20 11:34:49 2009 +1100

lib-util: check for too many combinations in generate_unique_strs()

---

Summary of changes:
 lib/util/genrand.c  |   11 ++-
 source4/dsdb/samdb/ldb_modules/descriptor.c |1 +
 source4/librpc/idl/winsif.idl   |4 ++--
 3 files changed, 13 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/genrand.c b/lib/util/genrand.c
index 6002c06..f054402 100644
--- a/lib/util/genrand.c
+++ b/lib/util/genrand.c
@@ -375,7 +375,6 @@ _PUBLIC_ char** generate_unique_strs(TALLOC_CTX *mem_ctx, 
size_t len,
const unsigned c_size = 42;
int i, j;
unsigned rem;
-   long long place;
char ** strs = NULL;
 
if (num == 0 || len == 0)
@@ -397,6 +396,16 @@ _PUBLIC_ char** generate_unique_strs(TALLOC_CTX *mem_ctx, 
size_t len,
}
retstr[j] = 0;
strs[i] = retstr;
+   if (rem != 0) {
+   /* we were not able to fit the number of
+* combinations asked for in the length
+* specified */
+   DEBUG(0,(__location__ : Too many combinations %u for 
length %u\n,
+num, (unsigned)len));
+
+   talloc_free(strs);
+   return NULL; 
+   }
}
 
return strs;
diff --git a/source4/dsdb/samdb/ldb_modules/descriptor.c 
b/source4/dsdb/samdb/ldb_modules/descriptor.c
index 544fb8c..82f0911 100644
--- a/source4/dsdb/samdb/ldb_modules/descriptor.c
+++ b/source4/dsdb/samdb/ldb_modules/descriptor.c
@@ -43,6 +43,7 @@
 #include param/param.h
 
 struct descriptor_data {
+   int _dummy;
 };
 
 struct descriptor_context {
diff --git a/source4/librpc/idl/winsif.idl b/source4/librpc/idl/winsif.idl
index 380f3cb..a9bf554 100644
--- a/source4/librpc/idl/winsif.idl
+++ b/source4/librpc/idl/winsif.idl
@@ -129,7 +129,7 @@ import nbt.idl;
uint32 verify_interval;
winsif_PriorityClass prioritiy_class;
uint32 num_worker_threads;
-   winsif_Stat stat;
+   winsif_Stat wstat;
} winsif_Results;
 
typedef enum {
@@ -307,7 +307,7 @@ import nbt.idl;
uint32 verify_interval;
winsif_PriorityClass prioritiy_class;
uint32 num_worker_threads;
-   winsif_Stat stat;
+   winsif_Stat wstat;
} winsif_ResultsNew;
 
WERROR winsif_WinsStatusNew(


-- 
Samba Shared Repository


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

2009-10-18 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  3555704... s3:configure: fix avahi activation
  from  404f744... Fix posix_unlink test. Was doing grep without quotes 
around the target string. Jeremy.

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


- Log -
commit 355570499426ec126ea84853e0d7e1a9aa690980
Author: Björn Jacke b...@sernet.de
Date:   Sun Oct 18 17:01:57 2009 +0200

s3:configure: fix avahi activation

Avahi was correctly found but not activated since e4a26c942.

---

Summary of changes:
 source3/configure.in |8 
 1 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index 0599864..8781cce 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -6147,12 +6147,12 @@ if test x$enable_avahi != xno; then
 fi
 
 save_LIBS=$LIBS
-AC_CHECK_LIB(avahi-client, avahi_client_new)
-AC_CHECK_LIB(avahi-common, avahi_strerror)
+AC_CHECK_LIB(avahi-client, avahi_client_new,[have_avahi_client_new=yes])
+AC_CHECK_LIB(avahi-common, avahi_strerror,[have_avahi_strerror=yes])
 LIBS=$save_LIBS
 
-if test x$ac_cv_lib_ext_avahi_client_avahi_client_new != xyes -o \
-   x$ac_cv_lib_ext_avahi_common_avahi_strerror != xyes ; then
+if test x$have_avahi_client_new != xyes -o \
+   x$have_avahi_strerror != xyes ; then
have_avahi_support=no
 fi
 


-- 
Samba Shared Repository


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

2009-10-18 Thread Bo Yang
The branch, v3-5-test has been updated
   via  5d62b2f... s3: Don't fail authentication when one or some group of 
require-membership-of is invalid.
  from  3555704... s3:configure: fix avahi activation

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


- Log -
commit 5d62b2fcce7d846bf5adb4407c05d281afa6a9e9
Author: Bo Yang boy...@samba.org
Date:   Thu Oct 15 06:23:48 2009 +0800

s3: Don't fail authentication when one or some group of 
require-membership-of is invalid.

Signed-off-by: Bo Yang boy...@samba.org
(cherry picked from commit 31f1a36901b5b8959dc51401c09c114829b50392)

---

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


Changeset truncated at 500 lines:

diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index 0b00c95..0eb24a2 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -1057,7 +1057,23 @@ static bool winbind_name_list_to_sid_string_list(struct 
pwb_context *ctx,
current_name,
sid_list_buffer,
sid_list_buffer_size)) {
-   goto out;
+   /*
+* If one group name failed, we must not fail
+* the authentication totally, continue with
+* the following group names. If user belongs to
+* one of the valid groups, we must allow it
+* login. -- BoYang
+*/
+
+   _pam_log(ctx, LOG_INFO, cannot convert group %s to 
sid, 
+check if group %s is valid group., 
current_name,
+current_name);
+   _make_remark_format(ctx, PAM_TEXT_INFO, _(Cannot 
convert group %s 
+   to sid, please contact your 
administrator to see 
+   if group %s is valid.), current_name, 
current_name);
+   SAFE_FREE(current_name);
+   search_location = comma + 1;
+   continue;
}
 
SAFE_FREE(current_name);
@@ -1073,7 +1089,12 @@ static bool winbind_name_list_to_sid_string_list(struct 
pwb_context *ctx,
if (!winbind_name_to_sid_string(ctx, user, search_location,
sid_list_buffer,
sid_list_buffer_size)) {
-   goto out;
+   _pam_log(ctx, LOG_INFO, cannot convert group %s to sid, 
+check if group %s is valid group., search_location,
+search_location);
+   _make_remark_format(ctx, PAM_TEXT_INFO, _(Cannot convert group 
%s 
+   to sid, please contact your administrator to 
see 
+   if group %s is valid.), search_location, 
search_location);
}
 
result = true;


-- 
Samba Shared Repository


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

2009-10-17 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  404f744... Fix posix_unlink test. Was doing grep without quotes 
around the target string. Jeremy.
  from  62620e9... Add comment explaining about symlink following  posix. 
Jeremy.

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


- Log -
commit 404f744772ab68ac5a4722818d447609c33a39b7
Author: Jeremy Allison j...@samba.org
Date:   Sat Oct 17 20:47:47 2009 -0700

Fix posix_unlink test. Was doing grep without quotes around the
target string.
Jeremy.

---

Summary of changes:
 source3/script/tests/test_smbclient_s3.sh |9 +
 1 files changed, 5 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/test_smbclient_s3.sh 
b/source3/script/tests/test_smbclient_s3.sh
index f10bfea..ff50220 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -108,19 +108,20 @@ EOF
 
 if [ $ret != 0 ] ; then
echo $out
-   echo failed create then delete bad symlink
+   echo failed create then delete bad symlink with error $ret
false
return
 fi
 
-echo $out | grep $prompt /dev/null 21
+echo $out | grep $prompt /dev/null 21
 
-if [ $? = 0 ] ; then
+ret=$?
+if [ $ret = 0 ] ; then
# got the correct prompt .. succeed
true
 else
echo $out
-   echo failed create then delete bad symlink
+   echo failed create then delete bad symlink - grep failed with $ret
false
 fi
 }


-- 
Samba Shared Repository


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

2009-10-16 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  11a6d88... s3:packaging: Fix building RHEL packages.
  from  8395c1d... s4-torture: take privileges into account in 
BASE-MAXIMUM_ALLOWED

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


- Log -
commit 11a6d88ea387fa50690880561f0efbeb8956
Author: Karolin Seeger ksee...@samba.org
Date:   Fri Oct 16 16:00:26 2009 +0200

s3:packaging: Fix building RHEL packages.

Fix bug #6721.
Thanks to Eero Volotinen eero.voloti...@medicel.com for providing the 
patch!

Karolin
(cherry picked from commit 79c2c61b99eb7c47c8bfbbb479d9d2197d1ad1fb)

---

Summary of changes:
 packaging/RHEL/makerpms.sh.tmpl |4 ++--
 packaging/RHEL/samba.spec.tmpl  |   25 +
 2 files changed, 23 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/packaging/RHEL/makerpms.sh.tmpl b/packaging/RHEL/makerpms.sh.tmpl
index 5b377bd..93d2d82 100644
--- a/packaging/RHEL/makerpms.sh.tmpl
+++ b/packaging/RHEL/makerpms.sh.tmpl
@@ -40,8 +40,8 @@ case $RPMVER in
 esac
 
 pushd .
-cd ../../source
-if [ -f Makefile ]; then 
+cd ../../source3
+if [ -f Makefile ]; then
make distclean
 fi
 popd
diff --git a/packaging/RHEL/samba.spec.tmpl b/packaging/RHEL/samba.spec.tmpl
index 15deecd..4d27b1a 100644
--- a/packaging/RHEL/samba.spec.tmpl
+++ b/packaging/RHEL/samba.spec.tmpl
@@ -174,8 +174,7 @@ if [ ${CC_MAJOR} -ge 3 ]; then
 fi
 
 
-make CFLAGS=$RPM_OPT_FLAGS -D_GNU_SOURCE %{?_smp_mflags} \
-   all modules pam_smbpass
+make all modules pam_smbpass
 
 # Remove some permission bits to avoid to many dependencies
 cd ..
@@ -210,8 +209,8 @@ make DESTDIR=$RPM_BUILD_ROOT \
 cd ..
 
 # NSS winbind support
-install -m 755 source3/nsswitch/libnss_winbind.so 
$RPM_BUILD_ROOT/%{_libarch}/libnss_winbind.so.2
-install -m 755 source3/nsswitch/libnss_wins.so 
$RPM_BUILD_ROOT/%{_libarch}/libnss_wins.so.2
+install -m 755 nsswitch/libnss_winbind.so 
$RPM_BUILD_ROOT/%{_libarch}/libnss_winbind.so.2
+install -m 755 nsswitch/libnss_wins.so 
$RPM_BUILD_ROOT/%{_libarch}/libnss_wins.so.2
 ( cd $RPM_BUILD_ROOT/%{_libarch};
   ln -sf libnss_winbind.so.2  libnss_winbind.so;
   ln -sf libnss_wins.so.2  libnss_wins.so )
@@ -440,6 +439,24 @@ fi
 %attr(755,root,root) /%{_libarch}/security/pam_winbind.so
 %attr(755,root,root) /%{_libarch}/security/pam_smbpass.so
 /usr/share/locale/de/LC_MESSAGES/pam_winbind.mo
+/usr/share/locale/ar/LC_MESSAGES/pam_winbind.mo
+/usr/share/locale/cs/LC_MESSAGES/pam_winbind.mo
+/usr/share/locale/da/LC_MESSAGES/pam_winbind.mo
+/usr/share/locale/es/LC_MESSAGES/pam_winbind.mo
+/usr/share/locale/fi/LC_MESSAGES/pam_winbind.mo
+/usr/share/locale/fr/LC_MESSAGES/pam_winbind.mo
+/usr/share/locale/hu/LC_MESSAGES/pam_winbind.mo
+/usr/share/locale/it/LC_MESSAGES/pam_winbind.mo
+/usr/share/locale/ja/LC_MESSAGES/pam_winbind.mo
+/usr/share/locale/ko/LC_MESSAGES/pam_winbind.mo
+/usr/share/locale/nb/LC_MESSAGES/pam_winbind.mo
+/usr/share/locale/nl/LC_MESSAGES/pam_winbind.mo
+/usr/share/locale/pl/LC_MESSAGES/pam_winbind.mo
+/usr/share/locale/pt_BR/LC_MESSAGES/pam_winbind.mo
+/usr/share/locale/ru/LC_MESSAGES/pam_winbind.mo
+/usr/share/locale/sv/LC_MESSAGES/pam_winbind.mo
+/usr/share/locale/zh_CN/LC_MESSAGES/pam_winbind.mo
+/usr/share/locale/zh_TW/LC_MESSAGES/pam_winbind.mo
 
 %{_includedir}/libsmbclient.h
 %{_libarchdir}/libsmbclient.*


-- 
Samba Shared Repository


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

2009-10-16 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  f2b9430... nsswitch: increase libwbclient version after adding 
wbcChangeTrustCredentials().
   via  823a1c4... s4-smbtorture: extend netr_LogonControl test in 
RPC-NETLOGON.
   via  7cebe58... s3-netlogon: Fix _netr_ServerPasswordSet2 cleartext blob 
handling.
   via  227558f... s4-smbtorture: test wbcLookupUserSids in 
WINBIND-WBCLIENT as well.
   via  5e295ad... s4-smbtorture: test wbcGuidToString and friends as well 
in WINBIND-WBCLIENT.
   via  f44ee3f... s3-libnetapi: add nltest tool.
   via  1b51be2... s3-libnetapi: add I_NetLogonControl{2} example code.
   via  e3b9268... s3-libnetapi: add I_NetLogonControl{2} to public headers.
   via  48678f4... s3-libnetapi: fill in I_NetLogonControl{2}_r.
   via  3f7a17c... s3-libnetapi: add I_NetLogonControl{2} skeleton.
   via  4df0e57... s3-libnetapi: add I_NetLogonControl{2} to IDL.
   via  8dcf3e3... s3-selftest: enable WINBIND-WBCLIENT against s3.
   via  27e64f5... s4-smbtorture: add very basic libwbclient testsuite.
   via  c2281ae... s3-net: fix build warning (missing default in switch).
  from  11a6d88... s3:packaging: Fix building RHEL packages.

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


- Log -
commit f2b94302ba7b30703b2edbdb5272582cff03fff9
Author: Günther Deschner g...@samba.org
Date:   Fri Oct 16 16:07:31 2009 +0200

nsswitch: increase libwbclient version after adding 
wbcChangeTrustCredentials().

Guenther
(cherry picked from commit 20c07674f6c0b9423c13b9876dbe4d12f86e0d72)

commit 823a1c4024003aa69ae7c918dfa3c0fcec12498e
Author: Günther Deschner g...@samba.org
Date:   Wed Oct 14 11:58:21 2009 +0200

s4-smbtorture: extend netr_LogonControl test in RPC-NETLOGON.

Guenther
(cherry picked from commit 22276961c398da5997402f09f7443d76f621d3ec)

commit 7cebe583a305de03dd53df31de566cb3dea1c0f8
Author: Günther Deschner g...@samba.org
Date:   Fri Oct 16 12:09:55 2009 +0200

s3-netlogon: Fix _netr_ServerPasswordSet2 cleartext blob handling.

Following Andrew's advice, let's straight md4 the plaintext blob and avoid
trying to get a paintext string out of the input the client sends.

Guenther
(cherry picked from commit 8267564e1c52b3d335bf892ab71963bfb0e6e7e8)

commit 227558fb3bbe037b812f5cf202701f9bf28af919
Author: Günther Deschner g...@samba.org
Date:   Fri Oct 16 14:51:49 2009 +0200

s4-smbtorture: test wbcLookupUserSids in WINBIND-WBCLIENT as well.

Guenther
(cherry picked from commit c2966a0766998b732c190860879c001d6140863e)

commit 5e295ada507a50a135759d2c70cbb8195546d2b7
Author: Günther Deschner g...@samba.org
Date:   Fri Oct 16 13:38:57 2009 +0200

s4-smbtorture: test wbcGuidToString and friends as well in WINBIND-WBCLIENT.

Guenther
(cherry picked from commit 246597cb0d8d62c702841dfbb3fa257fc2da70da)

commit f44ee3f5297470fd319204c1b6aef6e8398921f9
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 15 01:04:27 2009 +0200

s3-libnetapi: add nltest tool.

Guenther
(cherry picked from commit a85799d5db9e8dcbb6f12299dc5ff31485c0617f)

commit 1b51be2a75420c1ac71e25420c9a6a950bd7ecd0
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 13 16:47:32 2009 +0200

s3-libnetapi: add I_NetLogonControl{2} example code.

Guenther
(cherry picked from commit ca19ffde80df80aa8a58b0ad141e712f3f60ad81)

commit e3b92680b6ad378a2ae286fe446d1a0dd5a7140b
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 13 16:46:54 2009 +0200

s3-libnetapi: add I_NetLogonControl{2} to public headers.

Guenther
(cherry picked from commit d308aa3de86f4d5d66d4f618fb3dd3fcf65a3992)

commit 48678f46a0f681bf23f9d93c6c0709e377f210e9
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 13 16:03:58 2009 +0200

s3-libnetapi: fill in I_NetLogonControl{2}_r.

Guenther
(cherry picked from commit e31c2c7eb1f015774ad0adb3af8110f467461878)

commit 3f7a17c57b67a452c337316884de3a7cd250c66a
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 13 15:47:56 2009 +0200

s3-libnetapi: add I_NetLogonControl{2} skeleton.

Guenther
(cherry picked from commit e8e1d609411c37b5839e5b50b95f07691370c247)

commit 4df0e57ad0c66f99c4ffae4a35a8452cd49a3907
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 13 15:39:27 2009 +0200

s3-libnetapi: add I_NetLogonControl{2} to IDL.

Guenther
(cherry picked from commit 8bd4378ff8ddc81710575a21ca7713195a105b52)

commit 8dcf3e3009073cdf45b0736671bd4ecfe0baabfd
Author: Günther Deschner g...@samba.org
Date:   Fri Oct 16 01:58:49 2009 +0200

s3-selftest: enable WINBIND-WBCLIENT against s3.

Guenther
(cherry picked from commit 3f80b06d9ed9d1aabb56168ccee90d7d945de8ed)

commit 27e64f5fe99ff49e2153c0046399d1c58cc36b56
Author: Günther Deschner g...@samba.org
Date: 

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

2009-10-16 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  9180559... Fix one missing STAT - LSTAT with POSIX pathnames in 
vfs_xattr_tdb.c. Caught by the torture tester. I love unit tests :-). Jeremy.
   via  bf68418... s3: build pam_smbpass when possible
  from  f2b9430... nsswitch: increase libwbclient version after adding 
wbcChangeTrustCredentials().

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


- Log -
commit 9180559b4ab26813699d3c1410b3fc1b775b0e1d
Author: Jeremy Allison j...@samba.org
Date:   Fri Oct 16 16:37:20 2009 -0700

Fix one missing STAT - LSTAT with POSIX pathnames in vfs_xattr_tdb.c. 
Caught by the torture tester. I love unit tests :-). Jeremy.

commit bf684180b0bdc93438ab86b102e5883d70bcea6a
Author: Björn Jacke b...@sernet.de
Date:   Fri Oct 16 23:40:34 2009 +0200

s3: build pam_smbpass when possible

---

Summary of changes:
 source3/configure.in  |   54 ++---
 source3/modules/vfs_xattr_tdb.c   |8 -
 source3/script/tests/test_smbclient_s3.sh |2 +
 3 files changed, 43 insertions(+), 21 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index e07d022..0599864 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -4221,31 +4221,45 @@ fi # try_pam != no
 PAM_MODULES=
 INSTALL_PAM_MODULES=
 UNINSTALL_PAM_MODULES=
+
+try_pam_smbpass=auto
 AC_MSG_CHECKING(whether to use pam_smbpass)
 AC_ARG_WITH(pam_smbpass,
-[AS_HELP_STRING([--with-pam_smbpass], [Build PAM module for authenticating 
against passdb backends (default=no)])],
+[AS_HELP_STRING([--with-pam_smbpass], [Build PAM module for authenticating 
against passdb backends (default=auto)])],
 [ case $withval in
-  yes)
-AC_MSG_RESULT(yes)
+  yes|no|auto)
+try_pam_smbpass=$withval
+  ;;
+  *)
+AC_MSG_ERROR([valid options are yes,no,auto])
+  ;;
+  esac
+])
 
-   # Conditions under which pam_smbpass should not be built.
+if test x${try_pam_smbpass} = xno ; then
+   use_pam_smbpass=no
+else
+   use_pam_smbpass=yes
+   # Conditions under which pam_smbpass can't be built.
+   if test x$BLDSHARED != xtrue ; then
+   if test x${try_pam_smbpass} = xyes ; then
+   AC_MSG_ERROR([No support for shared modules])
+   fi
+   use_pam_smbpass=no
+   elif test x$create_pam_modules != xyes ; then
+   if test x${try_pam_smbpass} = xyes ; then
+   AC_MSG_ERROR([No support for PAM MODULES])
+   fi
+   use_pam_smbpass=no
+   fi
 
-   if test x$BLDSHARED != xtrue; then
-  AC_MSG_ERROR([No support for shared modules])
-   elif test x$create_pam_modules != xyes; then
- AC_MSG_ERROR([No support for PAM MODULES])
-   else
-  PAM_MODULES=pam_smbpass
-  INSTALL_PAM_MODULES=installpammodules
-  UNINSTALL_PAM_MODULES=uninstallpammodules
-   fi
-;;
-  *)
-AC_MSG_RESULT(no)
-;;
-  esac ],
-  AC_MSG_RESULT(no)
-)
+   if test x${use_pam_smbpass} = xyes ; then 
+   PAM_MODULES=pam_smbpass
+   INSTALL_PAM_MODULES=installpammodules
+   UNINSTALL_PAM_MODULES=uninstallpammodules
+   fi
+fi
+AC_MSG_RESULT([$use_pam_smbpass])
 
 
 ##
diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c
index 55fb141..f7fbfce 100644
--- a/source3/modules/vfs_xattr_tdb.c
+++ b/source3/modules/vfs_xattr_tdb.c
@@ -630,9 +630,15 @@ static int xattr_tdb_unlink(vfs_handle_struct *handle,
return -1;
}
 
-   if (SMB_VFS_STAT(handle-conn, smb_fname_tmp) == -1) {
+   if (lp_posix_pathnames()) {
+   ret = SMB_VFS_LSTAT(handle-conn, smb_fname_tmp);
+   } else {
+   ret = SMB_VFS_STAT(handle-conn, smb_fname_tmp);
+   }
+   if (ret == -1) {
goto out;
}
+
if (smb_fname_tmp-st.st_ex_nlink == 1) {
/* Only remove record on last link to file. */
remove_record = true;
diff --git a/source3/script/tests/test_smbclient_s3.sh 
b/source3/script/tests/test_smbclient_s3.sh
index b0199a3..f10bfea 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -94,6 +94,7 @@ test_bad_symlink()
 
 cat  $tmpfile EOF
 posix
+posix_unlink newname
 symlink badname newname
 posix_unlink newname
 quit
@@ -118,6 +119,7 @@ EOF
# got the correct prompt .. succeed
true
 else
+   echo $out
echo failed create then delete bad symlink
false
 fi


-- 
Samba Shared Repository


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

2009-10-16 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  90a291f... Last 2 VFS_STAT - LSTAT fixes I can see in the modules 
code. Jeremy.
  from  9180559... Fix one missing STAT - LSTAT with POSIX pathnames in 
vfs_xattr_tdb.c. Caught by the torture tester. I love unit tests :-). Jeremy.

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


- Log -
commit 90a291f9581150d8a00fbb5e784f0b034f563d04
Author: Jeremy Allison j...@samba.org
Date:   Fri Oct 16 17:20:40 2009 -0700

Last 2 VFS_STAT - LSTAT fixes I can see in the modules code.
Jeremy.

---

Summary of changes:
 source3/modules/vfs_afsacl.c  |9 -
 source3/modules/vfs_hpuxacl.c |7 ++-
 2 files changed, 14 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_afsacl.c b/source3/modules/vfs_afsacl.c
index 1c310c7..4666be2 100644
--- a/source3/modules/vfs_afsacl.c
+++ b/source3/modules/vfs_afsacl.c
@@ -659,8 +659,15 @@ static size_t afs_to_nt_acl(struct afs_acl *afs_acl,
uint32 security_info,
struct security_descriptor **ppdesc)
 {
+   int ret;
+
/* Get the stat struct for the owner info. */
-   if(SMB_VFS_STAT(conn, smb_fname) != 0) {
+   if (lp_posix_pathnames()) {
+   ret = SMB_VFS_LSTAT(conn, smb_fname);
+   } else {
+   ret = SMB_VFS_STAT(conn, smb_fname);
+   }
+   if (ret == -1) {
return 0;
}
 
diff --git a/source3/modules/vfs_hpuxacl.c b/source3/modules/vfs_hpuxacl.c
index df70f1e..5a54f79 100644
--- a/source3/modules/vfs_hpuxacl.c
+++ b/source3/modules/vfs_hpuxacl.c
@@ -255,7 +255,12 @@ int hpuxacl_sys_acl_set_file(vfs_handle_struct *handle,
 * that has _not_ been specified in type from the file first 
 * and concatenate it with the acl provided.
 */
-   if (SMB_VFS_STAT(handle-conn, smb_fname) != 0) {
+   if (lp_posix_pathnames()) {
+   ret = SMB_VFS_LSTAT(handle-conn, smb_fname);
+   } else {
+   ret = SMB_VFS_STAT(handle-conn, smb_fname);
+   }
+   if (ret != 0) {
DEBUG(10, (Error in stat call: %s\n, strerror(errno)));
goto done;
}


-- 
Samba Shared Repository


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

2009-10-16 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  96b6d67... s3-netlogon: fix updating trust accout passwords with 
downlevel domains.
  from  90a291f... Last 2 VFS_STAT - LSTAT fixes I can see in the modules 
code. Jeremy.

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


- Log -
commit 96b6d67c381b0c6078678ed74342b6fcd0f04a6b
Author: Günther Deschner g...@samba.org
Date:   Fri Oct 16 18:01:19 2009 +0200

s3-netlogon: fix updating trust accout passwords with downlevel domains.

When choosing the netlogon password set function, make sure to look at the
*negotiated* flags in the cli-dc state, not the ones we start the 
negotiation
with.

Guenther

---

Summary of changes:
 source3/rpc_client/cli_netlogon.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_client/cli_netlogon.c 
b/source3/rpc_client/cli_netlogon.c
index a5f48d4..191a0b0 100644
--- a/source3/rpc_client/cli_netlogon.c
+++ b/source3/rpc_client/cli_netlogon.c
@@ -516,10 +516,10 @@ NTSTATUS rpccli_netlogon_set_trust_password(struct 
rpc_pipe_client *cli,
enum netr_SchannelType 
sec_channel_type)
 {
NTSTATUS result;
-   uint32_t neg_flags = NETLOGON_NEG_AUTH2_ADS_FLAGS;
struct netr_Authenticator clnt_creds, srv_cred;
 
if (!cli-dc) {
+   uint32_t neg_flags = NETLOGON_NEG_AUTH2_ADS_FLAGS;
result = rpccli_netlogon_setup_creds(cli,
 cli-desthost, /* server 
name */
 lp_workgroup(), /* domain 
*/
@@ -537,7 +537,7 @@ NTSTATUS rpccli_netlogon_set_trust_password(struct 
rpc_pipe_client *cli,
 
netlogon_creds_client_authenticator(cli-dc, clnt_creds);
 
-   if (neg_flags  NETLOGON_NEG_PASSWORD_SET2) {
+   if (cli-dc-negotiate_flags  NETLOGON_NEG_PASSWORD_SET2) {
 
struct netr_CryptPassword new_password;
 


-- 
Samba Shared Repository


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

2009-10-16 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  62620e9... Add comment explaining about symlink following  posix. 
Jeremy.
  from  96b6d67... s3-netlogon: fix updating trust accout passwords with 
downlevel domains.

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


- Log -
commit 62620e9654fba8cdc7b070db205b1ca8ff3aade0
Author: Jeremy Allison j...@samba.org
Date:   Fri Oct 16 18:13:06 2009 -0700

Add comment explaining about symlink following  posix.
Jeremy.

---

Summary of changes:
 source3/modules/vfs_streams_xattr.c |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_streams_xattr.c 
b/source3/modules/vfs_streams_xattr.c
index b68fa02..d7c0a83 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -253,6 +253,11 @@ static int streams_xattr_stat(vfs_handle_struct *handle,
return SMB_VFS_NEXT_STAT(handle, smb_fname);
}
 
+   /* Note if lp_posix_paths() is true, we can never
+* get here as is_ntfs_stream_smb_fname() is
+* always false. So we never need worry about
+* not following links here. */
+
/* If the default stream is requested, just stat the base file. */
if (is_ntfs_default_stream_smb_fname(smb_fname)) {
return streams_xattr_stat_base(handle, smb_fname, true);
@@ -304,7 +309,7 @@ static int streams_xattr_lstat(vfs_handle_struct *handle,
return SMB_VFS_NEXT_LSTAT(handle, smb_fname);
}
 
-   /* If the default stream is requested, just stat the base file. 
*/
+   /* If the default stream is requested, just stat the base file. */
if (is_ntfs_default_stream_smb_fname(smb_fname)) {
return streams_xattr_stat_base(handle, smb_fname, false);
}


-- 
Samba Shared Repository


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

2009-10-15 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  1a25ef2... s3/docs: Add missing meta data to man ldbrename.
  from  9535d43... Fix the build, missing -. Jeremy.

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


- Log -
commit 1a25ef232bacb59aa753fbe21fed53a996d2e6b3
Author: Karolin Seeger ksee...@samba.org
Date:   Thu Oct 15 12:27:24 2009 +0200

s3/docs: Add missing meta data to man ldbrename.

Avoid warnings.

Karolin
(cherry picked from commit 6a9e88e08bfa4463ce5bdc57183f6518b524c98c)

---

Summary of changes:
 docs-xml/manpages-3/ldbrename.1.xml |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/ldbrename.1.xml 
b/docs-xml/manpages-3/ldbrename.1.xml
index 391ec84..6a134f4 100644
--- a/docs-xml/manpages-3/ldbrename.1.xml
+++ b/docs-xml/manpages-3/ldbrename.1.xml
@@ -5,6 +5,9 @@
 refmeta
refentrytitleldbrename/refentrytitle
manvolnum1/manvolnum
+refmiscinfo class=sourceSamba/refmiscinfo
+refmiscinfo class=manualUser Commands/refmiscinfo
+refmiscinfo class=version3.6/refmiscinfo
 /refmeta
 
 


-- 
Samba Shared Repository


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

2009-10-15 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  7936874... s3-spnego: Fix Bug #6815. Windows 2008 R2 SPNEGO 
negTokenTarg parsing failure.
   via  dfd22e3... s3-build: we need to have talloc 2.0.1 when building 
with external talloc.
   via  d4d2bbf... s3-passdb: missed two prototypes while moving to enum 
netr_SchannelType.
  from  1a25ef2... s3/docs: Add missing meta data to man ldbrename.

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


- Log -
commit 7936874af1ab8b2449af41f38695b2946813adf7
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 15 14:13:26 2009 +0200

s3-spnego: Fix Bug #6815. Windows 2008 R2 SPNEGO negTokenTarg parsing 
failure.

When parsing a SPNEGO session setup retry (falling back from KRB5 to 
NTLMSSP),
we failed to parse the ASN1_ENUMERATED negResult in the negTokenTarg, thus
failing spnego_parse_auth() completely.

By just using the shared spnego/asn1 code, we get the parsing the correct 
way.

Guenther
(cherry picked from commit 449ab398f58c6e0041621752322ebe24e6d70225)

commit dfd22e3c5dd21b62b9509c1a9781aaa671b528b3
Author: Günther Deschner g...@samba.org
Date:   Wed Oct 14 17:42:19 2009 +0200

s3-build: we need to have talloc 2.0.1 when building with external talloc.

2.0.0 did not got the exports right.
This and the 2.0.1 talloc fixes resolve bug #6808.

Guenther
(cherry picked from commit 67b544ba968d08cd861fc2d6d5b8a0881880b0aa)

commit d4d2bbff2fd300d8c7001e3ee65d4c854a431ad9
Author: Günther Deschner g...@samba.org
Date:   Wed Oct 14 11:48:59 2009 +0200

s3-passdb: missed two prototypes while moving to enum netr_SchannelType.

Guenther
(cherry picked from commit 075303560f545e59128a1bb16d6128a165830288)

---

Summary of changes:
 source3/Makefile.in|4 +++-
 source3/configure.in   |2 +-
 source3/include/proto.h|6 --
 source3/libsmb/clispnego.c |   31 ---
 4 files changed, 20 insertions(+), 23 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 90faadf..d12c991 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -506,7 +506,9 @@ SCHANNEL_OBJ = ../libcli/auth/credentials.o \
   passdb/secrets_schannel.o
 
 LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \
-libsmb/clikrb5.o libsmb/clispnego.o ../lib/util/asn1.o \
+libsmb/clikrb5.o libsmb/clispnego.o \
+../libcli/auth/spnego_parse.o \
+../lib/util/asn1.o \
 libsmb/clirap.o libsmb/clierror.o libsmb/climessage.o \
 libsmb/clireadwrite.o libsmb/clilist.o libsmb/cliprint.o \
 libsmb/clitrans.o libsmb/clisecdesc.o libsmb/clidgram.o \
diff --git a/source3/configure.in b/source3/configure.in
index 9775ce4..c98d526 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -4756,7 +4756,7 @@ AC_ARG_ENABLE(external_libtalloc, 
[AS_HELP_STRING([--enable-external-libtalloc],
 
 if test x$enable_external_libtalloc != xno
 then
-   PKG_CHECK_MODULES(LIBTALLOC, talloc = 2.0.0,
+   PKG_CHECK_MODULES(LIBTALLOC, talloc = 2.0.1,
[ enable_external_libtalloc=yes ],
[ if test x$enable_external_libtalloc = xyes; then
AC_MSG_ERROR([Unable to find libtalloc])
diff --git a/source3/include/proto.h b/source3/include/proto.h
index cc9fe87..6f81162 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -4445,9 +4445,11 @@ bool pdb_update_autolock_flag(struct samu *sampass, bool 
*updated);
 bool pdb_increment_bad_password_count(struct samu *sampass);
 bool is_dc_trusted_domain_situation(const char *domain_name);
 bool get_trust_pw_clear(const char *domain, char **ret_pwd,
-   const char **account_name, uint32 *channel);
+   const char **account_name,
+   enum netr_SchannelType *channel);
 bool get_trust_pw_hash(const char *domain, uint8 ret_pwd[16],
-  const char **account_name, uint32 *channel);
+  const char **account_name,
+  enum netr_SchannelType *channel);
 struct samr_LogonHours get_logon_hours_from_pdb(TALLOC_CTX *mem_ctx,
struct samu *pw);
 /* The following definitions come from passdb/pdb_compat.c  */
diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c
index 5d7e43d..1103ef8 100644
--- a/source3/libsmb/clispnego.c
+++ b/source3/libsmb/clispnego.c
@@ -495,31 +495,24 @@ DATA_BLOB spnego_gen_auth(DATA_BLOB blob)
 */
 bool spnego_parse_auth(DATA_BLOB blob, DATA_BLOB *auth)
 {
-   ASN1_DATA *data;
+   ssize_t len;
+   struct spnego_data token;
 
-   data = asn1_init(talloc_tos());
- 

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

2009-10-15 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  aece18c... s3-spnego: fix memleak in spnego_parse_auth().
  from  7936874... s3-spnego: Fix Bug #6815. Windows 2008 R2 SPNEGO 
negTokenTarg parsing failure.

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


- Log -
commit aece18c5047479b77b87451f07f3e2cd304ea205
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 15 15:45:20 2009 +0200

s3-spnego: fix memleak in spnego_parse_auth().

Guenther
(cherry picked from commit ef194bc692d4bb5fddc2c437ce66aa32080ca2dc)

---

Summary of changes:
 source3/libsmb/clispnego.c |6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c
index 1103ef8..e20749b 100644
--- a/source3/libsmb/clispnego.c
+++ b/source3/libsmb/clispnego.c
@@ -507,10 +507,14 @@ bool spnego_parse_auth(DATA_BLOB blob, DATA_BLOB *auth)
if (token.type != SPNEGO_NEG_TOKEN_TARG) {
DEBUG(3,(spnego_parse_auth: wrong token type: %d\n,
token.type));
+   spnego_free_data(token);
return false;
}
 
-   *auth = token.negTokenTarg.responseToken;
+   *auth = data_blob_talloc(talloc_tos(),
+token.negTokenTarg.responseToken.data,
+token.negTokenTarg.responseToken.length);
+   spnego_free_data(token);
 
return true;
 }


-- 
Samba Shared Repository


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

2009-10-15 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  156560a... s3: fixed krb5 build problem on ubuntu karmic
  from  aece18c... s3-spnego: fix memleak in spnego_parse_auth().

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


- Log -
commit 156560a00c08e4c1ab2fca7ba14329db70271553
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Oct 16 10:40:50 2009 +1100

s3: fixed krb5 build problem on ubuntu karmic

Karmic has MIT krb5 1.7-beta3, which has the symbol
krb5_auth_con_set_req_cksumtype but no prototype for it.

See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=531635

---

Summary of changes:
 source3/configure.in |4 
 source3/libsmb/clikrb5.c |9 +
 2 files changed, 13 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index c98d526..e07d022 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -3384,6 +3384,10 @@ if test x$with_ads_support != xno; then
   AC_CHECK_FUNC_EXT(krb5_fwd_tgt_creds, $KRB5_LIBS)
   AC_CHECK_FUNC_EXT(krb5_auth_con_set_req_cksumtype, $KRB5_LIBS)
 
+  # MIT krb5 1.7beta3 (in Ubuntu Karmic) does not have this declaration
+  # but does have the symbol
+  AC_CHECK_DECLS(krb5_auth_con_set_req_cksumtype, [], [], [#include krb5.h])
+
   LIBS=$KRB5_LIBS $LIBS
 
   AC_CACHE_CHECK(whether krb5_ticket contains kvno and enctype,
diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c
index 152c23b..145e30b 100644
--- a/source3/libsmb/clikrb5.c
+++ b/source3/libsmb/clikrb5.c
@@ -1858,6 +1858,15 @@ static krb5_error_code ads_krb5_get_fwd_ticket( 
krb5_context context,
char *pChksum = NULL;
char *p = NULL;
 
+/* MIT krb5 1.7beta3 (in Ubuntu Karmic) is missing the prototype,
+   but still has the symbol */
+#if !HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE
+krb5_error_code krb5_auth_con_set_req_cksumtype(  
+   krb5_context context,
+   krb5_auth_context  auth_context,  
+   krb5_cksumtype cksumtype);
+#endif
+
ZERO_STRUCT(fwdData);
ZERO_STRUCTP(authenticator);
 


-- 
Samba Shared Repository


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

2009-10-15 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  218d588... Fix valgrind memory leak in bug #6814 - Fixes for 
problems reported by valgrind Jeremy.
  from  156560a... s3: fixed krb5 build problem on ubuntu karmic

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


- Log -
commit 218d5880420ea7b16b30b782de27d7ff9d1083b4
Author: Jeremy Allison j...@samba.org
Date:   Thu Oct 15 16:55:40 2009 -0700

Fix valgrind memory leak in bug #6814 - Fixes for problems reported by 
valgrind
Jeremy.

---

Summary of changes:
 source3/lib/smbldap.c |8 +++-
 source3/passdb/secrets.c  |1 +
 source3/winbindd/idmap_ldap.c |1 +
 3 files changed, 9 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c
index 47b2208..7287e3d 100644
--- a/source3/lib/smbldap.c
+++ b/source3/lib/smbldap.c
@@ -1054,12 +1054,18 @@ static int smbldap_connect_system(struct smbldap_state 
*ldap_state, LDAP * ldap_
int version;
 
if (!ldap_state-anonymous  !ldap_state-bind_dn) {
+   char *bind_dn = NULL;
+   char *bind_secret = NULL;
 
/* get the default dn and password only if they are not set 
already */
-   if (!fetch_ldap_pw(ldap_state-bind_dn, 
ldap_state-bind_secret)) {
+   if (!fetch_ldap_pw(bind_dn, bind_secret)) {
DEBUG(0, (ldap_connect_system: Failed to retrieve 
password from secrets.tdb\n));
return LDAP_INVALID_CREDENTIALS;
}
+   smbldap_set_creds(ldap_state, false, bind_dn, bind_secret);
+   SAFE_FREE(bind_dn);
+   memset(bind_secret, '\0', strlen(bind_secret));
+   SAFE_FREE(bind_secret);
}
 
/* removed the sasl_bind_s EXTERNAL stuff, as my testsuite 
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index 8b87c2c..29e0662 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -891,6 +891,7 @@ bool fetch_ldap_pw(char **dn, char** pw)
if (asprintf(key, %s/%s, SECRETS_LDAP_BIND_PW, *dn)  0) {
SAFE_FREE(*dn);
DEBUG(0, (fetch_ldap_pw: asprintf failed!\n));
+   return false;
}
 
*pw=(char *)secrets_fetch(key, size);
diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c
index 3d1dd48..375c04a 100644
--- a/source3/winbindd/idmap_ldap.c
+++ b/source3/winbindd/idmap_ldap.c
@@ -131,6 +131,7 @@ static NTSTATUS get_credentials( TALLOC_CTX *mem_ctx,
DEBUG(2, (get_credentials: Failed to lookup ldap 
  bind creds. Using anonymous connection.\n));
anon = True;
+   *dn = NULL;
} else {
*dn = talloc_strdup(mem_ctx, user_dn);
SAFE_FREE( user_dn );


-- 
Samba Shared Repository


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

2009-10-15 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  8395c1d... s4-torture: take privileges into account in 
BASE-MAXIMUM_ALLOWED
   via  4e3ea9e... idl: added bit definition for privilege masks
  from  218d588... Fix valgrind memory leak in bug #6814 - Fixes for 
problems reported by valgrind Jeremy.

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


- Log -
commit 8395c1d67e64c5fcfe51305fb7cfd86a592b128e
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Oct 16 10:04:26 2009 +1100

s4-torture: take privileges into account in BASE-MAXIMUM_ALLOWED

The correct answer depends on the users privileges.

commit 4e3ea9e0da8e2f7d99b76114da4bca46c15d188c
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Oct 16 10:01:28 2009 +1100

idl: added bit definition for privilege masks

When you have backup or restore privileges, you automatically get
extra access bits in ACL interpretation. This adds definitions for the
bits you get.

---

Summary of changes:
 librpc/gen_ndr/security.h|4 ++
 librpc/idl/security.idl  |   15 ++
 source4/torture/basic/denytest.c |   58 +++--
 3 files changed, 67 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/security.h b/librpc/gen_ndr/security.h
index 05df02a..297ba18 100644
--- a/librpc/gen_ndr/security.h
+++ b/librpc/gen_ndr/security.h
@@ -70,6 +70,10 @@
 #define SEC_RIGHTS_DIR_WRITE   ( SEC_RIGHTS_FILE_WRITE )
 #define SEC_RIGHTS_DIR_EXECUTE ( SEC_RIGHTS_FILE_EXECUTE )
 #define SEC_RIGHTS_DIR_ALL ( SEC_RIGHTS_FILE_ALL )
+#define SEC_RIGHTS_PRIV_BACKUP ( 
SEC_STD_READ_CONTROL|SEC_FLAG_SYSTEM_SECURITY|SEC_GENERIC_READ )
+#define SEC_RIGHTS_DIR_PRIV_BACKUP ( 
SEC_RIGHTS_PRIV_BACKUP|SEC_DIR_TRAVERSE )
+#define SEC_RIGHTS_PRIV_RESTORE( 
SEC_STD_WRITE_DAC|SEC_STD_WRITE_OWNER|SEC_FLAG_SYSTEM_SECURITY|SEC_STD_DELETE )
+#define SEC_RIGHTS_DIR_PRIV_RESTORE( 
SEC_RIGHTS_PRIV_RESTORE|SEC_DIR_ADD_FILE|SEC_DIR_ADD_SUBDIR )
 #define STANDARD_RIGHTS_ALL_ACCESS ( SEC_STD_ALL )
 #define STANDARD_RIGHTS_MODIFY_ACCESS  ( SEC_STD_READ_CONTROL )
 #define STANDARD_RIGHTS_EXECUTE_ACCESS ( SEC_STD_READ_CONTROL )
diff --git a/librpc/idl/security.idl b/librpc/idl/security.idl
index 96d24b6..c24dc64 100644
--- a/librpc/idl/security.idl
+++ b/librpc/idl/security.idl
@@ -144,6 +144,21 @@ interface security
const int SEC_RIGHTS_DIR_EXECUTE  = SEC_RIGHTS_FILE_EXECUTE;
const int SEC_RIGHTS_DIR_ALL  = SEC_RIGHTS_FILE_ALL;
 
+   /* rights granted by some specific privileges */
+   const int SEC_RIGHTS_PRIV_BACKUP  = SEC_STD_READ_CONTROL | 
+   SEC_FLAG_SYSTEM_SECURITY |
+   SEC_GENERIC_READ;
+   const int SEC_RIGHTS_DIR_PRIV_BACKUP  = SEC_RIGHTS_PRIV_BACKUP 
+ | SEC_DIR_TRAVERSE;
+
+   const int SEC_RIGHTS_PRIV_RESTORE = SEC_STD_WRITE_DAC | 
+   SEC_STD_WRITE_OWNER |
+   SEC_FLAG_SYSTEM_SECURITY |
+   SEC_STD_DELETE;
+   const int SEC_RIGHTS_DIR_PRIV_RESTORE = SEC_RIGHTS_PRIV_RESTORE | 
+   SEC_DIR_ADD_FILE |
+   SEC_DIR_ADD_SUBDIR;
+
/* combinations of standard masks. */
const int STANDARD_RIGHTS_ALL_ACCESS= SEC_STD_ALL; /* 
0x001f */
const int STANDARD_RIGHTS_MODIFY_ACCESS = SEC_STD_READ_CONTROL; 
/* 0x0002 */
diff --git a/source4/torture/basic/denytest.c b/source4/torture/basic/denytest.c
index 0802896..5f65a2e 100644
--- a/source4/torture/basic/denytest.c
+++ b/source4/torture/basic/denytest.c
@@ -25,6 +25,7 @@
 #include libcli/security/security.h
 #include torture/util.h
 #include torture/smbtorture.h
+#include libcli/util/clilsa.h
 #include cxd_known.h
 
 extern int torture_failures;
@@ -2663,12 +2664,15 @@ bool torture_createx_access_exhaustive(struct 
torture_context *tctx,
 bool torture_maximum_allowed(struct torture_context *tctx,
 struct smbcli_state *cli)
 {
-   struct security_descriptor *sd;
+   struct security_descriptor *sd, *sd_orig;
union smb_open io = {};
static TALLOC_CTX *mem_ctx;
int fnum, i;
bool ret = true;
NTSTATUS status;
+   union smb_fileinfo q;
+   const char *owner_sid;
+   bool has_restore_privilege, has_backup_privilege;
 
mem_ctx = talloc_init(torture_maximum_allowed);
 
@@ -2698,10 +2702,44 @@ bool torture_maximum_allowed(struct torture_context 
*tctx,
CHECK_STATUS(status, NT_STATUS_OK);
fnum = io.ntcreatex.out.file.fnum;
 
+   /* the correct answers for this test depends on 

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

2009-10-14 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  a94f0a5... s3: Fix reference to freed memory in pam_winbind.
  from  23b3fad... s3:torture: Add a notify-bench test

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


- Log -
commit a94f0a5d8b2fa10972aef379a7137817c2ec0deb
Author: Bo Yang boy...@samba.org
Date:   Thu Oct 15 04:31:26 2009 +0800

s3: Fix reference to freed memory in pam_winbind.

Signed-off-by: Bo Yang boy...@samba.org

---

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


Changeset truncated at 500 lines:

diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index 324bede..a37ea7f 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -981,6 +981,7 @@ static bool winbind_name_to_sid_string(struct pwb_context 
*ctx,
   int sid_list_buffer_size)
 {
const char* sid_string;
+   char *sid_str;
 
/* lookup name? */
if (IS_SID_STRING(name)) {
@@ -989,7 +990,6 @@ static bool winbind_name_to_sid_string(struct pwb_context 
*ctx,
wbcErr wbc_status;
struct wbcDomainSid sid;
enum wbcSidType type;
-   char *sid_str;
 
_pam_log_debug(ctx, LOG_DEBUG,
   no sid given, looking up: %s\n, name);
@@ -1006,15 +1006,16 @@ static bool winbind_name_to_sid_string(struct 
pwb_context *ctx,
return false;
}
 
-   wbcFreeMemory(sid_str);
sid_string = sid_str;
}
 
if (!safe_append_string(sid_list_buffer, sid_string,
sid_list_buffer_size)) {
+   wbcFreeMemory(sid_str);
return false;
}
 
+   wbcFreeMemory(sid_str);
return true;
 }
 


-- 
Samba Shared Repository


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

2009-10-14 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  4c8175c... Final part of fix for bug 6793 - winbindd crash with 
INTERNAL ERROR: Signal 6 Don't use mapped_user uninitialized. Jeremy.
   via  a3713a5... s3:winbind: Fix a double-free
   via  12cabf9... s3:winbind: Fix bug 6793 -- segfault in winbindd_pam_auth
  from  a94f0a5... s3: Fix reference to freed memory in pam_winbind.

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


- Log -
commit 4c8175c1ce2696a3834dc7a8d56e9f3a786c33a4
Author: Jeremy Allison j...@samba.org
Date:   Wed Oct 14 11:11:26 2009 -0700

Final part of fix for bug 6793 - winbindd crash with INTERNAL ERROR: 
Signal 6
Don't use mapped_user uninitialized.
Jeremy.

commit a3713a55ab5f5c75ae042a0ba1c97424bea3abf7
Author: Volker Lendecke v...@samba.org
Date:   Tue Oct 13 20:56:28 2009 +0200

s3:winbind: Fix a double-free

Part of a fix for bug #6793.

commit 12cabf9ae8772bfc83b571f918bd8c74d62e1564
Author: Volker Lendecke v...@samba.org
Date:   Wed Oct 14 11:14:57 2009 -0700

s3:winbind: Fix bug 6793 -- segfault in winbindd_pam_auth

---

Summary of changes:
 source3/winbindd/idmap_adex/provider_unified.c |1 -
 source3/winbindd/winbindd_pam.c|   15 ---
 2 files changed, 8 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/idmap_adex/provider_unified.c 
b/source3/winbindd/idmap_adex/provider_unified.c
index b6652f4..af33405 100644
--- a/source3/winbindd/idmap_adex/provider_unified.c
+++ b/source3/winbindd/idmap_adex/provider_unified.c
@@ -440,7 +440,6 @@ done:
}
 
talloc_destroy(frame);
-   TALLOC_FREE(entry_dn);
 
return nt_status;
 }
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 178b3ea..ddf8c46 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -797,8 +797,8 @@ NTSTATUS append_auth_data(struct winbindd_cli_state *state,
 void winbindd_pam_auth(struct winbindd_cli_state *state)
 {
struct winbindd_domain *domain;
-   fstring name_domain, name_user;
-   char *mapped_user = NULL;
+   fstring name_domain, name_user, mapped_user;
+   char *mapped = NULL;
NTSTATUS result;
NTSTATUS name_map_status = NT_STATUS_UNSUCCESSFUL;
 
@@ -822,15 +822,16 @@ void winbindd_pam_auth(struct winbindd_cli_state *state)
 
name_map_status = normalize_name_unmap(state-mem_ctx,
   state-request-data.auth.user,
-  mapped_user);
+  mapped);
 
/* If the name normalization didnt' actually do anything,
   just use the original name */
 
-   if (!NT_STATUS_IS_OK(name_map_status) 
-   !NT_STATUS_EQUAL(name_map_status, NT_STATUS_FILE_RENAMED))
-   {
-   mapped_user = state-request-data.auth.user;
+   if (NT_STATUS_IS_OK(name_map_status)
+   ||NT_STATUS_EQUAL(name_map_status, NT_STATUS_FILE_RENAMED)) {
+   fstrcpy(mapped_user, mapped);
+   } else {
+   fstrcpy(mapped_user, state-request.data.auth.user);
}
 
if (!canonicalize_username(mapped_user, name_domain, name_user)) {


-- 
Samba Shared Repository


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

2009-10-14 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  9535d43... Fix the build, missing -. Jeremy.
  from  4c8175c... Final part of fix for bug 6793 - winbindd crash with 
INTERNAL ERROR: Signal 6 Don't use mapped_user uninitialized. Jeremy.

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


- Log -
commit 9535d43484d299f716e8f58a2b511b7abf4332da
Author: Jeremy Allison j...@samba.org
Date:   Wed Oct 14 12:36:02 2009 -0700

Fix the build, missing -.
Jeremy.

---

Summary of changes:
 nsswitch/pam_winbind.c  |4 ++--
 source3/winbindd/winbindd_pam.c |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index a37ea7f..0b00c95 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -980,8 +980,8 @@ static bool winbind_name_to_sid_string(struct pwb_context 
*ctx,
   char *sid_list_buffer,
   int sid_list_buffer_size)
 {
-   const char* sid_string;
-   char *sid_str;
+   const char* sid_string = NULL;
+   char *sid_str = NULL;
 
/* lookup name? */
if (IS_SID_STRING(name)) {
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index ddf8c46..110b149 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -831,7 +831,7 @@ void winbindd_pam_auth(struct winbindd_cli_state *state)
||NT_STATUS_EQUAL(name_map_status, NT_STATUS_FILE_RENAMED)) {
fstrcpy(mapped_user, mapped);
} else {
-   fstrcpy(mapped_user, state-request.data.auth.user);
+   fstrcpy(mapped_user, state-request-data.auth.user);
}
 
if (!canonicalize_username(mapped_user, name_domain, name_user)) {


-- 
Samba Shared Repository


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

2009-10-13 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  4c7d2aa... s3/loadparm: Fix severe HPUX compiler issue.
  from  f1529c3... torture: fixed socket leak in BENCH-TCON test

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


- Log -
commit 4c7d2aa2da9935248ee772d574f5225bbb9afd5d
Author: Olaf Flebbe o.fle...@science-computing.de
Date:   Tue Oct 13 14:13:06 2009 +0200

s3/loadparm: Fix severe HPUX compiler issue.

Members of struct should be initialized explictly.
Fixes bug #6804.
(cherry picked from commit 5ec557d9f6137dc96b2c099fb13726e6552fb1fe)

---

Summary of changes:
 source3/param/loadparm.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 7bac72e..fa0577b 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -3275,6 +3275,8 @@ static struct parm_struct parm_table[] = {
.type   = P_LIST,
.p_class= P_GLOBAL,
.ptr= Globals.szInitLogonDelayedHosts,
+   .special= NULL,
+   .enum_list  = NULL,
.flags  = FLAG_ADVANCED,
},
 
@@ -3283,6 +3285,8 @@ static struct parm_struct parm_table[] = {
.type   = P_INTEGER,
.p_class= P_GLOBAL,
.ptr= Globals.InitLogonDelay,
+   .special= NULL,
+   .enum_list  = NULL,
.flags  = FLAG_ADVANCED,
 
},
@@ -3672,6 +3676,7 @@ static struct parm_struct parm_table[] = {
.type   = P_ENUM,
.p_class= P_GLOBAL,
.ptr= Globals.ldap_ref_follow,
+   .special= NULL,
.enum_list  = enum_bool_auto,
.flags  = FLAG_ADVANCED,
},


-- 
Samba Shared Repository


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

2009-10-13 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  ec646e5... s3-winbindd: add wbint_ChangeMachineAccount 
implementation.
   via  e3fa32a... docs: document wbinfo -c.
   via  e816b11... nsswitch: add wbinfo -c (change trust account passwords).
   via  507de11... libwbclient: add wbcChangeTrustCredentials.
   via  6a7320d... docs: document wbinfo -t --domain DOMAIN behavior.
   via  b5ab612... netlogon: add NL_PASSWORD_VERSION to IDL.
   via  bf82532... s3: use enum netr_SchannelType all over the place.
   via  d1dffa6... s3-netlogon: allow to change any type of trust account 
password in trust_pw_find_change_and_store_it().
   via  488e228... s3-netlogon: pass down account name to remote password 
set functions.
   via  68ffe06... s3-docs: remove xml artefact from net.8.xml.
  from  4c7d2aa... s3/loadparm: Fix severe HPUX compiler issue.

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


- Log -
commit ec646e5e094639f750e56bde4779ab3b0ac23e47
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 6 18:26:33 2009 +0200

s3-winbindd: add wbint_ChangeMachineAccount implementation.

Guenther
(cherry picked from commit a3306e352dad74c3c6ce441610defc472d570f4f)

commit e3fa32aa37ce913d0daad6aa1b6bb81986dce4bf
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 6 18:20:23 2009 +0200

docs: document wbinfo -c.

Guenther
(cherry picked from commit 0c37c23869fe8000609c91be3d44ba269ff38f3b)

commit e816b11d564df42a467c7c330f4b75db923d497e
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 6 18:18:00 2009 +0200

nsswitch: add wbinfo -c (change trust account passwords).

Guenther
(cherry picked from commit 0a468fbe36e6049f8d7f971c1aa111e1573a406c)

commit 507de11191b28b8d14eda43084621e731e7a82f7
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 6 18:15:08 2009 +0200

libwbclient: add wbcChangeTrustCredentials.

Guenther
(cherry picked from commit 74948c979ab19f20c7e5824aee50828e9bda0e35)

commit 6a7320d73a51d84cdba08e43c8b50991339de267
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 13 12:24:57 2009 +0200

docs: document wbinfo -t --domain DOMAIN behavior.

Guenther
(cherry picked from commit f394b5bc683d55be066f8565f99d157d9848e169)

commit b5ab612c5f9b5afd04618b705153fbf5150382f4
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 8 00:34:53 2009 +0200

netlogon: add NL_PASSWORD_VERSION to IDL.

Guenther
(cherry picked from commit c2be185793d66709b0b2ddb92845f4dfd0ab27b6)

commit bf8253211c478280d41e3f8afdf7a97acc9ca898
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 13 10:15:34 2009 +0200

s3: use enum netr_SchannelType all over the place.

Guenther
(cherry picked from commit ebe0e64ba9815b238cccf7d24821bc473d245707)

commit d1dffa6244fb7b5eb95d3bea9a585d7bd0d92484
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 8 00:39:40 2009 +0200

s3-netlogon: allow to change any type of trust account password in 
trust_pw_find_change_and_store_it().

Guenther
(cherry picked from commit aa8c142b5e1d126b9a5a8e4a6638bc785292fbc2)

commit 488e228fc9b469c6b40a372c0f2ff0658e176c27
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 8 00:34:05 2009 +0200

s3-netlogon: pass down account name to remote password set functions.

Guenther
(cherry picked from commit 4a1b50afd567313cc25d5bbc14e01e170aa62a00)

commit 68ffe06565746c6172f6052ce6809036dd27
Author: Günther Deschner g...@samba.org
Date:   Mon Oct 12 14:28:53 2009 +0200

s3-docs: remove xml artefact from net.8.xml.

Guenther
(cherry picked from commit 5eb14b2994b4508156c0760cc4adf4db70eee9cc)

---

Summary of changes:
 docs-xml/manpages-3/net.8.xml  |2 +-
 docs-xml/manpages-3/wbinfo.1.xml   |   13 ++-
 librpc/gen_ndr/netlogon.h  |7 +
 librpc/idl/netlogon.idl|   12 ++
 nsswitch/libwbclient/wbc_pam.c |   38 +
 nsswitch/libwbclient/wbclient.h|   11 ++
 nsswitch/wbinfo.c  |   39 +
 nsswitch/winbind_struct_protocol.h |1 +
 source3/Makefile.in|1 +
 source3/auth/auth_domain.c |2 +-
 source3/include/proto.h|   16 ++-
 source3/libads/util.c  |2 +-
 source3/libnet/libnet_join.c   |1 +
 source3/librpc/gen_ndr/cli_wbint.c |  146 
 source3/librpc/gen_ndr/cli_wbint.h |8 +
 source3/librpc/gen_ndr/ndr_wbint.c |   51 +++-
 source3/librpc/gen_ndr/ndr_wbint.h |   11 +-
 

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

2009-10-13 Thread Volker Lendecke
The branch, v3-5-test has been updated
   via  7ff4fc5... s3: Fix vfs_shadow_copy2 to allow in-path @GMT-xxx
  from  ec646e5... s3-winbindd: add wbint_ChangeMachineAccount 
implementation.

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


- Log -
commit 7ff4fc589ce25c48409cdf399e437262b9799223
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Sep 16 03:22:56 2009 +0200

s3: Fix vfs_shadow_copy2 to allow in-path @GMT-xxx

---

Summary of changes:
 source3/modules/vfs_shadow_copy2.c |  147 ++-
 1 files changed, 126 insertions(+), 21 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_shadow_copy2.c 
b/source3/modules/vfs_shadow_copy2.c
index eac83fc..61f71b7 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -76,31 +76,99 @@ static int vfs_shadow_copy2_debug_level = DBGC_VFS;
 /*
   make very sure it is one of our special names 
  */
-static inline bool shadow_copy2_match_name(const char *name)
+static inline bool shadow_copy2_match_name(const char *name, const char 
**gmt_start)
 {
unsigned year, month, day, hr, min, sec;
-   if (name[0] != '@') return False;
-   if (strncmp(name, @GMT-, 5) != 0) return False;
-   if (sscanf(name, @GMT-%04u.%02u.%02u-%02u.%02u.%02u, year, month,
+   const char *p;
+   if (gmt_start) {
+   (*gmt_start) = NULL;
+   }
+   p = strstr_m(name, @GMT-);
+   if (p == NULL) return false;
+   if (p  name  p[-1] != '/') return False;
+   if (sscanf(p, @GMT-%04u.%02u.%02u-%02u.%02u.%02u, year, month,
   day, hr, min, sec) != 6) {
return False;
}
-   if (name[24] != 0  name[24] != '/') {
+   if (p[24] != 0  p[24] != '/') {
return False;
}
+   if (gmt_start) {
+   (*gmt_start) = p;
+   }
return True;
 }
 
 /*
+  shadow copy paths can also come into the server in this form:
+
+/foo/bar/@GMT-X/some/file
+
+  This function normalises the filename to be of the form:
+
+@GMT-/foo/bar/some/file
+ */
+static const char *shadow_copy2_normalise_path(TALLOC_CTX *mem_ctx, const char 
*path, const char *gmt_start)
+{
+   char *pcopy;
+   char buf[GMT_NAME_LEN];
+   size_t prefix_len;
+
+   if (path == gmt_start) {
+   return path;
+   }
+
+   prefix_len = gmt_start - path - 1;
+
+   DEBUG(10, (path=%s, gmt_start=%s, prefix_len=%d\n, path, gmt_start,
+  (int)prefix_len));
+
+   /*
+* We've got a/b/c/@GMT-.MM.DD-HH.MM.SS/d/e. convert to
+* @GMT-.MM.DD-HH.MM.SS/a/b/c/d/e before further
+* processing. As many VFS calls provide a const char *,
+* unfortunately we have to make a copy.
+*/
+
+   pcopy = talloc_strdup(talloc_tos(), path);
+   if (pcopy == NULL) {
+   return NULL;
+   }
+
+   gmt_start = pcopy + prefix_len;
+
+   /*
+* Copy away @GMT-.MM.DD-HH.MM.SS
+*/
+   memcpy(buf, gmt_start+1, GMT_NAME_LEN);
+
+   /*
+* Make space for it including a trailing /
+*/
+   memmove(pcopy + GMT_NAME_LEN + 1, pcopy, prefix_len);
+
+   /*
+* Move in @GMT-.MM.DD-HH.MM.SS/ at the beginning again
+*/
+   memcpy(pcopy, buf, GMT_NAME_LEN);
+   pcopy[GMT_NAME_LEN] = '/';
+
+   DEBUG(10, (shadow_copy2_normalise_path: %s - %s\n, path, pcopy));
+
+   return pcopy;
+}
+
+/*
   convert a name to the shadow directory
  */
 
 #define _SHADOW2_NEXT(op, args, rtype, eret, extra) do { \
const char *name = fname; \
-   if (shadow_copy2_match_name(fname)) { \
+   const char *gmt_start; \
+   if (shadow_copy2_match_name(fname, gmt_start)) {   \
char *name2; \
rtype ret; \
-   name2 = convert_shadow2_name(handle, fname); \
+   name2 = convert_shadow2_name(handle, fname, gmt_start); \
if (name2 == NULL) { \
errno = EINVAL; \
return eret; \
@@ -116,11 +184,12 @@ static inline bool shadow_copy2_match_name(const char 
*name)
 } while (0)
 
 #define _SHADOW2_NEXT_SMB_FNAME(op, args, rtype, eret, extra) do { \
-   if (shadow_copy2_match_name(smb_fname-base_name)) { \
+   const char *gmt_start; \
+   if (shadow_copy2_match_name(smb_fname-base_name, gmt_start)) 
{\
char *name2; \
char *smb_base_name_tmp = NULL; \
rtype ret; \
-   name2 = convert_shadow2_name(handle, smb_fname-base_name); \
+   name2 = convert_shadow2_name(handle, smb_fname-base_name, 
gmt_start); \
if (name2 == NULL) { \
errno = 

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

2009-10-13 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  75b8839... Remove use of int ret when we already have errcode. 
Jeremy.
   via  4cbb0fb... Catch one more erroneous use of errno. Jeremy.
   via  e5aecfa... correctly handle aio_error() and errno
  from  7ff4fc5... s3: Fix vfs_shadow_copy2 to allow in-path @GMT-xxx

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


- Log -
commit 75b88390b481545ed1210ea498fba45901ae26e3
Author: Jeremy Allison j...@samba.org
Date:   Tue Oct 13 13:28:57 2009 -0700

Remove use of int ret when we already have errcode.
Jeremy.

commit 4cbb0fb9f628f08a4bd1fcf08f50a4a1418fe2e7
Author: Jeremy Allison j...@samba.org
Date:   Tue Oct 13 13:03:39 2009 -0700

Catch one more erroneous use of errno.
Jeremy.

commit e5aecfa81d0e496ba972e5fef532e4b6464ff364
Author: Olaf Flebbe o.fle...@science-computing.de
Date:   Tue Oct 13 15:48:19 2009 +0200

correctly handle aio_error() and errno

---

Summary of changes:
 source3/smbd/aio.c |   66 ++--
 1 files changed, 28 insertions(+), 38 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index 491dd79..751fed1 100644
--- a/source3/smbd/aio.c
+++ b/source3/smbd/aio.c
@@ -45,11 +45,11 @@ struct aio_extra {
files_struct *fsp;
struct smb_request *req;
char *outbuf;
-   int (*handle_completion)(struct aio_extra *ex);
+   int (*handle_completion)(struct aio_extra *ex, int errcode);
 };
 
-static int handle_aio_read_complete(struct aio_extra *aio_ex);
-static int handle_aio_write_complete(struct aio_extra *aio_ex);
+static int handle_aio_read_complete(struct aio_extra *aio_ex, int errcode);
+static int handle_aio_write_complete(struct aio_extra *aio_ex, int errcode);
 
 static int aio_extra_destructor(struct aio_extra *aio_ex)
 {
@@ -319,9 +319,8 @@ bool schedule_aio_write_and_X(connection_struct *conn,
  Returns errno or zero if all ok.
 */
 
-static int handle_aio_read_complete(struct aio_extra *aio_ex)
+static int handle_aio_read_complete(struct aio_extra *aio_ex, int errcode)
 {
-   int ret = 0;
int outsize;
char *outbuf = aio_ex-outbuf;
char *data = smb_buf(outbuf);
@@ -333,18 +332,11 @@ static int handle_aio_read_complete(struct aio_extra 
*aio_ex)
   will return an error. Hopefully this is
   true JRA. */
 
-   /* If errno is ECANCELED then don't return anything to the
-* client. */
-   if (errno == ECANCELED) {
-   return 0;
-   }
-
-   DEBUG( 3,( handle_aio_read_complete: file %s nread == -1. 
+   DEBUG( 3,( handle_aio_read_complete: file %s nread == %d. 
   Error = %s\n,
-  fsp_str_dbg(aio_ex-fsp), strerror(errno)));
+  fsp_str_dbg(aio_ex-fsp), (int)nread, 
strerror(errcode)));
 
-   ret = errno;
-   ERROR_NT(map_nt_error_from_unix(ret));
+   ERROR_NT(map_nt_error_from_unix(errcode));
outsize = srv_set_message(outbuf,0,0,true);
} else {
outsize = srv_set_message(outbuf,12,nread,False);
@@ -377,17 +369,16 @@ static int handle_aio_read_complete(struct aio_extra 
*aio_ex)
  fsp_str_dbg(aio_ex-fsp), (double)aio_ex-acb.aio_offset,
  (unsigned int)nread ));
 
-   return ret;
+   return errcode;
 }
 
 /
  Complete the write and return the data or error back to the client.
- Returns errno or zero if all ok.
+ Returns error code or zero if all ok.
 */
 
-static int handle_aio_write_complete(struct aio_extra *aio_ex)
+static int handle_aio_write_complete(struct aio_extra *aio_ex, int errcode)
 {
-   int ret = 0;
files_struct *fsp = aio_ex-fsp;
char *outbuf = aio_ex-outbuf;
ssize_t numtowrite = aio_ex-acb.aio_nbytes;
@@ -399,8 +390,7 @@ static int handle_aio_write_complete(struct aio_extra 
*aio_ex)
DEBUG(5,(handle_aio_write_complete: 
 aio_write_behind failed ! File %s 
 is corrupt ! Error %s\n,
-fsp_str_dbg(fsp), strerror(errno)));
-   ret = errno;
+fsp_str_dbg(fsp), strerror(errcode)));
} else {
DEBUG(0,(handle_aio_write_complete: 
 

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

2009-10-13 Thread Björn Jacke
The branch, v3-5-test has been updated
   via  b3cc2f7... s3:net: Fix a segfault in net rpc trustdom list for 
overlong domain names
  from  75b8839... Remove use of int ret when we already have errcode. 
Jeremy.

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


- Log -
commit b3cc2f70cb672f28f9223cdd165cf505642deca6
Author: Volker Lendecke v...@samba.org
Date:   Tue Oct 13 15:56:00 2009 +0200

s3:net: Fix a segfault in net rpc trustdom list for overlong domain names

That was a complicated way to say %-20.s... But that code was from 2002 
...

---

Summary of changes:
 source3/utils/net_rpc.c |   10 ++
 1 files changed, 2 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index afda1a7..0e325b5 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -6012,14 +6012,13 @@ static int rpc_trustdom_list(struct net_context *c, int 
argc, const char **argv)
NTSTATUS nt_status;
const char *domain_name = NULL;
DOM_SID *queried_dom_sid;
-   fstring padding;
int ascii_dom_name_len;
struct policy_handle connect_hnd;
union lsa_PolicyInformation *info = NULL;
 
/* trusted domains listing variables */
unsigned int num_domains, enum_ctx = 0;
-   int i, pad_len, col_len = 20;
+   int i;
struct lsa_DomainList dom_list;
fstring pdc_name;
 
@@ -6228,17 +6227,12 @@ static int rpc_trustdom_list(struct net_context *c, int 
argc, const char **argv)
if (ascii_dom_name_len  ascii_dom_name_len  
FSTRING_LEN)
str[ascii_dom_name_len - 1] = '\0';
 
-   /* calculate padding space for d_printf to look nicer */
-   pad_len = col_len - strlen(str);
-   padding[pad_len] = 0;
-   do padding[--pad_len] = ' '; while (pad_len);
-
/* set opt_* variables to remote domain */
strupper_m(str);
c-opt_workgroup = talloc_strdup(mem_ctx, str);
c-opt_target_workgroup = c-opt_workgroup;
 
-   d_printf(%s%s, str, padding);
+   d_printf(%-20s, str);
 
/* connect to remote domain controller */
nt_status = net_make_ipc_connection(c,


-- 
Samba Shared Repository


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

2009-10-13 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  23b3fad... s3:torture: Add a notify-bench test
   via  bd40e01... s3:libsmb: Add cli_notify
   via  476a5df... s3:rpc: Fix is_known_pipename for dynamically loaded 
pipes
   via  a85ea69... s3: Fix some nonempty blank lines
  from  b3cc2f7... s3:net: Fix a segfault in net rpc trustdom list for 
overlong domain names

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


- Log -
commit 23b3fade10c5ecb5678e087e9507c527c36bdc48
Author: Volker Lendecke v...@samba.org
Date:   Mon Oct 12 17:29:45 2009 +0200

s3:torture: Add a notify-bench test

This is a test that creates and deletes files in a directory as fast as the
network allows it. At the same time, it opens a filechangenotify. This test 
is
done to just torture handling a single directory together with the notify
infrastructure.

commit bd40e01692ec209d13352d30fa4335c744f1d3ea
Author: Volker Lendecke v...@samba.org
Date:   Mon Oct 12 16:43:19 2009 +0200

s3:libsmb: Add cli_notify

commit 476a5df4a3434687b17e91c0d70d0fd8d0f91c4a
Author: Volker Lendecke v...@samba.org
Date:   Sat Oct 3 15:33:12 2009 +0200

s3:rpc: Fix is_known_pipename for dynamically loaded pipes

commit a85ea69e9971b3c195bced474f61479c8da4616b
Author: Volker Lendecke v...@samba.org
Date:   Sun Oct 4 16:52:08 2009 +0200

s3: Fix some nonempty blank lines

---

Summary of changes:
 source3/include/nss_info.h |6 +-
 source3/include/proto.h|8 +
 source3/libsmb/clifile.c   |  144 ++
 source3/passdb/util_unixsids.c |   10 +-
 source3/rpc_server/srv_pipe.c  |   23 +++-
 source3/torture/torture.c  |  403 
 6 files changed, 585 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/nss_info.h b/source3/include/nss_info.h
index 90d992a..0f9ad48 100644
--- a/source3/include/nss_info.h
+++ b/source3/include/nss_info.h
@@ -8,12 +8,12 @@
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
Library General Public License for more details.
-   
+
You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see http://www.gnu.org/licenses/.
 */
@@ -36,7 +36,7 @@
 
 struct nss_function_entry {
struct nss_function_entry *prev, *next;
-   
+
const char *name;
struct nss_info_methods *methods;
 };
diff --git a/source3/include/proto.h b/source3/include/proto.h
index d71060a..cc9fe87 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2659,6 +2659,14 @@ struct tevent_req *cli_posix_rmdir_send(TALLOC_CTX 
*mem_ctx,
const char *fname);
 NTSTATUS cli_posix_rmdir_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx);
 NTSTATUS cli_posix_rmdir(struct cli_state *cli, const char *fname);
+struct tevent_req *cli_notify_send(TALLOC_CTX *mem_ctx,
+  struct tevent_context *ev,
+  struct cli_state *cli, uint16_t fnum,
+  uint32_t buffer_size,
+  uint32_t completion_filter, bool recursive);
+NTSTATUS cli_notify_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
+uint32_t *pnum_changes,
+struct notify_change **pchanges);
 
 /* The following definitions come from libsmb/clifsinfo.c  */
 
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index b15aa8d..5eb8bd4 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -5027,3 +5027,147 @@ NTSTATUS cli_posix_rmdir(struct cli_state *cli, const 
char *fname)
}
return status;
 }
+
+/
+ filechangenotify
+/
+
+struct cli_notify_state {
+   uint8_t setup[8];
+   uint32_t num_changes;
+   struct notify_change *changes;
+};
+
+static void cli_notify_done(struct tevent_req *subreq);
+
+struct tevent_req *cli_notify_send(TALLOC_CTX *mem_ctx,
+  struct tevent_context *ev,
+  struct cli_state *cli, uint16_t fnum,
+  uint32_t buffer_size,
+  uint32_t completion_filter, bool recursive)
+{
+   struct tevent_req *req, *subreq;
+   struct 

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

2009-10-12 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  142faf7... s3/proto.h: Add lp_ldap_ref_follow prototype.
   via  a503726... s3/smbldap: add option to disable following LDAP refs
  from  dce488b... Fix builds with external tdb

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


- Log -
commit 142faf7d4efca3f7d8f4588b943e28583db8964f
Author: Karolin Seeger ksee...@samba.org
Date:   Mon Oct 12 12:52:29 2009 +0200

s3/proto.h: Add lp_ldap_ref_follow prototype.

Fix build of smbldap.

Karolin
(cherry picked from commit 8def289c8e19fc516ddcf67a117a8e8250baf1c2)

commit a50372629107d98d933bc7851c7973076b3674fe
Author: Jan Engelhardt jeng...@medozas.de
Date:   Mon Oct 12 11:34:58 2009 +0200

s3/smbldap: add option to disable following LDAP refs

Fix bug #6717.
(cherry picked from commit c5d5969e24913ea544590dd16378f7e071b07c4b)

---

Summary of changes:
 docs-xml/smbdotconf/ldap/ldapreffollow.xml |   21 +
 source3/include/proto.h|1 +
 source3/lib/smbldap.c  |   12 ++--
 source3/param/loadparm.c   |   11 +++
 4 files changed, 43 insertions(+), 2 deletions(-)
 create mode 100644 docs-xml/smbdotconf/ldap/ldapreffollow.xml


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/ldap/ldapreffollow.xml 
b/docs-xml/smbdotconf/ldap/ldapreffollow.xml
new file mode 100644
index 000..f059f15
--- /dev/null
+++ b/docs-xml/smbdotconf/ldap/ldapreffollow.xml
@@ -0,0 +1,21 @@
+samba:parameter name=ldap ref follow context=G type=enum
+   advanced=1 developer=1
+   xmlns:samba=http://www.samba.org/samba/DTD/samba-doc;
+
+description
+
+   paraThis option controls whether to follow LDAP referrals or not when
+   searching for entries in the LDAP database. Possible values are
+   emphasison/emphasis to enable following referrals,
+   emphasisoff/emphasis to disable this, and
+   emphasisauto/emphasis, to use the libldap default settings.
+   libldap's choice of following referrals or not is set in
+   /etc/openldap/ldap.conf with the REFERRALS parameter as documented in
+   ldap.conf(5)./para
+
+/description
+
+value type=defaultauto/value
+value type=exampleoff/value
+
+/samba:parameter
diff --git a/source3/include/proto.h b/source3/include/proto.h
index d31483a..48000c1 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3976,6 +3976,7 @@ char *lp_ldap_suffix(void);
 char *lp_ldap_admin_dn(void);
 int lp_ldap_ssl(void);
 bool lp_ldap_ssl_ads(void);
+int lp_ldap_ref_follow(void);
 int lp_ldap_passwd_sync(void);
 bool lp_ldap_delete_dn(void);
 int lp_ldap_replication_sleep(void);
diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c
index c96801a..47b2208 100644
--- a/source3/lib/smbldap.c
+++ b/source3/lib/smbldap.c
@@ -721,9 +721,18 @@ int smb_ldap_setup_conn(LDAP **ldap_struct, const char 
*uri)
rc = ldap_initialize(ldap_struct, uri);
if (rc) {
DEBUG(0, (ldap_initialize: %s\n, ldap_err2string(rc)));
+   return rc;
}
 
-   return rc;
+   if (lp_ldap_ref_follow() != Auto) {
+   rc = ldap_set_option(*ldap_struct, LDAP_OPT_REFERRALS,
+lp_ldap_ref_follow() ? LDAP_OPT_ON : LDAP_OPT_OFF);
+   if (rc != LDAP_SUCCESS)
+   DEBUG(0, (Failed to set LDAP_OPT_REFERRALS: %s\n,
+   ldap_err2string(rc)));
+   }
+
+   return LDAP_SUCCESS;
 #else 
 
/* Parse the string manually */
@@ -774,7 +783,6 @@ int smb_ldap_setup_conn(LDAP **ldap_struct, const char *uri)
}
 #endif /* HAVE_LDAP_INITIALIZE */
 
-
/* now set connection timeout */
 #ifdef LDAP_X_OPT_CONNECT_TIMEOUT /* Netscape */
{
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index b1f2a4a..7bac72e 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -260,6 +260,7 @@ struct global {
char *szLdapGroupSuffix;
int ldap_ssl;
bool ldap_ssl_ads;
+   int ldap_ref_follow;
char *szLdapSuffix;
char *szLdapAdminDn;
int ldap_debug_level;
@@ -3667,6 +3668,14 @@ static struct parm_struct parm_table[] = {
.flags  = FLAG_ADVANCED,
},
{
+   .label  = ldap ref follow,
+   .type   = P_ENUM,
+   .p_class= P_GLOBAL,
+   .ptr= Globals.ldap_ref_follow,
+   .enum_list  = enum_bool_auto,
+   .flags  = FLAG_ADVANCED,
+   },
+   {
.label  = ldap timeout,
.type   = P_INTEGER,
.p_class= P_GLOBAL,
@@ -5038,6 +5047,7 @@ static void init_globals(bool 

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

2009-10-12 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  1e26735... WHATSNEW: Update changes.
  from  142faf7... s3/proto.h: Add lp_ldap_ref_follow prototype.

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


- Log -
commit 1e2673557ed4738545c47094b375dbccf616476c
Author: Karolin Seeger ksee...@samba.org
Date:   Mon Oct 12 13:01:48 2009 +0200

WHATSNEW: Update changes.

Karolin

---

Summary of changes:
 WHATSNEW.txt |   14 ++
 1 files changed, 14 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 1cfa69c..f34e497 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -12,6 +12,20 @@ Major enhancements in Samba 3.5.0 include:
 
 
 ##
+Changes
+###
+
+smb.conf changes
+
+
+   Parameter Name  Description Default
+   --  --- ---
+
+   ldap ref followNew auto
+
+
+
+##
 Reporting bugs  Development Discussion
 ###
 


-- 
Samba Shared Repository



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

2009-10-12 Thread Björn Jacke
The branch, v3-5-test has been updated
   via  b7dfa5a... ѕ3: fix domain trust documentation confusion
  from  1e26735... WHATSNEW: Update changes.

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


- Log -
commit b7dfa5abfd4897f983824f620e0919ad14fcf06a
Author: Björn Jacke b...@sernet.de
Date:   Mon Oct 12 22:37:34 2009 +0200

ѕ3: fix domain trust documentation confusion

fix some trusted/trusting mixups, make documentation more precise
and man page more verbose.

---

Summary of changes:
 docs-xml/manpages-3/net.8.xml |   12 ++--
 source3/utils/net_rpc.c   |   22 +++---
 2 files changed, 21 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/net.8.xml b/docs-xml/manpages-3/net.8.xml
index 85be0d8..da4fec5 100644
--- a/docs-xml/manpages-3/net.8.xml
+++ b/docs-xml/manpages-3/net.8.xml
@@ -748,6 +748,9 @@ such as domain name, domain sid and number of users and 
groups.
 paraAdd a interdomain trust account for replaceableDOMAIN/replaceable. 
 This is in fact a Samba account named replaceableDOMAIN$/replaceable 
 with the account flag constant'I'/constant (interdomain trust account). 
+This is required for incoming trusts to work. It makes Samba be a
+trusted domain of the foreign (trusting) domain.
+Users of the Samba domain will be made available in the foreign domain.
 If the command is used against localhost it has the same effect as 
 commandsmbpasswd -a -i DOMAIN/command. Please note that both commands
 expect a appropriate UNIX account. 
@@ -769,8 +772,13 @@ it has the same effect as commandsmbpasswd -x 
DOMAIN$/command.
 titleRPC TRUSTDOM ESTABLISH replaceableDOMAIN/replaceable/title
 
 para
-Establish a trust relationship to a trusting domain. 
+Establish a trust relationship to a trusted domain. 
 Interdomain account must already be created on the remote PDC.
+This is required for outgoing trusts to work. It makes Samba be a
+trusting domain of a foreign (trusted) domain.
+Users of the foreign domain will be made available in our domain.
+You'll need winbind and a working idmap config to make them
+appear in your system.
 /para
 
 /refsect3
@@ -784,7 +792,7 @@ Interdomain account must already be created on the remote 
PDC.
 refsect3
 titleRPC TRUSTDOM LIST/title
 
-paraList all current interdomain trust relationships./para
+paraList all interdomain trust relationships./para
 
 /refsect3
 
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index be971d8..c3d002c 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -6029,7 +6029,7 @@ static int rpc_trustdom_list(struct net_context *c, int 
argc, const char **argv)
if (c-display_usage) {
d_printf(_(Usage:\n
   net rpc trustdom list\n
-  List trust relationships\n));
+  List in- and outgoing trust relationships\n));
return 0;
}
 
@@ -6300,41 +6300,41 @@ static int rpc_trustdom(struct net_context *c, int 
argc, const char **argv)
add,
rpc_trustdom_add,
NET_TRANSPORT_RPC,
-   N_(Add trusted domain's account),
+   N_(Add trusting domain's account),
N_(net rpc trustdom add\n
-  Add trusted domain's account)
+  Add trusting domain's account)
},
{
del,
rpc_trustdom_del,
NET_TRANSPORT_RPC,
-   N_(Remove trusted domain's account),
+   N_(Remove trusting domain's account),
N_(net rpc trustdom del\n
-  Remove trusted domain's account)
+  Remove trusting domain's account)
},
{
establish,
rpc_trustdom_establish,
NET_TRANSPORT_RPC,
-   N_(Establish trust relationship),
+   N_(Establish outgoing trust relationship),
N_(net rpc trustdom establish\n
-  Establish trust relationship)
+  Establish outgoing trust relationship)
},
{
revoke,
rpc_trustdom_revoke,
NET_TRANSPORT_RPC,
-   N_(Revoke trust relationship),
+   N_(Revoke outgoing trust relationship),
N_(net rpc trustdom revoke\n
-  Revoke trust relationship)
+  Revoke 

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

2009-10-12 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  f1529c3... torture: fixed socket leak in BENCH-TCON test
  from  b7dfa5a... ѕ3: fix domain trust documentation confusion

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


- Log -
commit f1529c3223a4b366cd4795c559eaaa8c40078470
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Oct 12 16:11:53 2009 +1100

torture: fixed socket leak in BENCH-TCON test

The BENCH-TCON test was leaving the socket open. A smbclie_tdis()
closes the tree connection, but does not close the socket.

This caused the build farm to run out of file descriptors

---

Summary of changes:
 source4/torture/raw/tconrate.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/raw/tconrate.c b/source4/torture/raw/tconrate.c
index 076e5be..06cb765 100644
--- a/source4/torture/raw/tconrate.c
+++ b/source4/torture/raw/tconrate.c
@@ -112,6 +112,7 @@ static int fork_tcon_client(struct torture_context *tctx,
}
 
smbcli_tdis(cli);
+   talloc_free(cli);
 
*tcon_count = *tcon_count + 1;
now = timeval_current();


-- 
Samba Shared Repository


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

2009-10-11 Thread Björn Jacke
The branch, v3-5-test has been updated
   via  2f95768... Use the method used by build_env.sh to discover the user 
name.
  from  1f1c293... s3: Fix a memleak reported by dmarkey

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


- Log -
commit 2f9576801d1e14b5489cef93c677114d18ef3d83
Author: Matt Kraai mkr...@beckman.com
Date:   Thu Sep 17 07:07:42 2009 -0700

Use the method used by build_env.sh to discover the user name.

so try USERNAME, then LOGNAME, then whoami, then id -un to find out who we
are.

---

Summary of changes:
 source3/script/tests/selftest.sh |   10 +-
 1 files changed, 9 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/selftest.sh b/source3/script/tests/selftest.sh
index ae856ca..43e7bf1 100755
--- a/source3/script/tests/selftest.sh
+++ b/source3/script/tests/selftest.sh
@@ -57,7 +57,15 @@ export TORTURE_MAXTIME
 WORKGROUP=SAMBA-TEST
 SERVER=localhost2
 SERVER_IP=127.0.0.2
-USERNAME=`PATH=/usr/ucb:$PATH whoami`
+if [ ! x$USER = x ]; then
+USERNAME=$USER
+else
+if [ ! x$LOGNAME = x ]; then
+USERNAME=$LOGNAME
+else
+USERNAME=`PATH=/usr/ucb:$PATH whoami || id -un`
+fi
+fi
 USERID=`PATH=/usr/ucb:$PATH id | cut -d ' ' -f1 | sed -e 
's/uid=\([0-9]*\).*/\1/g'`
 GROUPID=`PATH=/usr/ucb:$PATH id | cut -d ' ' -f2 | sed -e 
's/gid=\([0-9]*\).*/\1/g'`
 PASSWORD=test


-- 
Samba Shared Repository


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

2009-10-11 Thread Simo Sorce
The branch, v3-5-test has been updated
   via  dce488b... Fix builds with external tdb
  from  2f95768... Use the method used by build_env.sh to discover the user 
name.

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


- Log -
commit dce488bc35af7ec137b657448708914edf5df706
Author: Simo Sorce i...@samba.org
Date:   Sun Oct 11 09:42:59 2009 -0400

Fix builds with external tdb

Make sure we do not reference our internal tdb directly.
Let configure define what tdb.h file to use so that builds that use an
extrenal tdb do not include 2 different versions of the tdb header.

---

Summary of changes:
 lib/util/util_tdb.c   |2 +-
 source3/lib/ldb/ldb_tdb/ldb_tdb.h |6 --
 2 files changed, 1 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/util_tdb.c b/lib/util/util_tdb.c
index e107cbd..cda8dc7 100644
--- a/lib/util/util_tdb.c
+++ b/lib/util/util_tdb.c
@@ -20,7 +20,7 @@
 */
 
 #include includes.h
-#include ../tdb/include/tdb.h
+#include tdb.h
 #include ../lib/util/util_tdb.h
 
 /* these are little tdb utility functions that are meant to make
diff --git a/source3/lib/ldb/ldb_tdb/ldb_tdb.h 
b/source3/lib/ldb/ldb_tdb/ldb_tdb.h
index 486d948..caf8ba8 100644
--- a/source3/lib/ldb/ldb_tdb/ldb_tdb.h
+++ b/source3/lib/ldb/ldb_tdb/ldb_tdb.h
@@ -3,13 +3,7 @@
 #include system/filesys.h
 #endif
 
-#if (_SAMBA_BUILD_ = 4)
-#include lib/tdb/include/tdb.h
-#elif defined(_SAMBA_BUILD_)
-#include ../tdb/include/tdb.h
-#else
 #include tdb.h
-#endif
 
 /* this private structure is used by the ltdb backend in the
ldb_context */


-- 
Samba Shared Repository


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

2009-10-09 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  b638a21... WHATSNEW: Update WHATSNEW.
  from  0dc5d0b... s4/torture: Add server target of OneFS

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


- Log -
commit b638a210f8deacb5cbd56ce273e7efd9bb052054
Author: Karolin Seeger ksee...@samba.org
Date:   Fri Oct 9 09:22:02 2009 +0200

WHATSNEW: Update WHATSNEW.

Karolin

---

Summary of changes:
 WHATSNEW.txt |   29 -
 1 files changed, 4 insertions(+), 25 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 066f718..1cfa69c 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,36 +1,15 @@
=
-   Release Notes for Samba 3.4.0pre1
+   Release Notes for Samba 3.5.0pre1
 
=
 
-This is the first preview release of Samba 3.4.  This is *not*
+This is the first preview release of Samba 3.5.  This is *not*
 intended for production environments and is designed for testing
 purposes only.  Please report any defects via the Samba bug reporting
 system at https://bugzilla.samba.org/.
 
-Major enhancements in Samba 3.4.0 include:
+Major enhancements in Samba 3.5.0 include:
 
-Authentication Changes:
-o Changed the way smbd handles untrusted domain names given during user
-  authentication
-
-Authentication Changes
-==
-
-Previously, when Samba was a domain member and a client was connecting using an
-untrusted domain name, such as BOGUS\user smbd would remap the untrusted
-domain to the primary domain smbd was a member of and attempt authentication
-using that DOMAIN\user name.  This differed from how a Windows member server
-would behave.  Now, smbd will replace the BOGUS name with it's SAM name.  In
-the case where smbd is acting as a PDC this will be DOMAIN\user.  In the case
-where smbd is acting as a domain member server this will be WORKSTATION\user.
-Thus, smbd will never assume that an incoming user name which is not qualified
-with the same primary domain, is part of smbd's primary domain.
-
-While this behavior matches Windows, it may break some workflows which depended
-on smbd to always pass through bogus names to the DC for verification.  A new
-parameter map untrusted to domain can be enabled to revert to the legacy
-behavior.
 
 ##
 Reporting bugs  Development Discussion
@@ -42,7 +21,7 @@ joining the #samba-technical IRC channel on irc.freenode.net.
 If you do report problems then please try to send high quality
 feedback. If you don't provide vital information to help us track down
 the problem then you will probably be ignored.  All bug reports should
-be filed under the Samba 3.4 product in the project's Bugzilla
+be filed under the Samba 3.5 product in the project's Bugzilla
 database (https://bugzilla.samba.org/).
 
 


-- 
Samba Shared Repository


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

2009-10-09 Thread Simo Sorce
The branch, v3-5-test has been updated
   via  030fbf2... Fix builds with external talloc
  from  b638a21... WHATSNEW: Update WHATSNEW.

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


- Log -
commit 030fbf28fc963065853c08015c34827656c29bfd
Author: Simo Sorce i...@samba.org
Date:   Fri Oct 9 13:14:08 2009 -0400

Fix builds with external talloc

Make sure we do not reference our internal talloc directly.
Let configure define what talloc.h file to use so that builds that use an
extrenal talloc do not include 2 different versions of the talloc header.

---

Summary of changes:
 lib/util/talloc_stack.h |2 +-
 nsswitch/libwbclient/wbclient.c |4 ++--
 source3/include/includes.h  |2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/talloc_stack.h b/lib/util/talloc_stack.h
index bb22b8a..7776711 100644
--- a/lib/util/talloc_stack.h
+++ b/lib/util/talloc_stack.h
@@ -35,7 +35,7 @@
 #ifndef _TALLOC_STACK_H
 #define _TALLOC_STACK_H
 
-#include ../talloc/talloc.h
+#include talloc.h
 
 /*
  * Create a new talloc stack frame.
diff --git a/nsswitch/libwbclient/wbclient.c b/nsswitch/libwbclient/wbclient.c
index f4620ff..9a1e770 100644
--- a/nsswitch/libwbclient/wbclient.c
+++ b/nsswitch/libwbclient/wbclient.c
@@ -23,8 +23,8 @@
 /* Required Headers */
 
 #include replace.h
-#include lib/talloc/talloc.h
-#include lib/tevent/tevent.h
+#include talloc.h
+#include tevent.h
 #include libwbclient.h
 
 /* From wb_common.c */
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 453c8b3..b3446cb 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -621,7 +621,7 @@ struct smb_iconv_convenience *lp_iconv_convenience(void 
*lp_ctx);
 #include tdb.h
 #include util_tdb.h
 
-#include ../talloc/talloc.h
+#include talloc.h
 
 #include event.h
 #include ../lib/util/tevent_unix.h


-- 
Samba Shared Repository


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

2009-10-09 Thread Volker Lendecke
The branch, v3-5-test has been updated
   via  1f1c293... s3: Fix a memleak reported by dmarkey
  from  030fbf2... Fix builds with external talloc

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


- Log -
commit 1f1c293d541fc2ab6dff5932ae1c9ffc1e8b58d3
Author: Volker Lendecke v...@samba.org
Date:   Fri Oct 9 22:58:14 2009 +0200

s3: Fix a memleak reported by dmarkey

---

Summary of changes:
 nsswitch/libwbclient/wbc_sid.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/libwbclient/wbc_sid.c b/nsswitch/libwbclient/wbc_sid.c
index b1ecba3..99c9d8e 100644
--- a/nsswitch/libwbclient/wbc_sid.c
+++ b/nsswitch/libwbclient/wbc_sid.c
@@ -248,9 +248,13 @@ wbcErr wbcLookupSid(const struct wbcDomainSid *sid,
if (WBC_ERROR_IS_OK(wbc_status)) {
if (pdomain != NULL) {
*pdomain = domain;
+   } else {
+   TALLOC_FREE(domain);
}
if (pname != NULL) {
*pname = name;
+   } else {
+   TALLOC_FREE(name);
}
if (pname_type != NULL) {
*pname_type = name_type;


-- 
Samba Shared Repository


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

2009-10-08 Thread Volker Lendecke
The branch, v3-5-test has been updated
   via  c6c0907... s3: Fix shadow copy display on Windows 7
  from  d294fd3... Exteded RAW-RENAME test to catch regressions in bug 
6781. Jeremy.

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


- Log -
commit c6c0907950030db90331e5e0ac96a68619fe4a73
Author: Volker Lendecke v...@samba.org
Date:   Thu Oct 8 14:02:39 2009 +0200

s3: Fix shadow copy display on Windows 7

Windows 7 is a bit more picky on our NT_STATUS_BUFFER_TOO_SMALL. Announce 
the
right buffer size, the same amount we later check for.

---

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index cf955d9..0cc05db 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -2036,7 +2036,7 @@ static void call_nt_transact_ioctl(connection_struct 
*conn,
}
 
/* needed_data_count 4 bytes */
-   SIVAL(pdata,8,labels_data_count);
+   SIVAL(pdata, 8, labels_data_count+4);
 
cur_pdata+=12;
 


-- 
Samba Shared Repository


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

2009-10-08 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  59676ec... Cope with old CIFSFS clients that use SMBunlink to 
remove symlinks instead of trans2:posix_unlink. Jeremy.
  from  c6c0907... s3: Fix shadow copy display on Windows 7

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


- Log -
commit 59676ec21f022a2af2f72385d8ea368f2a60ad3b
Author: Jeremy Allison j...@samba.org
Date:   Thu Oct 8 15:36:36 2009 -0700

Cope with old CIFSFS clients that use SMBunlink to remove
symlinks instead of trans2:posix_unlink.
Jeremy.

---

Summary of changes:
 source3/smbd/reply.c |   13 +++--
 1 files changed, 11 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index abc3163..2365ed1 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -2383,6 +2383,8 @@ static NTSTATUS do_unlink(connection_struct *conn,
files_struct *fsp;
uint32 dirtype_orig = dirtype;
NTSTATUS status;
+   int ret;
+   bool posix_paths = lp_posix_pathnames();
 
DEBUG(10,(do_unlink: %s, dirtype = %d\n,
  smb_fname_str_dbg(smb_fname),
@@ -2392,7 +2394,12 @@ static NTSTATUS do_unlink(connection_struct *conn,
return NT_STATUS_MEDIA_WRITE_PROTECTED;
}
 
-   if (SMB_VFS_LSTAT(conn, smb_fname) != 0) {
+   if (posix_paths) {
+   ret = SMB_VFS_LSTAT(conn, smb_fname);
+   } else {
+   ret = SMB_VFS_LSTAT(conn, smb_fname);
+   }
+   if (ret != 0) {
return map_nt_error_from_unix(errno);
}
 
@@ -2479,7 +2486,9 @@ static NTSTATUS do_unlink(connection_struct *conn,
 FILE_SHARE_NONE,   /* share_access */
 FILE_OPEN, /* create_disposition*/
 FILE_NON_DIRECTORY_FILE, /* create_options */
-FILE_ATTRIBUTE_NORMAL, /* file_attributes */
+   /* file_attributes */
+posix_paths ? FILE_FLAG_POSIX_SEMANTICS|0777 :
+   FILE_ATTRIBUTE_NORMAL,
 0, /* oplock_request */
 0, /* allocation_size */
 NULL,  /* sd */


-- 
Samba Shared Repository


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

2009-10-08 Thread Björn Jacke
The branch, v3-5-test has been updated
   via  abdadc2... s3: make linking of libwbclient --as-needed safe
   via  ad21e5e... s3:Makefile: another attempt to fix the wbclient 
dependency
   via  3a1a181... s3:Makefile: another attempt to fix the netapi dependency
   via  4adb0ac... s3:Makefile: another attempt to fix the tdb dependency
   via  3338543... s3:Makefile: another attempt to fix the talloc dependency
   via  f2257d8... Revert s3:Makefile: fix talloc dependencies with static 
build (2nd try)
   via  c9ee01b... Revert s3:Makefile: fix libtdb dependencies with static 
build
   via  7074dc9... Revert s3:Makefile: fix libwbclient dependencies with 
static build
   via  7928c73... Revert s3:Makefile: fix libnetapi dependencies with 
static build
  from  59676ec... Cope with old CIFSFS clients that use SMBunlink to 
remove symlinks instead of trans2:posix_unlink. Jeremy.

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


- Log -
commit abdadc23e3bb196b37327920bcdc79a137c2e9db
Author: Björn Jacke b...@sernet.de
Date:   Fri Oct 9 00:21:34 2009 +0200

s3: make linking of libwbclient --as-needed safe

Partly fixes #6791. Thanks to Buchan Milne!

commit ad21e5e9076e9621b19d9fae50ae9b44e85c6628
Author: Björn Jacke b...@sernet.de
Date:   Sun Oct 4 01:40:34 2009 +0200

s3:Makefile: another attempt to fix the wbclient dependency

in the dependencies we always used a variable that was not jet defined.

commit 3a1a181d7f2925cc9e8f867d126616a6f466a2dc
Author: Björn Jacke b...@sernet.de
Date:   Sun Oct 4 01:33:12 2009 +0200

s3:Makefile: another attempt to fix the netapi dependency

in the dependencies we always used a variable that was not jet defined.

commit 4adb0ac3d8f60c3b421bfce7e5946b087b55e0d9
Author: Björn Jacke b...@sernet.de
Date:   Sun Oct 4 01:30:43 2009 +0200

s3:Makefile: another attempt to fix the tdb dependency

in the dependencies we always used a variable that was not jet defined.

commit 33385434119f178e46c9f6496b8c2a2d4062bb05
Author: Björn Jacke b...@sernet.de
Date:   Sun Oct 4 01:20:38 2009 +0200

s3:Makefile: another attempt to fix the talloc dependency

in the dependencies we always used a variable that was not jet defined.

commit f2257d821e380f5adba5094b1d30c12df10cb72c
Author: Björn Jacke b...@sernet.de
Date:   Sat Oct 3 23:04:12 2009 +0200

Revert s3:Makefile: fix talloc dependencies with static build (2nd try)

This reverts commit b60d87c20712bd3d83166bd13fe1d2bab0315609.

commit c9ee01ba19b955b2f7389a37e275ac54117f0bba
Author: Björn Jacke b...@sernet.de
Date:   Sat Oct 3 23:00:37 2009 +0200

Revert s3:Makefile: fix libtdb dependencies with static build

This reverts commit da15726630b0f796aef52a20d96898e269058456.

commit 7074dc9b688aa66c50f4fe7949af85d1a7eb1432
Author: Björn Jacke b...@sernet.de
Date:   Sat Oct 3 22:53:52 2009 +0200

Revert s3:Makefile: fix libwbclient dependencies with static build

This reverts commit d7795f2afa3779399fe9e7b4f050d19a412f8bcd.

commit 7928c737598cc407417a32d2fe6d95c0d8da97d0
Author: Björn Jacke b...@sernet.de
Date:   Sat Oct 3 22:53:15 2009 +0200

Revert s3:Makefile: fix libnetapi dependencies with static build

This reverts commit 110897a057af01f3c01a1783e06080b54631ba2d.

---

Summary of changes:
 source3/Makefile.in |  142 +-
 1 files changed, 71 insertions(+), 71 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 5d98f64..694985f 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -69,6 +69,7 @@ krb5li...@krb5_libs@
 ldap_li...@ldap_libs@
 nscd_li...@nscd_libs@
 uuid_li...@uuid_libs@
+libwbclie...@libwbclient_static@ @LIBWBCLIENT_SHARED@
 libwbclient_li...@libwbclient_libs@
 winbind_nss_extra_li...@winbind_nss_extra_libs@
 winbind_nss_pthre...@winbind_nss_pthread@
@@ -76,8 +77,11 @@ pam_winbind_extra_li...@pam_winbind_extra_libs@
 dnssd_li...@dnssd_libs@
 avahi_li...@avahi_libs@
 popt_li...@poptlibs@
+libtall...@libtalloc_static@ @LIBTALLOC_SHARED@
 libtalloc_li...@libtalloc_libs@
+libt...@libtdb_static@ @LIBTDB_SHARED@
 libtdb_li...@libtdb_libs@
+libneta...@libnetapi_static@ @LIBNETAPI_SHARED@
 libnetapi_li...@libnetapi_libs@
 libsmbclient_li...@libsmbclient_libs@
 libsmbsharemodes_li...@libsmbsharemodes_libs@
@@ -1530,7 +1534,7 @@ bin/.dummy:
  dir=bin $(MAKEDIR); fi
@:  $@ || :  $@ # what a fancy emoticon!
 
-bin/s...@exeext@: $(BINARY_PREREQS) $(SMBD_OBJ) libtalloc libtdb libwbclient 
@BUILD_POPT@
+bin/s...@exeext@: $(BINARY_PREREQS) $(SMBD_OBJ) $(LIBTALLOC) $(LIBTDB) 
$(LIBWBCLIENT) @BUILD_POPT@
@echo Linking $@
@$(CC) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LDAP_LIBS) @SMBD_FAM_LIBS@ \

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

2009-10-08 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  4e64865... s3-winbindd: NDR_WBINT_CHECKMACHINEACCOUNT should not be 
cacheable.
   via  8716c4a... s3-winbindd: libwbclient: implement secure channel 
verification for specific domains in wbcCheckTrustCredentials().
   via  69ba747... wbinfo: allow to check trusts via wbinfo -t --domain 
DOMAINNAME.
   via  63acae3... libwbclient: implement secure channel verification for 
specific domains in wbcCheckTrustCredentials().
   via  5ba5b5e... s3-netlogon: pure cosmetic indent fixes in 
_netr_LogonControl2Ex().
  from  abdadc2... s3: make linking of libwbclient --as-needed safe

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


- Log -
commit 4e64865f522506b5b92b7ce0f05bac7ca7de6de3
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 8 10:35:02 2009 +0200

s3-winbindd: NDR_WBINT_CHECKMACHINEACCOUNT should not be cacheable.

Guenther
(cherry picked from commit efaa98e82438688ca178dc7d0622965933abc95c)

commit 8716c4ae193a49ea8494e04296f6d95126c0e265
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 6 17:46:25 2009 +0200

s3-winbindd: libwbclient: implement secure channel verification for 
specific domains in wbcCheckTrustCredentials().

Guenther
(cherry picked from commit 3c3725a340ffe20ab679cf2f9d41ccd0b51b4b3a)

commit 69ba747df1b861da70da6682e36b095ac565f83e
Author: Günther Deschner g...@samba.org
Date:   Wed Oct 7 10:43:53 2009 +0200

wbinfo: allow to check trusts via wbinfo -t --domain DOMAINNAME.

Guenther
(cherry picked from commit 7b3501200c55d7844c4d697456dbfa2b86cfdcc8)

commit 63acae34cfe65577437b75e668d22400eb47a88c
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 6 17:45:24 2009 +0200

libwbclient: implement secure channel verification for specific domains in 
wbcCheckTrustCredentials().

Guenther
(cherry picked from commit 2df47b0a54ad0a973b81911ee507ab50555b24a6)

commit 5ba5b5e7a1a66472505b3a3fb3d83db5180da3ee
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 6 17:50:15 2009 +0200

s3-netlogon: pure cosmetic indent fixes in _netr_LogonControl2Ex().

Guenther
(cherry picked from commit 3d3134a7d6a4d49b891a446f6cc7b38fd953739a)

---

Summary of changes:
 nsswitch/libwbclient/wbc_pam.c |   14 +--
 nsswitch/libwbclient/wbclient.h|4 +-
 nsswitch/wbinfo.c  |   18 ++-
 source3/rpc_server/srv_netlog_nt.c |  140 
 source3/winbindd/winbindd_cache.c  |1 +
 source3/winbindd/winbindd_check_machine_acct.c |   11 ++-
 source3/winbindd/winbindd_dual_srv.c   |8 +-
 7 files changed, 105 insertions(+), 91 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/libwbclient/wbc_pam.c b/nsswitch/libwbclient/wbc_pam.c
index 33044b2..4cd212a 100644
--- a/nsswitch/libwbclient/wbc_pam.c
+++ b/nsswitch/libwbclient/wbc_pam.c
@@ -502,18 +502,14 @@ wbcErr wbcCheckTrustCredentials(const char *domain,
struct winbindd_response response;
wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
 
-   if (domain) {
-   /*
-* the current protocol doesn't support
-* specifying a domain
-*/
-   wbc_status = WBC_ERR_NOT_IMPLEMENTED;
-   BAIL_ON_WBC_ERROR(wbc_status);
-   }
-
ZERO_STRUCT(request);
ZERO_STRUCT(response);
 
+   if (domain) {
+   strncpy(request.domain_name, domain,
+   sizeof(request.domain_name)-1);
+   }
+
/* Send request */
 
wbc_status = wbcRequestResponse(WINBINDD_CHECK_MACHACC,
diff --git a/nsswitch/libwbclient/wbclient.h b/nsswitch/libwbclient/wbclient.h
index a87cad3..4dc6d23 100644
--- a/nsswitch/libwbclient/wbclient.h
+++ b/nsswitch/libwbclient/wbclient.h
@@ -1183,9 +1183,7 @@ wbcErr wbcResolveWinsByIP(const char *ip, char **name);
 /**
  * @brief Trigger a verification of the trust credentials of a specific domain
  *
- * @param *domain  The name of the domain, only NULL for the default 
domain is
- * supported yet. Other values than NULL will result in
- * WBC_ERR_NOT_IMPLEMENTED.
+ * @param *domain  The name of the domain.
  * @param errorOutput details on WBC_ERR_AUTH_ERROR
  *
  * @return #wbcErr
diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index a80b69f..7410a74 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -724,15 +724,23 @@ static bool wbinfo_dsgetdcname(const char *domain_name, 
uint32_t flags)
 
 /* Check trust account password */
 
-static bool wbinfo_check_secret(void)
+static bool wbinfo_check_secret(const char *domain)
 {
wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
struct 

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

2009-10-07 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  fcd6a57... Correct fix for bug 6781 - Cannot rename subfolders in 
Explorer view with recent versions of Samba. Without this fix, renaming a 
directory ./a to ./b, whilst a directory ./aa was already open would fail. 
Jeremy.
  from  22d2628... Test creating and deleting a bad symlink using the POSIX 
calls. Ensure we don't regress on bug 6769. Jeremy.

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


- Log -
commit fcd6a57d310a55cda7ff6248a59a99d50d925bed
Author: Jeremy Allison j...@samba.org
Date:   Wed Oct 7 15:14:50 2009 -0700

Correct fix for bug 6781 - Cannot rename subfolders in Explorer view with 
recent versions of Samba.
Without this fix, renaming a directory ./a to ./b, whilst a directory ./aa 
was already open
would fail.
Jeremy.

---

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index 146d809..bf21605 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -430,14 +430,12 @@ bool file_find_subpath(files_struct *dir_fsp)
fsp-fsp_name-base_name);
 
if (strnequal(d_fullname, d1_fullname, dlen)) {
-   int d1_len = strlen(d1_fullname);
-
/*
 * If the open file is a second file handle to the
 * same name or is a stream on the original file, then
 * don't return true.
 */
-   if (d1_len == dlen) {
+   if (d1_fullname[dlen] != '/') {
TALLOC_FREE(d1_fullname);
continue;
}


-- 
Samba Shared Repository


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

2009-10-07 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  48fee26... Make the logic a lot clearer and fix the comment to 
match. Jeremy
  from  fcd6a57... Correct fix for bug 6781 - Cannot rename subfolders in 
Explorer view with recent versions of Samba. Without this fix, renaming a 
directory ./a to ./b, whilst a directory ./aa was already open would fail. 
Jeremy.

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


- Log -
commit 48fee26ab0a7b33fa97032b85bebbb4dc7fb8c68
Author: Jeremy Allison j...@samba.org
Date:   Wed Oct 7 15:39:38 2009 -0700

Make the logic a lot clearer and fix the comment to match.
Jeremy

---

Summary of changes:
 source3/smbd/files.c |   25 ++---
 1 files changed, 10 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index bf21605..f7509d7 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -429,24 +429,19 @@ bool file_find_subpath(files_struct *dir_fsp)
fsp-conn-connectpath,
fsp-fsp_name-base_name);
 
-   if (strnequal(d_fullname, d1_fullname, dlen)) {
-   /*
-* If the open file is a second file handle to the
-* same name or is a stream on the original file, then
-* don't return true.
-*/
-   if (d1_fullname[dlen] != '/') {
-   TALLOC_FREE(d1_fullname);
-   continue;
-   }
-
+   /*
+* If the open file has a path that is a longer
+* component, then it's a subpath.
+*/
+   if (strnequal(d_fullname, d1_fullname, dlen) 
+   (d1_fullname[dlen] == '/')) {
TALLOC_FREE(d1_fullname);
-   ret = true;
-   goto out;
+   TALLOC_FREE(d_fullname);
+   return true;
}
TALLOC_FREE(d1_fullname);
-   } 
- out:
+   }
+
TALLOC_FREE(d_fullname);
return ret;
 }


-- 
Samba Shared Repository


<    3   4   5   6   7   8   9   >