[Samba] More Samba PDC problems

2011-02-15 Thread Robert Moskowitz
So I back up my settings for user1, by stopping smb and nmb on the 
server (I have to do this, rather than disconnect it, as it is also the 
DHCP server).  I was able to get in with the local cached settings and 
back them up.


I then logged out, started smb and nmb and logged in again.  I got 
warned that there were no settings and local settings were being used.  
I then logged out, and saw the settings saved on the server in the 
.../profiles/user1/ directory.


I go to log in again and get an error:

Windows cannot connect to the domain, either becuase the domain 
controller is down or otherwise unavailable ...  or because your 
computer account was not found


smb and nmb are running.  I try restarting them, no difference.

I had created the computer account with the script:

add machine script = /usr/sbin/useradd -d /dev/null -g 99 -s /bin/false 
-M %u


where %u is the computer name followed by a $ (this is how the other 
computer was set up).


I don't see the computer account as the problem, I did get in the first 
time.


So I look at the permissions for .../profiles/user1 and see they are 
root:users, I change this down the tree to user1:users and no 
difference.  I mv .../profiles/user1 to user1old and try again, no 
difference.


Why might I be getting this error?


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] xp to samba domain member

2011-02-15 Thread Robert Fitzpatrick
I have a Samba PDC setup on FreeBSD with a WinXP, Win7, 2003 server and
Ubuntu Linux all joined. All works from each workstation except for my
Windows XP unable to access the Linux member. It can access all other
computers except that one while Win7 and 2003 server have no problems
accessing this Samba Linux member. The Linux member is running Samba
3.4.7...

 [global]
   netbios name = MEDIA
   workgroup = FITZ
   security = DOMAIN
   username map = /etc/samba/smbusers
   log level = 10
   syslog = 0
   log file = /var/log/samba/%m
   max log size = 50
   smb ports = 139
   name resolve order = wins bcast hosts
   printcap name = CUPS
   wins server = 192.168.1.21
   winbind trusted domains only = Yes
   printer admin = root
   printing = cups

This WinXP client has SP3 and joined the same Samba PDC domain FITZ as
all other workstations without a problem. It can access all other
computers and shares except this one Linux member and the error is 'The
network path was not found'. I have tried shutting down firewall and
virus protections, checked the event viewer, no help.

Anyone know what can cause this type of problem between WinXP SP3 and a
Samba member? Perhaps I need a registry entry like Win7?
--
Robert rob...@webtent.org
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Solved - Re: More Samba PDC problems

2011-02-15 Thread Robert Moskowitz



On 02/15/2011 09:24 AM, Robert Moskowitz wrote:
So I back up my settings for user1, by stopping smb and nmb on the 
server (I have to do this, rather than disconnect it, as it is also 
the DHCP server). I was able to get in with the local cached settings 
and back them up.


I then logged out, started smb and nmb and logged in again. I got 
warned that there were no settings and local settings were being used. 
I then logged out, and saw the settings saved on the server in the 
.../profiles/user1/ directory.


I go to log in again and get an error:

Windows cannot connect to the domain, either becuase the domain 
controller is down or otherwise unavailable ... or because your 
computer account was not found


smb and nmb are running. I try restarting them, no difference.

I had created the computer account with the script:

add machine script = /usr/sbin/useradd -d /dev/null -g 99 -s 
/bin/false -M %u


where %u is the computer name followed by a $ (this is how the other 
computer was set up).


I don't see the computer account as the problem, I did get in the 
first time.


It seems this was the problem. Running the script is NOT the same as 
what happens when the computer is connected to the domain. I bet there 
is a password in there somewhere...


I deleted the computer account and went through the steps, logged in 
locally as Administrator to move the system to a workgroup then back to 
the domain. I only have a few systems, but this would be an APPSOLUTE 
PAIN with a number of systems. Now I have to find out how to back up the 
/etc/passwd shadow file so if I loose the computer again, I can 'easily' 
rebuild things.




So I look at the permissions for .../profiles/user1 and see they are 
root:users, I change this down the tree to user1:users and no 
difference. I mv .../profiles/user1 to user1old and try again, no 
difference.


Why might I be getting this error?



--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Lost my Samba PDC, trying to rebuild

2011-02-15 Thread Robert Moskowitz

On 02/14/2011 12:44 AM, t...@tms3.com wrote:





--- Original message ---
*Subject:* Re: [Samba] Lost my Samba PDC, trying to rebuild
*From:* Robert Moskowitz r...@htt-consult.com
*To:* t...@tms3.com
*Cc:* samba@lists.samba.org
*Date:* Sunday, 13/02/2011 9:39 PM

On 02/13/2011 11:42 PM, t...@tms3.com mailto:t...@tms3.com wrote:




The problem comes with users. The users were user.HOME in
'Documents
and Settings'. But so far on the one computer I have tried
with the one
user I have on that computer, it is creating a new profile for
user.HDA. What controls the profile directory on the computer
(btw, the
OS is XP)? What do I need to do for it to use the profile of
user.HOME?

Disconnect the workstations from the network. Log in with the old
domain user account. Run the file and programs transfer wizard
(Start-All-Programs- Accessories...IIRC) and save the profile
transfer locally. Log in with new domain user and import the
saved profile.


I disconnected the ethernet.  I am logging in as the user for domain 
HOME.  I get the error:
Hmmm...you need to do a reboot without network connectivity on the 
Windows box. The passwords are cached locally.



I used this to set up another computer properly.  Now to go back to the 
problem child again...





The system cannot log you on now because the domain HOME is not 
available.


Before all this, if I did not have network connectivity, I could 
still log in locally.  Hmmm, let's try disconnecting the server 
instead...  No dice as the server is also the DHCP server.


Next let's stop smb and nmb on the server, but leave it 
connected  Just took longer, but still no login.


So now why is it requiring the domain to be present to log in.  No 
local log in?


So I restarted the services and got logged in.

If I log in locally as administrator, is there anyway to copy another 
user's files and settings?






-- 
To unsubscribe from this list go to the following URL and

read the
instructions: https://lists.samba.org/mailman/options/samba





--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[SCM] Samba Shared Repository - branch master updated

2011-02-15 Thread Stefan Metzmacher
The branch, master has been updated
   via  3c5f537 s4:drsuapi/getncchanges: make sure we don't process 
filteres objects more than once
  from  18926e5 Fix private libdir and codepages paths

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


- Log -
commit 3c5f537302294dc5306cffed5dcd57221ac2c96d
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 15 08:41:23 2011 +0100

s4:drsuapi/getncchanges: make sure we don't process filteres objects more 
than once

metze

Autobuild-User: Stefan Metzmacher me...@samba.org
Autobuild-Date: Tue Feb 15 09:46:55 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/rpc_server/drsuapi/getncchanges.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/rpc_server/drsuapi/getncchanges.c 
b/source4/rpc_server/drsuapi/getncchanges.c
index 822e628..b7431b6 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -1044,7 +1044,7 @@ static WERROR getncchanges_change_master(struct 
drsuapi_bind_state *b_state,
 struct drsuapi_getncchanges_state {
struct GUID *guids;
uint32_t num_records;
-   uint32_t num_sent;
+   uint32_t num_processed;
struct ldb_dn *ncRoot_dn;
bool is_schema_nc;
uint64_t min_usn;
@@ -1518,7 +1518,7 @@ WERROR dcesrv_drsuapi_DsGetNCChanges(struct 
dcesrv_call_state *dce_call, TALLOC_
 */
max_links = lpcfg_parm_int(dce_call-conn-dce_ctx-lp_ctx, NULL, 
drs, max link sync, 1500);
 
-   for (i=getnc_state-num_sent;
+   for (i=getnc_state-num_processed;
 igetnc_state-num_records 
 !null_scope 
 (r-out.ctr-ctr6.object_count  max_objects);
@@ -1614,7 +1614,7 @@ WERROR dcesrv_drsuapi_DsGetNCChanges(struct 
dcesrv_call_state *dce_call, TALLOC_
talloc_free(msg_dn);
}
 
-   getnc_state-num_sent += r-out.ctr-ctr6.object_count;
+   getnc_state-num_processed = i;
 
r-out.ctr-ctr6.nc_object_count = getnc_state-num_records;
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-02-15 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  738b2ab s4: Don't grant level II oplock to a file with byte-range 
locks.
  from  3c5f537 s4:drsuapi/getncchanges: make sure we don't process 
filteres objects more than once

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


- Log -
commit 738b2abe784bc38bdaf1abc913a401e0e732e188
Author: Pavel Shilovsky pias...@etersoft.ru
Date:   Mon Jan 31 20:20:24 2011 +0300

s4: Don't grant level II oplock to a file with byte-range locks.

Signed-off-by: Pavel Shilovsky pias...@etersoft.ru
Signed-off-by: Matthias Dieter Wallnöfer m...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Feb 15 11:09:17 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/ntvfs/common/brlock.c |   10 ++
 source4/ntvfs/common/brlock.h |3 +++
 source4/ntvfs/common/brlock_tdb.c |   29 -
 source4/ntvfs/posix/pvfs_open.c   |   12 +++-
 4 files changed, 52 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/ntvfs/common/brlock.c b/source4/ntvfs/common/brlock.c
index a5bc5c1..154494e 100644
--- a/source4/ntvfs/common/brlock.c
+++ b/source4/ntvfs/common/brlock.c
@@ -125,3 +125,13 @@ NTSTATUS brl_close(struct brl_context *brl,
 {
return ops-brl_close(brl, brlh);
 }
+
+/*
+ Get a number of locks associated with a open file.
+*/
+NTSTATUS brl_count(struct brl_context *brl,
+  struct brl_handle *brlh,
+  int *count)
+{
+   return ops-brl_count(brl, brlh, count);
+}
diff --git a/source4/ntvfs/common/brlock.h b/source4/ntvfs/common/brlock.h
index 75f142b..e5e618d 100644
--- a/source4/ntvfs/common/brlock.h
+++ b/source4/ntvfs/common/brlock.h
@@ -46,6 +46,9 @@ struct brlock_ops {
 enum brl_type );
NTSTATUS (*brl_close)(struct brl_context *,
  struct brl_handle *);
+   NTSTATUS (*brl_count)(struct brl_context *,
+ struct brl_handle *,
+ int *count);
 };
 
 
diff --git a/source4/ntvfs/common/brlock_tdb.c 
b/source4/ntvfs/common/brlock_tdb.c
index df95d4c..07e7c1a 100644
--- a/source4/ntvfs/common/brlock_tdb.c
+++ b/source4/ntvfs/common/brlock_tdb.c
@@ -738,6 +738,32 @@ static NTSTATUS brl_tdb_close(struct brl_context *brl,
return status;
 }
 
+static NTSTATUS brl_tdb_count(struct brl_context *brl, struct brl_handle *brlh,
+ int *count)
+{
+   TDB_DATA kbuf, dbuf;
+
+   kbuf.dptr = brlh-key.data;
+   kbuf.dsize = brlh-key.length;
+   *count = 0;
+
+   if (tdb_chainlock(brl-w-tdb, kbuf) != 0) {
+   return NT_STATUS_INTERNAL_DB_CORRUPTION;
+   }
+
+   dbuf = tdb_fetch(brl-w-tdb, kbuf);
+   if (!dbuf.dptr) {
+   tdb_chainunlock(brl-w-tdb, kbuf);
+   return NT_STATUS_OK;
+   }
+
+   *count = dbuf.dsize / sizeof(struct lock_struct);
+
+   free(dbuf.dptr);
+   tdb_chainunlock(brl-w-tdb, kbuf);
+
+   return NT_STATUS_OK;
+}
 
 static const struct brlock_ops brlock_tdb_ops = {
.brl_init   = brl_tdb_init,
@@ -746,7 +772,8 @@ static const struct brlock_ops brlock_tdb_ops = {
.brl_unlock = brl_tdb_unlock,
.brl_remove_pending = brl_tdb_remove_pending,
.brl_locktest   = brl_tdb_locktest,
-   .brl_close  = brl_tdb_close
+   .brl_close  = brl_tdb_close,
+   .brl_count  = brl_tdb_count
 };
 
 
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index da32c7f..08a54f8 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -1197,7 +1197,7 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs,
struct pvfs_file *f;
struct ntvfs_handle *h;
NTSTATUS status;
-   int fd;
+   int fd, count;
struct odb_lock *lck;
uint32_t create_options;
uint32_t create_options_must_ignore_mask;
@@ -1569,6 +1569,16 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs,
 
f-handle-fd = fd;
 
+   status = brl_count(f-pvfs-brl_context, f-brl_handle, count);
+   if (!NT_STATUS_IS_OK(status)) {
+   talloc_free(lck);
+   return status;
+   }
+
+   if (count != 0) {
+   oplock_level = OPLOCK_NONE;
+   }
+
/* now really mark the file as open */
status = odb_open_file(lck, f-handle, name-full_name,
   f-handle-fd, name-dos.write_time,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-02-15 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  7312dac s4:acl LDB module - interpret userAccountControl as 
uint32_t
   via  6bfaa4c libcli/security - fix two output format specifiers
  from  738b2ab s4: Don't grant level II oplock to a file with byte-range 
locks.

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


- Log -
commit 7312dacb6346ced62557ed2cc6a733907c7b3401
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Feb 11 15:10:04 2011 +0100

s4:acl LDB module - interpret userAccountControl as uint32_t

This is the same way as it is done in the samldb LDB module.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Feb 15 12:08:26 CET 2011 on sn-devel-104

commit 6bfaa4c10903dc5ccbad5729cba48cdf4cc41b79
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Feb 10 10:17:33 2011 +0100

libcli/security - fix two output format specifiers

---

Summary of changes:
 libcli/security/create_descriptor.c  |2 +-
 libcli/security/display_sec.c|2 +-
 source4/dsdb/samdb/ldb_modules/acl.c |6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/security/create_descriptor.c 
b/libcli/security/create_descriptor.c
index 9e348a7..62919a1 100644
--- a/libcli/security/create_descriptor.c
+++ b/libcli/security/create_descriptor.c
@@ -226,7 +226,7 @@ static struct security_acl *process_user_acl(TALLOC_CTX 
*mem_ctx,
return NULL;
 
tmp_acl-revision = acl-revision;
-   DEBUG(6,(__location__ : acl revision %u\n, acl-revision));
+   DEBUG(6,(__location__ : acl revision %d\n, acl-revision));
 
co = dom_sid_parse_talloc(tmp_ctx,  SID_CREATOR_OWNER);
cg = dom_sid_parse_talloc(tmp_ctx,  SID_CREATOR_GROUP);
diff --git a/libcli/security/display_sec.c b/libcli/security/display_sec.c
index f45b770..3d60e42 100644
--- a/libcli/security/display_sec.c
+++ b/libcli/security/display_sec.c
@@ -235,7 +235,7 @@ void display_sec_acl(struct security_acl *sec_acl)
 {
int i;
 
-   printf(\tACL\tNum ACEs:\t%d\trevision:\t%x\n,
+   printf(\tACL\tNum ACEs:\t%u\trevision:\t%x\n,
 sec_acl-num_aces, sec_acl-revision); 
printf(\t---\n);
 
diff --git a/source4/dsdb/samdb/ldb_modules/acl.c 
b/source4/dsdb/samdb/ldb_modules/acl.c
index a96ea37..20f09a5 100644
--- a/source4/dsdb/samdb/ldb_modules/acl.c
+++ b/source4/dsdb/samdb/ldb_modules/acl.c
@@ -436,7 +436,7 @@ static int acl_sDRightsEffective(struct ldb_module *module,
 static int acl_validate_spn_value(TALLOC_CTX *mem_ctx,
  struct ldb_context *ldb,
  const char *spn_value,
- int userAccountControl,
+ uint32_t userAccountControl,
  const char *samAccountName,
  const char *dnsHostName,
  const char *netbios_name,
@@ -544,7 +544,7 @@ static int acl_check_spn(TALLOC_CTX *mem_ctx,
struct ldb_result *netbios_res;
struct ldb_message_element *el;
struct ldb_dn *partitions_dn = samdb_partitions_dn(ldb, tmp_ctx);
-   int userAccountControl;
+   uint32_t userAccountControl;
const char *samAccountName;
const char *dnsHostName;
const char *netbios_name;
@@ -597,7 +597,7 @@ static int acl_check_spn(TALLOC_CTX *mem_ctx,
return ret;
}
 
-   userAccountControl = ldb_msg_find_attr_as_int(acl_res-msgs[0], 
userAccountControl, 0);
+   userAccountControl = ldb_msg_find_attr_as_uint(acl_res-msgs[0], 
userAccountControl, 0);
dnsHostName = ldb_msg_find_attr_as_string(acl_res-msgs[0], 
dnsHostName, NULL);
samAccountName = ldb_msg_find_attr_as_string(acl_res-msgs[0], 
samAccountName, NULL);
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-02-15 Thread Günther Deschner
The branch, master has been updated
   via  0bfdb3e s3-selftest: move all skipped test to skiplist.
   via  a32f0ff s3-waf: TLDAP is only needed by pdb_ads (and smbtorture).
   via  ca57448 s3: no need to globally include intl.h.
   via  c575d30 s3-selftest: when skipping tests, use the selftest/skip 
file.
  from  7312dac s4:acl LDB module - interpret userAccountControl as 
uint32_t

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


- Log -
commit 0bfdb3e2495a1f40ead2ee6b8ad70614f43fc939
Author: Günther Deschner g...@samba.org
Date:   Tue Feb 15 11:15:19 2011 +0100

s3-selftest: move all skipped test to skiplist.

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Tue Feb 15 12:52:22 CET 2011 on sn-devel-104

commit a32f0ff2f095350197ffe3776c125681571e9f83
Author: Günther Deschner g...@samba.org
Date:   Mon Feb 7 14:27:55 2011 +0100

s3-waf: TLDAP is only needed by pdb_ads (and smbtorture).

Guenther

commit ca574482b889d42d9e8fbc6bea62acaa4bc15137
Author: Günther Deschner g...@samba.org
Date:   Mon Feb 14 12:02:00 2011 +0100

s3: no need to globally include intl.h.

Guenther

commit c575d30a32092665d104a06a12139528730b1287
Author: Günther Deschner g...@samba.org
Date:   Mon Feb 14 11:29:00 2011 +0100

s3-selftest: when skipping tests, use the selftest/skip file.

Guenther

---

Summary of changes:
 source3/include/includes.h |1 -
 source3/param/loadparm.c   |2 +-
 source3/passdb/wscript_build   |2 +-
 source3/script/tests/test_posix_s3.sh  |   18 
 source3/script/tests/test_smbtorture_s3.sh |8 -
 source3/selftest/skip  |   41 ---
 source3/utils/net.h|1 +
 source3/wscript_build  |2 +-
 8 files changed, 28 insertions(+), 47 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/includes.h b/source3/include/includes.h
index 8c4fcfe..2c67a75 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -594,7 +594,6 @@ extern void *cmdline_lp_ctx;
 #include ../lib/util/memory.h
 #include ../lib/util/attr.h
 #include ../lib/util/tsort.h
-#include intl.h
 #include ../lib/util/dlinklist.h
 #include tdb.h
 #include util_tdb.h
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 04f3561..8a3d867 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -59,7 +59,7 @@
 
 #include ads.h
 #include ../librpc/gen_ndr/svcctl.h
-
+#include intl.h
 #include smb_signing.h
 #include dbwrap.h
 #include smbldap.h
diff --git a/source3/passdb/wscript_build b/source3/passdb/wscript_build
index be381c8..5a0b096 100644
--- a/source3/passdb/wscript_build
+++ b/source3/passdb/wscript_build
@@ -28,7 +28,7 @@ bld.SAMBA_MODULE('pdb_ldap',
 bld.SAMBA_MODULE('pdb_ads',
  subsystem='pdb',
  source=PDB_ADS_SRC,
- deps='LIBCLI_LDAP_NDR',
+ deps='LIBCLI_LDAP_NDR TLDAP',
  init_function='',
  internal_module=bld.SAMBA3_IS_STATIC_MODULE('pdb_ads'),
  enabled=bld.SAMBA3_IS_ENABLED_MODULE('pdb_ads'))
diff --git a/source3/script/tests/test_posix_s3.sh 
b/source3/script/tests/test_posix_s3.sh
index 36c21da..8cdb1e2 100755
--- a/source3/script/tests/test_posix_s3.sh
+++ b/source3/script/tests/test_posix_s3.sh
@@ -71,14 +71,6 @@ if test x$POSIX_SUBTESTS != x ; then
tests=$POSIX_SUBTESTS
 fi
 
-skipped=base.charset base.tcondev
-skipped=$skipped raw.acls raw.composite raw.context
-skipped=$skipped raw.ioctl
-skipped=$skipped raw.qfileinfo raw.qfsinfo
-skipped=$skipped raw.sfileinfo.base
-
-echo WARNING: Skipping tests $skipped
-
 ADDARGS=$ADDARGS --option=torture:sharedelay=10
 #ADDARGS=$ADDARGS --option=torture:writetimeupdatedelay=50
 
@@ -87,16 +79,6 @@ for t in $tests; do
 if [ ! -z $start -a $start != $t ]; then
continue;
 fi
-skip=0
-for s in $skipped; do
-   if [ x$s = x$t ]; then
-   skip=1;
-   break;
-   fi
-done
-if [ $skip = 1 ]; then
-   continue;
-fi
 start=
 name=$t
 if [ $t = base.delaywrite ]; then
diff --git a/source3/script/tests/test_smbtorture_s3.sh 
b/source3/script/tests/test_smbtorture_s3.sh
index 466855d..77ffc0c 100755
--- a/source3/script/tests/test_smbtorture_s3.sh
+++ b/source3/script/tests/test_smbtorture_s3.sh
@@ -35,14 +35,6 @@ tests=$tests GETADDRINFO POSIX UID-REGRESSION-TEST 
SHORTNAME-TEST
 tests=$tests LOCAL-BASE64 LOCAL-GENCACHE POSIX-APPEND
 tests=$tests LOCAL-string_to_sid
 
-skipped1=RANDOMIPC NEGNOWAIT NBENCH ERRMAPEXTRACT TRANS2SCAN NTTRANSSCAN
-skipped2=DENY1 DENY2 OPENATTR CASETABLE EATEST
-skipped3=MANGLE UTABLE 

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

2011-02-15 Thread Günther Deschner
The branch, v3-6-test has been updated
   via  4f9a0a0 s3-selftest: move all skipped test to skiplist.
   via  5103147 s3-waf: TLDAP is only needed by pdb_ads (and smbtorture).
   via  42ce00a s3: no need to globally include intl.h.
   via  acb9a56 s3-selftest: when skipping tests, use the selftest/skip 
file.
  from  3493ca6 Return NULL if tevent_add_fd() is passed a negative fd

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


- Log -
commit 4f9a0a08f6a6e8084a2e12c2abab6c751f498b3e
Author: Günther Deschner g...@samba.org
Date:   Tue Feb 15 11:15:19 2011 +0100

s3-selftest: move all skipped test to skiplist.

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Tue Feb 15 12:52:22 CET 2011 on sn-devel-104
(cherry picked from commit 0bfdb3e2495a1f40ead2ee6b8ad70614f43fc939)

commit 5103147a8d96b91bb9316329ebbb129050617d31
Author: Günther Deschner g...@samba.org
Date:   Mon Feb 7 14:27:55 2011 +0100

s3-waf: TLDAP is only needed by pdb_ads (and smbtorture).

Guenther
(cherry picked from commit a32f0ff2f095350197ffe3776c125681571e9f83)

commit 42ce00a7ab32c342ee707a0389a48fc4a66b10bb
Author: Günther Deschner g...@samba.org
Date:   Mon Feb 14 12:02:00 2011 +0100

s3: no need to globally include intl.h.

Guenther
(cherry picked from commit ca574482b889d42d9e8fbc6bea62acaa4bc15137)

commit acb9a569826dfaeaaeb30e1c193d7dd72e85a15c
Author: Günther Deschner g...@samba.org
Date:   Mon Feb 14 11:29:00 2011 +0100

s3-selftest: when skipping tests, use the selftest/skip file.

Guenther
(cherry picked from commit c575d30a32092665d104a06a12139528730b1287)

---

Summary of changes:
 source3/include/includes.h |1 -
 source3/param/loadparm.c   |2 +-
 source3/passdb/wscript_build   |2 +-
 source3/script/tests/test_posix_s3.sh  |   18 
 source3/script/tests/test_smbtorture_s3.sh |8 -
 source3/selftest/skip  |   41 ---
 source3/utils/net.h|1 +
 source3/wscript_build  |2 +-
 8 files changed, 28 insertions(+), 47 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/includes.h b/source3/include/includes.h
index 8c4fcfe..2c67a75 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -594,7 +594,6 @@ extern void *cmdline_lp_ctx;
 #include ../lib/util/memory.h
 #include ../lib/util/attr.h
 #include ../lib/util/tsort.h
-#include intl.h
 #include ../lib/util/dlinklist.h
 #include tdb.h
 #include util_tdb.h
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 04f3561..8a3d867 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -59,7 +59,7 @@
 
 #include ads.h
 #include ../librpc/gen_ndr/svcctl.h
-
+#include intl.h
 #include smb_signing.h
 #include dbwrap.h
 #include smbldap.h
diff --git a/source3/passdb/wscript_build b/source3/passdb/wscript_build
index be381c8..5a0b096 100644
--- a/source3/passdb/wscript_build
+++ b/source3/passdb/wscript_build
@@ -28,7 +28,7 @@ bld.SAMBA_MODULE('pdb_ldap',
 bld.SAMBA_MODULE('pdb_ads',
  subsystem='pdb',
  source=PDB_ADS_SRC,
- deps='LIBCLI_LDAP_NDR',
+ deps='LIBCLI_LDAP_NDR TLDAP',
  init_function='',
  internal_module=bld.SAMBA3_IS_STATIC_MODULE('pdb_ads'),
  enabled=bld.SAMBA3_IS_ENABLED_MODULE('pdb_ads'))
diff --git a/source3/script/tests/test_posix_s3.sh 
b/source3/script/tests/test_posix_s3.sh
index 36c21da..8cdb1e2 100755
--- a/source3/script/tests/test_posix_s3.sh
+++ b/source3/script/tests/test_posix_s3.sh
@@ -71,14 +71,6 @@ if test x$POSIX_SUBTESTS != x ; then
tests=$POSIX_SUBTESTS
 fi
 
-skipped=base.charset base.tcondev
-skipped=$skipped raw.acls raw.composite raw.context
-skipped=$skipped raw.ioctl
-skipped=$skipped raw.qfileinfo raw.qfsinfo
-skipped=$skipped raw.sfileinfo.base
-
-echo WARNING: Skipping tests $skipped
-
 ADDARGS=$ADDARGS --option=torture:sharedelay=10
 #ADDARGS=$ADDARGS --option=torture:writetimeupdatedelay=50
 
@@ -87,16 +79,6 @@ for t in $tests; do
 if [ ! -z $start -a $start != $t ]; then
continue;
 fi
-skip=0
-for s in $skipped; do
-   if [ x$s = x$t ]; then
-   skip=1;
-   break;
-   fi
-done
-if [ $skip = 1 ]; then
-   continue;
-fi
 start=
 name=$t
 if [ $t = base.delaywrite ]; then
diff --git a/source3/script/tests/test_smbtorture_s3.sh 
b/source3/script/tests/test_smbtorture_s3.sh
index 466855d..77ffc0c 100755
--- a/source3/script/tests/test_smbtorture_s3.sh
+++ b/source3/script/tests/test_smbtorture_s3.sh
@@ -35,14 +35,6 @@ tests=$tests 

[SCM] Samba Shared Repository - branch master updated

2011-02-15 Thread Günther Deschner
The branch, master has been updated
   via  0085d6e s3-waf: fix the build.
  from  0bfdb3e s3-selftest: move all skipped test to skiplist.

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


- Log -
commit 0085d6e21a131c76cef76d468bfed4fe5ece4eb6
Author: Günther Deschner g...@samba.org
Date:   Tue Feb 15 14:32:26 2011 +0100

s3-waf: fix the build.

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Tue Feb 15 15:24:11 CET 2011 on sn-devel-104

---

Summary of changes:
 source3/wscript_build |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/wscript_build b/source3/wscript_build
index 2be51a3..3ff87c3 100644
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -763,7 +763,8 @@ if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):
 bld.SAMBA_SUBSYSTEM('LIBMSRPC',
 source='${LIBMSRPC_SRC}',
 deps='''ndr ndr-util NDR_SECURITY NDR_DCERPC NDR_SCHANNEL
-RPC_NDR_EPMAPPER COMMON_SCHANNELDB LIBCLI_AUTH''',
+RPC_NDR_EPMAPPER COMMON_SCHANNELDB LIBCLI_AUTH
+LIBTSOCKET''',
 vars=locals())
 
 bld.SAMBA_SUBSYSTEM('LIBMSRPC_GEN',
@@ -864,7 +865,7 @@ bld.SAMBA_SUBSYSTEM('LIBSAMBA',
 
 bld.SAMBA_SUBSYSTEM('LIBSMB',
 source=LIBSMB_SRC,
-deps='LIBSAMBA CLDAP LIBNMB LIBNBT LIBDRSUAPI 
SPNEGO_PARSE',
+deps='LIBSAMBA CLDAP LIBNMB LIBNBT LIBDRSUAPI SPNEGO_PARSE 
LIBTSOCKET',
 vars=locals())
 
 bld.SAMBA_SUBSYSTEM('LIBDRSUAPI',
@@ -874,7 +875,7 @@ bld.SAMBA_SUBSYSTEM('LIBDRSUAPI',
 
 bld.SAMBA_SUBSYSTEM('CLDAP',
 source=CLDAP_SRC,
-deps='LIBCLI_LDAP_MESSAGE LIBCLI_LDAP_NDR',
+deps='LIBCLI_LDAP_MESSAGE LIBCLI_LDAP_NDR LIBTSOCKET',
 vars=locals())
 
 bld.SAMBA_SUBSYSTEM('SECRETS',


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-02-15 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  fa36577 s4:sam.py - add another description test case
  from  0085d6e s3-waf: fix the build.

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


- Log -
commit fa36577ae125a9043edcc896333d97b21280489d
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Feb 15 14:47:28 2011 +0100

s4:sam.py - add another description test case

Exactly for the syntax which is needed by Volker in s3's pdb_ads.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Feb 15 16:10:15 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/dsdb/tests/python/sam.py |   13 +
 1 files changed, 13 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/tests/python/sam.py b/source4/dsdb/tests/python/sam.py
index a623ebc..5f7c90d 100755
--- a/source4/dsdb/tests/python/sam.py
+++ b/source4/dsdb/tests/python/sam.py
@@ -2365,6 +2365,19 @@ class SamTests(unittest.TestCase):
 self.assertTrue(len(res[0][description]) == 1)
 self.assertEquals(res[0][description][0], desc1)
 
+m = Message()
+m.dn = Dn(ldb, cn=ldaptestgroup,cn=users, + self.base_dn)
+m.add(MessageElement(desc1, FLAG_MOD_DELETE, description))
+m.add(MessageElement(desc2, FLAG_MOD_ADD, description))
+ldb.modify(m)
+
+res = ldb.search(cn=ldaptestgroup,cn=users, + self.base_dn,
+ scope=SCOPE_BASE, attrs=[description])
+self.assertTrue(len(res) == 1)
+self.assertTrue(description in res[0])
+self.assertTrue(len(res[0][description]) == 1)
+self.assertEquals(res[0][description][0], desc2)
+
 delete_force(self.ldb, cn=ldaptestgroup,cn=users, + self.base_dn)
 
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-02-15 Thread Kamen Mazdrashki
The branch, master has been updated
   via  aaae316 s4-ldb_modules/operational: Make use of 
dsdb_module_reference_dn() function
  from  fa36577 s4:sam.py - add another description test case

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


- Log -
commit aaae3164b5220f42b5524cb030ebfd17e88bd32e
Author: Kamen Mazdrashki kame...@samba.org
Date:   Tue Feb 15 16:09:37 2011 +0200

s4-ldb_modules/operational: Make use of dsdb_module_reference_dn() function

it does exactly what we need here

Autobuild-User: Kamen Mazdrashki kame...@samba.org
Autobuild-Date: Tue Feb 15 16:55:32 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/operational.c |   21 -
 1 files changed, 4 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/operational.c 
b/source4/dsdb/samdb/ldb_modules/operational.c
index 1df56e8..3f2977d 100644
--- a/source4/dsdb/samdb/ldb_modules/operational.c
+++ b/source4/dsdb/samdb/ldb_modules/operational.c
@@ -438,15 +438,13 @@ static int construct_msds_isrodc_with_computer_dn(struct 
ldb_module *module,
  struct ldb_message *msg,
  struct ldb_request *parent)
 {
-   struct ldb_context *ldb;
-   const char *attr[] = { serverReferenceBL, NULL };
-   struct ldb_result *res;
int ret;
struct ldb_dn *server_dn;
 
-   ret = dsdb_module_search_dn(module, msg, res, msg-dn, attr,
-   DSDB_FLAG_NEXT_MODULE, parent);
-   if (ret == LDB_ERR_NO_SUCH_OBJECT) {
+   ret = dsdb_module_reference_dn(module, msg, msg-dn, 
serverReferenceBL,
+  server_dn, parent);
+   if (ret == LDB_ERR_NO_SUCH_OBJECT || ret == LDB_ERR_NO_SUCH_ATTRIBUTE) {
+   /* it's OK if we can't find serverReferenceBL attribute */
DEBUG(4,(__location__ : Can't get serverReferenceBL for %s \n,
 ldb_dn_get_linearized(msg-dn)));
return LDB_SUCCESS;
@@ -454,17 +452,6 @@ static int construct_msds_isrodc_with_computer_dn(struct 
ldb_module *module,
return ret;
}
 
-   ldb = ldb_module_get_ctx(module);
-   if (!ldb) {
-   return LDB_SUCCESS;
-   }
-
-   server_dn = ldb_msg_find_attr_as_dn(ldb, msg, res-msgs[0], 
serverReferenceBL);
-   if (!server_dn) {
-   DEBUG(4,(__location__ : Can't find serverReferenceBL for %s 
\n,
-ldb_dn_get_linearized(res-msgs[0]-dn)));
-   return LDB_SUCCESS;
-   }
return construct_msds_isrodc_with_server_dn(module, msg, server_dn, 
parent);
 }
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-02-15 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  20197c6 s4:torture/rpc/samr.c - fix up the test_GroupList suite 
regarding QueryDisplayInfo
   via  2e0a933 s4:samr RPC server - QueryDisplayInfo returns always all 
domains users, aliases and groups
  from  aaae316 s4-ldb_modules/operational: Make use of 
dsdb_module_reference_dn() function

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


- Log -
commit 20197c6687f83154aefa33706829af08d1d5c50a
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Feb 15 10:24:51 2011 +0100

s4:torture/rpc/samr.c - fix up the test_GroupList suite regarding 
QueryDisplayInfo

This is needed to comply with the previous patch.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Feb 15 17:40:22 CET 2011 on sn-devel-104

commit 2e0a933ac87a378bf18f6a73186d291803d09d8b
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Jan 15 12:30:16 2011 +0100

s4:samr RPC server - QueryDisplayInfo returns always all domains users, 
aliases and groups

That means when calling QueryDisplayInfo on the BUILTIN handle we
still get all related domain objects - for example all domain (global
+ universal) groups. This is contrary to the EnumDomain... calls which
do really only return the objects in the specified domain policy handle.

This has been observed against Windows Server 2008 and confirmed by
dochelp.

In the same occasion I've converted from a gendb*-oriented search call to 
dsdb_search.

Patch-reviewed-by: Andrew Tridgell tri...@samba.org

---

Summary of changes:
 source4/rpc_server/samr/dcesrv_samr.c |   74 ++---
 source4/torture/rpc/samr.c|   18 +++-
 2 files changed, 56 insertions(+), 36 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/rpc_server/samr/dcesrv_samr.c 
b/source4/rpc_server/samr/dcesrv_samr.c
index c2b0d03..a9a72a7 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -3621,8 +3621,8 @@ static NTSTATUS dcesrv_samr_QueryDisplayInfo(struct 
dcesrv_call_state *dce_call,
 {
struct dcesrv_handle *h;
struct samr_domain_state *d_state;
-   struct ldb_message **res;
-   int i, ldb_cnt;
+   struct ldb_result *res;
+   unsigned int i;
uint32_t count;
const char * const attrs[] = { objectSid, sAMAccountName,
displayName, description, userAccountControl,
@@ -3632,6 +3632,7 @@ static NTSTATUS dcesrv_samr_QueryDisplayInfo(struct 
dcesrv_call_state *dce_call,
struct samr_DispEntryAscii *entriesAscii = NULL;
struct samr_DispEntryGeneral *entriesGeneral = NULL;
const char *filter;
+   int ret;
 
DCESRV_PULL_HANDLE(h, r-in.domain_handle, SAMR_HANDLE_DOMAIN);
 
@@ -3661,39 +3662,38 @@ static NTSTATUS dcesrv_samr_QueryDisplayInfo(struct 
dcesrv_call_state *dce_call,
return NT_STATUS_INVALID_INFO_CLASS;
}
 
-   /* search for all requested objects in this domain. This could
+   /* search for all requested objects in all domains. This could
   possibly be cached and resumed based on resume_key */
-   ldb_cnt = samdb_search_domain(d_state-sam_ctx, mem_ctx,
- d_state-domain_dn, res, attrs,
- d_state-domain_sid, %s, filter);
-   if (ldb_cnt == -1) {
+   ret = dsdb_search(d_state-sam_ctx, mem_ctx, res, NULL,
+ LDB_SCOPE_SUBTREE, attrs, 0, %s, filter);
+   if (ret != LDB_SUCCESS) {
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
-   if (ldb_cnt == 0 || r-in.max_entries == 0) {
+   if ((res-count == 0) || (r-in.max_entries == 0)) {
return NT_STATUS_OK;
}
 
switch (r-in.level) {
case 1:
entriesGeneral = talloc_array(mem_ctx,
-struct samr_DispEntryGeneral,
-ldb_cnt);
+ struct samr_DispEntryGeneral,
+ res-count);
break;
case 2:
entriesFull = talloc_array(mem_ctx,
-struct samr_DispEntryFull,
-ldb_cnt);
+  struct samr_DispEntryFull,
+  res-count);
break;
case 3:
entriesFullGroup = talloc_array(mem_ctx,
-struct samr_DispEntryFullGroup,
-ldb_cnt);
+   struct 

[SCM] Samba Shared Repository - branch master updated

2011-02-15 Thread Volker Lendecke
The branch, master has been updated
   via  4b354e6 s3-amend: Don't overwrite existing values
  from  20197c6 s4:torture/rpc/samr.c - fix up the test_GroupList suite 
regarding QueryDisplayInfo

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


- Log -
commit 4b354e67fc7adce5152c73697bbf02a1aac69b20
Author: Volker Lendecke v...@samba.org
Date:   Tue Feb 15 18:16:43 2011 +0100

s3-amend: Don't overwrite existing values

This saves a ton of tdb transactions on smbd startup

Andreas, Günther, please check!

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Tue Feb 15 19:11:25 CET 2011 on sn-devel-104

---

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


Changeset truncated at 500 lines:

diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c
index acce7ab..7c2e01d 100644
--- a/source3/registry/reg_api.c
+++ b/source3/registry/reg_api.c
@@ -659,6 +659,7 @@ done:
 WERROR reg_setvalue(struct registry_key *key, const char *name,
const struct registry_value *val)
 {
+   struct regval_blob *existing;
WERROR err;
int res;
 
@@ -670,6 +671,15 @@ WERROR reg_setvalue(struct registry_key *key, const char 
*name,
return err;
}
 
+   existing = regval_ctr_getvalue(key-values, name);
+
+   if ((existing != NULL) 
+   (regval_size(existing) == val-data.length) 
+   (memcmp(regval_data_p(existing), val-data.data,
+   val-data.length) == 0)) {
+   return WERR_OK;
+   }
+
res = regval_ctr_addvalue(key-values, name, val-type,
  val-data.data, val-data.length);
 


-- 
Samba Shared Repository


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

2011-02-15 Thread Volker Lendecke
The branch, v3-6-test has been updated
   via  29db913 s3-amend: Don't overwrite existing values
  from  4f9a0a0 s3-selftest: move all skipped test to skiplist.

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


- Log -
commit 29db91386cf2e639e7fa5dd683427e71a27cb7cd
Author: Volker Lendecke v...@samba.org
Date:   Tue Feb 15 18:16:43 2011 +0100

s3-amend: Don't overwrite existing values

This saves a ton of tdb transactions on smbd startup

Andreas, Günther, please check!
(cherry picked from commit f56432c348d0243b43a8cce42c0a438902854272)

---

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


Changeset truncated at 500 lines:

diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c
index acce7ab..7c2e01d 100644
--- a/source3/registry/reg_api.c
+++ b/source3/registry/reg_api.c
@@ -659,6 +659,7 @@ done:
 WERROR reg_setvalue(struct registry_key *key, const char *name,
const struct registry_value *val)
 {
+   struct regval_blob *existing;
WERROR err;
int res;
 
@@ -670,6 +671,15 @@ WERROR reg_setvalue(struct registry_key *key, const char 
*name,
return err;
}
 
+   existing = regval_ctr_getvalue(key-values, name);
+
+   if ((existing != NULL) 
+   (regval_size(existing) == val-data.length) 
+   (memcmp(regval_data_p(existing), val-data.data,
+   val-data.length) == 0)) {
+   return WERR_OK;
+   }
+
res = regval_ctr_addvalue(key-values, name, val-type,
  val-data.data, val-data.length);
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-02-15 Thread Volker Lendecke
The branch, master has been updated
   via  ab85362 s3: Support codePage in pdb_ads
   via  9ef0e1e s3: Pass code_page through samr
   via  ead7ffa s3: Add code_page to struct samu
   via  8bbf0ad s3: Support country_code in pdb_ads
   via  63c556e s3: Pass country_code through samr
   via  d9d0fef s3: Add country_code to struct samu
   via  fbcdef8 s4: Fix a typo
   via  7a2cbda s3: Add userWorkstations and userParameters to pdb_ads
  from  4b354e6 s3-amend: Don't overwrite existing values

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


- Log -
commit ab85362cffbf844f4783b4e82fe7db8f9d5067bc
Author: Volker Lendecke v...@samba.org
Date:   Tue Feb 15 19:15:17 2011 +0100

s3: Support codePage in pdb_ads

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Tue Feb 15 22:00:27 CET 2011 on sn-devel-104

commit 9ef0e1ef221d9c9552a45a1e302d49f417cef1b5
Author: Volker Lendecke v...@samba.org
Date:   Tue Feb 15 19:13:52 2011 +0100

s3: Pass code_page through samr

commit ead7ffa1a7f3ab04c5430f9a0b4223172772d46d
Author: Volker Lendecke v...@samba.org
Date:   Tue Feb 15 19:07:42 2011 +0100

s3: Add code_page to struct samu

commit 8bbf0ad2a04ceabdbdf21bb157b3f0f3423cd43c
Author: Volker Lendecke v...@samba.org
Date:   Tue Feb 15 19:01:04 2011 +0100

s3: Support country_code in pdb_ads

commit 63c556e306ca01a8f65d884275a530a8eced6b2c
Author: Volker Lendecke v...@samba.org
Date:   Tue Feb 15 19:09:51 2011 +0100

s3: Pass country_code through samr

commit d9d0fef862b198f43ead20193fae8283a192af73
Author: Volker Lendecke v...@samba.org
Date:   Tue Feb 15 19:08:47 2011 +0100

s3: Add country_code to struct samu

commit fbcdef82687ddcb7a1dc3d229d048ca005dc7c1b
Author: Volker Lendecke v...@samba.org
Date:   Tue Feb 15 19:02:29 2011 +0100

s4: Fix a typo

commit 7a2cbdafa87cee0af41b07b6eb4a1ab2ff155b8b
Author: Volker Lendecke v...@samba.org
Date:   Tue Feb 15 19:09:10 2011 +0100

s3: Add userWorkstations and userParameters to pdb_ads

---

Summary of changes:
 source3/include/passdb.h|5 
 source3/include/proto.h |6 +
 source3/passdb/pdb_ads.c|   38 +++
 source3/passdb/pdb_get_set.c|   24 +++
 source3/rpc_server/samr/srv_samr_nt.c   |8 +++---
 source3/rpc_server/samr/srv_samr_util.c |   18 ++
 source4/torture/rpc/samr.c  |2 +-
 7 files changed, 96 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index ac6dd21..dc50533 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -70,6 +70,8 @@ enum pdb_elements {
PDB_FIELDS_PRESENT,
PDB_BAD_PASSWORD_COUNT,
PDB_LOGON_COUNT,
+   PDB_COUNTRY_CODE,
+   PDB_CODE_PAGE,
PDB_UNKNOWN6,
PDB_LMPASSWD,
PDB_NTPASSWD,
@@ -166,6 +168,9 @@ struct samu {
uint16_t bad_password_count;
uint16_t logon_count;
 
+   uint16_t country_code;
+   uint16_t code_page;
+
uint32_t unknown_6; /* 0x 04ec */
 
/* a tag for who added the private methods */
diff --git a/source3/include/proto.h b/source3/include/proto.h
index f584216..83ac33a 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3735,6 +3735,8 @@ const char *pdb_get_comment(const struct samu *sampass);
 const char *pdb_get_munged_dial(const struct samu *sampass);
 uint16_t pdb_get_bad_password_count(const struct samu *sampass);
 uint16_t pdb_get_logon_count(const struct samu *sampass);
+uint16_t pdb_get_country_code(const struct samu *sampass);
+uint16_t pdb_get_code_page(const struct samu *sampass);
 uint32_t pdb_get_unknown_6(const struct samu *sampass);
 void *pdb_get_backend_private_data(const struct samu *sampass, const struct 
pdb_methods *my_methods);
 bool pdb_set_acct_ctrl(struct samu *sampass, uint32_t acct_ctrl, enum 
pdb_value_state flag);
@@ -3769,6 +3771,10 @@ bool pdb_set_pw_history(struct samu *sampass, const 
uint8_t *pwd, uint32_t histo
 bool pdb_set_plaintext_pw_only(struct samu *sampass, const char *password, 
enum pdb_value_state flag);
 bool pdb_set_bad_password_count(struct samu *sampass, uint16_t 
bad_password_count, enum pdb_value_state flag);
 bool pdb_set_logon_count(struct samu *sampass, uint16_t logon_count, enum 
pdb_value_state flag);
+bool pdb_set_country_code(struct samu *sampass, uint16_t country_code,
+ enum pdb_value_state flag);
+bool pdb_set_code_page(struct samu *sampass, uint16_t code_page,
+  enum pdb_value_state flag);
 bool pdb_set_unknown_6(struct samu *sampass, uint32_t unkn, enum 
pdb_value_state flag);
 bool pdb_set_hours(struct samu *sampass, const uint8_t *hours, 

[SCM] Samba Shared Repository - branch master updated

2011-02-15 Thread Günther Deschner
The branch, master has been updated
   via  e34ba44 s3-librpc: move server_id marshalling to own helper file.
  from  ab85362 s3: Support codePage in pdb_ads

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


- Log -
commit e34ba447ec8a54db744f0103d91ec05f7cfd60ce
Author: Günther Deschner g...@samba.org
Date:   Tue Feb 15 17:37:03 2011 +0100

s3-librpc: move server_id marshalling to own helper file.

(in preparation of merging struct server_id).

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Wed Feb 16 00:02:33 CET 2011 on sn-devel-104

---

Summary of changes:
 source3/Makefile.in|1 +
 source3/librpc/idl/messaging.idl   |2 +-
 source3/librpc/idl/notify.idl  |2 +-
 source3/librpc/ndr/{util.c = ndr_server_id.c} |   16 +++--
 source3/librpc/ndr/{util.h = ndr_server_id.h} |3 +-
 source3/librpc/ndr/util.c  |   43 
 source3/librpc/ndr/util.h  |3 --
 source3/librpc/wscript_build   |9 -
 8 files changed, 16 insertions(+), 63 deletions(-)
 copy source3/librpc/ndr/{util.c = ndr_server_id.c} (87%)
 copy source3/librpc/ndr/{util.h = ndr_server_id.h} (62%)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index b632d5d..7dbb012 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -318,6 +318,7 @@ LIBNDR_OBJ = ../librpc/ndr/ndr_basic.o \
 ../librpc/ndr/ndr_string.o \
 ../librpc/ndr/uuid.o \
 librpc/ndr/util.o \
+librpc/ndr/ndr_server_id.o \
 librpc/gen_ndr/ndr_dcerpc.o
 
 LIBNDR_GEN_OBJ0 = librpc/gen_ndr/ndr_samr.o \
diff --git a/source3/librpc/idl/messaging.idl b/source3/librpc/idl/messaging.idl
index 22c3429..0ac7220 100644
--- a/source3/librpc/idl/messaging.idl
+++ b/source3/librpc/idl/messaging.idl
@@ -5,7 +5,7 @@
 */
 
 [
-  helper(../librpc/ndr/util.h),
+  helper(../librpc/ndr/ndr_server_id.h),
   pointer_default(unique)
 ]
 interface messaging
diff --git a/source3/librpc/idl/notify.idl b/source3/librpc/idl/notify.idl
index 592af19..d65e8c5 100644
--- a/source3/librpc/idl/notify.idl
+++ b/source3/librpc/idl/notify.idl
@@ -10,7 +10,7 @@ import file_id.idl;
 */
 
 [
-  helper(../librpc/ndr/util.h),
+  helper(../librpc/ndr/ndr_server_id.h),
   pointer_default(unique)
 ]
 interface notify
diff --git a/source3/librpc/ndr/util.c b/source3/librpc/ndr/ndr_server_id.c
similarity index 87%
copy from source3/librpc/ndr/util.c
copy to source3/librpc/ndr/ndr_server_id.c
index d4e06df..a6152d7 100644
--- a/source3/librpc/ndr/util.c
+++ b/source3/librpc/ndr/ndr_server_id.c
@@ -1,26 +1,26 @@
-/* 
+/*
Unix SMB/CIFS implementation.
 
libndr interface
 
Copyright (C) Andrew Tridgell 2003
-   
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-   
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
-   
+
You should have received a copy of the GNU General Public License
along with this program.  If not, see http://www.gnu.org/licenses/.
 */
 
 #include includes.h
-#include librpc/ndr/util.h
+#include librpc/ndr/ndr_server_id.h
 
 enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, 
const struct server_id *r)
 {
@@ -64,9 +64,3 @@ void ndr_print_server_id(struct ndr_print *ndr, const char 
*name, const struct s
 #endif
ndr-depth--;
 }
-
-_PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char 
*name, const struct sockaddr_storage *ss)
-{
-   char addr[INET6_ADDRSTRLEN];
-   ndr-print(ndr, %-25s: %s, name, print_sockaddr(addr, sizeof(addr), 
ss));
-}
diff --git a/source3/librpc/ndr/util.h b/source3/librpc/ndr/ndr_server_id.h
similarity index 62%
copy from source3/librpc/ndr/util.h
copy to source3/librpc/ndr/ndr_server_id.h
index 3f7be6b..5975abc 100644
--- a/source3/librpc/ndr/util.h
+++ b/source3/librpc/ndr/ndr_server_id.h
@@ -1,7 +1,6 @@
 
-/* The following definitions come from librpc/ndr/util.c  */
+/* The following definitions come from librpc/ndr/ndr_server_id.c  */
 
 enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, 
const struct server_id *r);
 enum ndr_err_code ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, 
struct server_id *r);
 void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct 
server_id *r);
-_PUBLIC_ 

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

2011-02-15 Thread Günther Deschner
The branch, v3-6-test has been updated
   via  ccb3d5e s3-librpc: move server_id marshalling to own helper file.
   via  575ac17 s3-waf: fix the build.
  from  29db913 s3-amend: Don't overwrite existing values

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


- Log -
commit ccb3d5edc9bd6e6c4da7aadd166151ee44819431
Author: Günther Deschner g...@samba.org
Date:   Tue Feb 15 17:37:03 2011 +0100

s3-librpc: move server_id marshalling to own helper file.

(in preparation of merging struct server_id).

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Wed Feb 16 00:02:33 CET 2011 on sn-devel-104
(cherry picked from commit e34ba447ec8a54db744f0103d91ec05f7cfd60ce)

commit 575ac170e3778f4931121f4ffb2b3fd105c3dac6
Author: Günther Deschner g...@samba.org
Date:   Tue Feb 15 14:32:26 2011 +0100

s3-waf: fix the build.

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Tue Feb 15 15:24:11 CET 2011 on sn-devel-104
(cherry picked from commit 0085d6e21a131c76cef76d468bfed4fe5ece4eb6)

---

Summary of changes:
 source3/Makefile.in|1 +
 source3/librpc/idl/messaging.idl   |2 +-
 source3/librpc/idl/notify.idl  |2 +-
 source3/librpc/ndr/{util.c = ndr_server_id.c} |   16 +++--
 source3/librpc/ndr/{util.h = ndr_server_id.h} |3 +-
 source3/librpc/ndr/util.c  |   43 
 source3/librpc/ndr/util.h  |3 --
 source3/librpc/wscript_build   |9 -
 source3/wscript_build  |7 ++--
 9 files changed, 20 insertions(+), 66 deletions(-)
 copy source3/librpc/ndr/{util.c = ndr_server_id.c} (87%)
 copy source3/librpc/ndr/{util.h = ndr_server_id.h} (62%)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 6730667..9648315 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -318,6 +318,7 @@ LIBNDR_OBJ = ../librpc/ndr/ndr_basic.o \
 ../librpc/ndr/ndr_string.o \
 ../librpc/ndr/uuid.o \
 librpc/ndr/util.o \
+librpc/ndr/ndr_server_id.o \
 librpc/gen_ndr/ndr_dcerpc.o
 
 LIBNDR_GEN_OBJ0 = librpc/gen_ndr/ndr_samr.o \
diff --git a/source3/librpc/idl/messaging.idl b/source3/librpc/idl/messaging.idl
index 22c3429..0ac7220 100644
--- a/source3/librpc/idl/messaging.idl
+++ b/source3/librpc/idl/messaging.idl
@@ -5,7 +5,7 @@
 */
 
 [
-  helper(../librpc/ndr/util.h),
+  helper(../librpc/ndr/ndr_server_id.h),
   pointer_default(unique)
 ]
 interface messaging
diff --git a/source3/librpc/idl/notify.idl b/source3/librpc/idl/notify.idl
index 592af19..d65e8c5 100644
--- a/source3/librpc/idl/notify.idl
+++ b/source3/librpc/idl/notify.idl
@@ -10,7 +10,7 @@ import file_id.idl;
 */
 
 [
-  helper(../librpc/ndr/util.h),
+  helper(../librpc/ndr/ndr_server_id.h),
   pointer_default(unique)
 ]
 interface notify
diff --git a/source3/librpc/ndr/util.c b/source3/librpc/ndr/ndr_server_id.c
similarity index 87%
copy from source3/librpc/ndr/util.c
copy to source3/librpc/ndr/ndr_server_id.c
index d4e06df..a6152d7 100644
--- a/source3/librpc/ndr/util.c
+++ b/source3/librpc/ndr/ndr_server_id.c
@@ -1,26 +1,26 @@
-/* 
+/*
Unix SMB/CIFS implementation.
 
libndr interface
 
Copyright (C) Andrew Tridgell 2003
-   
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-   
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
-   
+
You should have received a copy of the GNU General Public License
along with this program.  If not, see http://www.gnu.org/licenses/.
 */
 
 #include includes.h
-#include librpc/ndr/util.h
+#include librpc/ndr/ndr_server_id.h
 
 enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, 
const struct server_id *r)
 {
@@ -64,9 +64,3 @@ void ndr_print_server_id(struct ndr_print *ndr, const char 
*name, const struct s
 #endif
ndr-depth--;
 }
-
-_PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char 
*name, const struct sockaddr_storage *ss)
-{
-   char addr[INET6_ADDRSTRLEN];
-   ndr-print(ndr, %-25s: %s, name, print_sockaddr(addr, sizeof(addr), 
ss));
-}
diff --git a/source3/librpc/ndr/util.h b/source3/librpc/ndr/ndr_server_id.h
similarity index 62%
copy from source3/librpc/ndr/util.h
copy to source3/librpc/ndr/ndr_server_id.h

[SCM] Samba Shared Repository - branch master updated

2011-02-15 Thread Andrew Bartlett
The branch, master has been updated
   via  1354d3d s3-auth Fix memory leak in security=share and force user =
   via  dce69c2 waf Fix dependencies for .pc (pkg-config) files
  from  e34ba44 s3-librpc: move server_id marshalling to own helper file.

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


- Log -
commit 1354d3dc747344390302e3fd2a202ff372985a9c
Author: Andrew Bartlett abart...@samba.org
Date:   Fri Feb 11 11:34:56 2011 +1100

s3-auth Fix memory leak in security=share and force user =

In these cases, the server_info was not stolen onto a long term memory
context, and so remained on the NULL context where it was created.

Andrew Bartlett

Autobuild-User: Andrew Bartlett abart...@samba.org
Autobuild-Date: Wed Feb 16 01:08:19 CET 2011 on sn-devel-104

commit dce69c29e7a6c6e5f818bed21cb251b1a5f60556
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Feb 16 10:18:12 2011 +1100

waf Fix dependencies for .pc (pkg-config) files

We used the wrong parameter for the dependency calculation.

thanks to Thomas Nagy for the fix!

Andrew Bartlett

---

Summary of changes:
 buildtools/wafsamba/wafsamba.py |2 +-
 source3/auth/auth_util.c|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 0949949..be8cad3 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -523,7 +523,7 @@ def SAMBA_GENERATOR(bld, name, rule, source='', target='',
 before='cc',
 ext_out='.c',
 samba_type='GENERATOR',
-vars = [rule],
+dep_vars = [rule] + (vars or []),
 name=name)
 
 if always:
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 7673664..1c036ff 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -819,7 +819,7 @@ NTSTATUS make_serverinfo_from_username(TALLOC_CTX *mem_ctx,
return status;
}
 
-   *presult = result;
+   *presult = talloc_steal(mem_ctx, result);
return NT_STATUS_OK;
 }
 


-- 
Samba Shared Repository


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

2011-02-15 Thread Jeremy Allison
The branch, v3-6-test has been updated
   via  518f1a2 s3-auth Fix memory leak in security=share and force user =
   via  320e549 Merge branch 'v3-6-test' of 
ssh://git.samba.org/data/git/samba into v3-6-test
   via  25e21dc tdb: Fix a C++ warning
  from  ccb3d5e s3-librpc: move server_id marshalling to own helper file.

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


- Log -
commit 518f1a2a35920ebf43c29b163a5091a9d92b5264
Author: Andrew Bartlett abart...@samba.org
Date:   Fri Feb 11 11:34:56 2011 +1100

s3-auth Fix memory leak in security=share and force user =

In these cases, the server_info was not stolen onto a long term memory
context, and so remained on the NULL context where it was created.

Andrew Bartlett

Autobuild-User: Andrew Bartlett abart...@samba.org
Autobuild-Date: Wed Feb 16 01:08:19 CET 2011 on sn-devel-104
(cherry picked from commit 1354d3dc747344390302e3fd2a202ff372985a9c)

commit 320e5492d037a7bbd4a42af43db70d3a14f5477d
Merge: 25e21dc92ecd29f0b4be23bd730ff7886818e0eb 
ccb3d5edc9bd6e6c4da7aadd166151ee44819431
Author: Jeremy Allison j...@samba.org
Date:   Tue Feb 15 17:22:32 2011 -0800

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

commit 25e21dc92ecd29f0b4be23bd730ff7886818e0eb
Author: Volker Lendecke v...@samba.org
Date:   Sat Feb 12 17:30:11 2011 +0100

tdb: Fix a C++ warning

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Sat Feb 12 19:50:55 CET 2011 on sn-devel-104
(cherry picked from commit 91cad71390bd2a0330891083c65d3f9000b74657)

---

Summary of changes:
 lib/tdb/common/summary.c |2 +-
 source3/auth/auth_util.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tdb/common/summary.c b/lib/tdb/common/summary.c
index 29959f9..da1ec2b 100644
--- a/lib/tdb/common/summary.c
+++ b/lib/tdb/common/summary.c
@@ -155,7 +155,7 @@ _PUBLIC_ char *tdb_summary(struct tdb_context *tdb)
 
/* 20 is max length of a %zu. */
len = strlen(SUMMARY_FORMAT) + 35*20 + 1;
-   ret = malloc(len);
+   ret = (char *)malloc(len);
if (!ret)
goto unlock;
 
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index c319edf..3cc8e11 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -819,7 +819,7 @@ NTSTATUS make_serverinfo_from_username(TALLOC_CTX *mem_ctx,
return status;
}
 
-   *presult = result;
+   *presult = talloc_steal(mem_ctx, result);
return NT_STATUS_OK;
 }
 


-- 
Samba Shared Repository