[Samba] Difference Between ver 3.2.x and ver 3.0.x

2008-03-28 Thread Shashi Lad
Hi ,

I want to Know the Difference between version 3.2 and 3.0.x.
I know as 3.2.x support GPLv3 But other then that is there any difference ?

Also is development for 3.0.x is stoped ?

When can we expect the stable release of  version 3.2 as it is in
pre-release verion ?

-- 
Regards,
Shashi Lad.
[M] - 9972047907

Don't tell GOD how BIG your Problem is; tell the Problem  how
BIG your GOD is!
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Difference Between ver 3.2.x and ver 3.0.x

2008-03-28 Thread Greg Zartman

I want to Know the Difference between version 3.2 and 3.0.x.
I know as 3.2.x support GPLv3 But other then that is there any difference ?


http://us3.samba.org/samba/ftp/pre/WHATSNEW-3-2-0pre2.txt


When can we expect the stable release of  version 3.2 as it is in
pre-release verion ?


You good at reading tea leaves?  That is about as good an answer as you 
are going to get from this list is my guess.


Greg




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


[Samba] Samba Administration Tool recommendations

2008-03-28 Thread Matt Arnilo S. Baluyos (Mailing Lists)
Hi All,

I have a project which is to build a customized Linux distribution
with a focus on deploying a Samba as Primary Domain Controller. It's
pretty much like Trixbox but instead of Asterisk and VOIP, will be
focused on Samba.

Right now, I am looking for a solution for an administrator to easily
manage the service. Of particular importance would be to easily add
workstations and set up users for Roaming Profiles.

Any recommendations on this?

I have already looked at SWAT and Webmin (and I will be including them
on the package list). However, I would like a tool that is focused on
just Samba as a PDC.

The base system I have is Ubuntu Server so it would be great if such a
recommendation would be web-based although if a desktop application is
what I need, then changing the base system is an option.

Thanks in advance,
Matt

-- 
Stand before it and there is no beginning.
Follow it and there is no end.
Stay with the ancient Tao,
Move with the present.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Difference Between ver 3.2.x and ver 3.0.x

2008-03-28 Thread Volker Lendecke
On Thu, Mar 27, 2008 at 11:58:31PM -0700, Greg Zartman wrote:
 I want to Know the Difference between version 3.2 and 3.0.x.
 I know as 3.2.x support GPLv3 But other then that is there any difference ?
 
 http://us3.samba.org/samba/ftp/pre/WHATSNEW-3-2-0pre2.txt
 
 When can we expect the stable release of  version 3.2 as it is in
 pre-release verion ?
 
 You good at reading tea leaves?  That is about as good an answer as you 
 are going to get from this list is my guess.

Well, we are actively working on getting the release out
now. There are still several known bugs, and we hope that
many people test the pre-releases. Or even better, you can
always get the current tree that is about to get the next
pre-release from
http://repo.or.cz/w/Samba.git?a=snapshot;h=refs/heads/v3-2-stable;sf=tgz

The more people test this tree, the better the release will
be.

Volker


pgp2xHaIX5N37.pgp
Description: PGP signature
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Re: [Samba] SWAT Error on Debian

2008-03-28 Thread Karolin Seeger
Hi Christian,

On Thu, Mar 27, 2008 at 07:16:20PM +0100, Christian Perrier wrote:
 Karolin (and Volker as well), what are the differences between the
 SerNet .deb packages and those on main samba sites?

the main difference is that we recently decided to drop the FHS patches. 
Additionally there, there are a lot of smaller differences.

 Any sources.list entries I could put my hands on to have a look at?

You can download the sources from
ftp://ftp.sernet.de/pub/samba/recent/src/debian.

 I (and other Debian packagers) still have in mind the plan to minimize
 the gap between .deb packages in Debian (and Ubuntu) and packages
 provided by Samba upstream (where I include SerNet work)...so anything
 you guys are doing in these packages which we could do in ours would be
 good, I thinkand vice-versa, of course.
 
Sounds good. There are a few things to discuss, I think. Maybe we can talk 
about that on the sambaXP?

Cheers,
Karolin

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-37-0, fax: +49-551-37-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.SerNet.DE, mailto: Info @ SerNet.DE



pgpw7zuP94ipT.pgp
Description: PGP signature
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Re: [Samba] Samba Administration Tool recommendations

2008-03-28 Thread Greg Zartman

Matt Arnilo S. Baluyos (Mailing Lists) wrote:

Hi All,

I have a project which is to build a customized Linux distribution
with a focus on deploying a Samba as Primary Domain Controller. It's
pretty much like Trixbox but instead of Asterisk and VOIP, will be
focused on Samba.

Right now, I am looking for a solution for an administrator to easily
manage the service. Of particular importance would be to easily add
workstations and set up users for Roaming Profiles.


Have you had a look at SME Server?  www.contribs.org

This distro is based on Centos (RHEL).  It is a real turnkey distro and 
installs out of the box ready to configure via a web interface.  You 
never need to even look at the commandline.  Setup of Samba as a PDC is 
just a matter of plugging in the workgroup name and checking a box sayin 
you want SME to be a PDC.


Greg

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


Re: [Samba] Samba Administration Tool recommendations

2008-03-28 Thread Marcio Merlone

Matt Arnilo S. Baluyos (Mailing Lists) escreveu:

Hi All,

I have a project which is to build a customized Linux distribution
with a focus on deploying a Samba as Primary Domain Controller. It's
pretty much like Trixbox but instead of Asterisk and VOIP, will be
focused on Samba.

Right now, I am looking for a solution for an administrator to easily
manage the service. Of particular importance would be to easily add
workstations and set up users for Roaming Profiles.

Any recommendations on this?

I have already looked at SWAT and Webmin (and I will be including them
on the package list). However, I would like a tool that is focused on
just Samba as a PDC.

The base system I have is Ubuntu Server so it would be great if such a
recommendation would be web-based although if a desktop application is
what I need, then changing the base system is an option.

Thanks in advance,
Matt
  


Great idea! As a user, I'd like to suggest you the following features/tools:

- Ease to add/manage users and machines;
- Ease to manage network workstations (software and hardware 
inventory/deployment, group policies, etc);
- Ease to manage workstations configs (proxy config on browsers, mail 
settings, logon scripts, enable/disable/manage windows firewall, vnc 
service and passwords, etc);


Regarding machine inventory, have you seen SpiceWorks? I ask because you 
may have two approaches:


1: a samba focused distro.
2: a network management focused distro. Using samba.

The main difficulty on maintaining a samba server is the 
network/workstations management , which you have to handle with 3rd 
party tools and scripts (like wpkg), which are not well integrated 
(because you had to integrate/tweak it yourself). A distro made to 
address all those issues will be a killer product on the market. Better 
yet if built on top of Ubuntu server.


Sorry if this is not the right place to this. :) Please provide some 
site or mail list to keep an eye on your progress.


Best regards,

--
Marcio Merlone

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

[Samba] Need help getting roaming profiles to work

2008-03-28 Thread web stuff
Hi!
First, let me apologize for the length of this message. I wanted to
include as much relevant info as I could and it got a bit lengthy.

For reasons that I won't bother to detail here, I ended up
volunteering to upgrade the server at my kids school. It's a small
private school with an all-volunteer tech support staff (me!). We
currently have about 40 computers serving about 150 people. The
server's primary function is a file server/domain controller, but we
also use it to serve up the school website. If I can get things
working properly, we would also like to use it as a proxy server.

The server was running Red Hat 9 with Samba 3.0.10. After a bit of
research, I decided to use Ubuntu Server 7.10 along with the latest
Samba package available with the distro (3.0.26a) I am a total rookie
when it comes to Linux/Samba, so I set up a test system at home to
learn how to make it all work. After a couple weeks of
reading/trying/testing, I felt like I had a good enough understanding
to try the upgrade on the school server. Well, I've been able to get
it about 98% correct, but the last little bit is driving me nuts!

The problem I'm having is that I can't get the Windows roaming
profiles to be saved to the server. I have been searching the net and
reading everything I can find related to this problem, but everything
I have tried only seems to make things worse.

The server is set up as a PDC and users can log in just fine. They can
access all the shares I set up just fine. They can read/write to their
home share just fine. I've even proven that they can read/write to the
location where I want the profiles stored (I've even tried having the
system store their profiles in their home directory). When they log in
and the Windows OS creates a new profile for them, they can modify the
profile in all the normal ways just fine. When they log out, the
server does not save that profile.

I realize that roaming profiles aren't necessarily the best way to
operate a domain, but for now I feel it's the best way for the school
to operate. When I learn more about how to work with Samba and Windows
profiles, I might change that.

Some of the settings were carried over from the previous setup because
I was worried about breaking the web server functionality. I'm still
learning about all this and I'm not sure which things I can change and
which I can't.

Thanks for any help you can provide!
Bob Bolhuis

Some info about the machines/logins:
Server name = bcs_linebacker  (Is the _ character in the server name
a problem? I've seen references to that being an illegal character.)
Machine used for login testing = lab06
Login used to create the log files below = tech
Domain name = BC_SCHOOL

Configuration settings generated by using testparm:

Server role: ROLE_DOMAIN_PDC
Press enter to see a dump of your service definitions
[global]
 workgroup = BC_SCHOOL
 server string = BCS Server
 passdb backend = tdbsam
 passwd program = /usr/bin/passwd %u
 passwd chat = *Enter\snew\sUNIX\spassword:* %n\n
*Retype\snew\sUNIX\spassword:* %n\n
*passwd:*password\supdated\ssuccessfully* .
 unix password sync = Yes
 log file = /var/log/samba/log.%m
 max log size = 1000
 socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
 add machine script = /usr/sbin/useradd -d /samba-clients -g
samba-clients -s /bin/false %u
 logon script = map_network_drives.bat
 logon path = \\%L\profiles\%U
 domain logons = Yes
 os level = 65
 preferred master = Yes
 domain master = Yes
 dns proxy = No
 idmap uid = 15000-2
 idmap gid = 15000-2
 admin users = @root, @ntadmin, @tech, tech
 hosts allow = 192.168.110.
 profile acls = Yes

[netlogon]
 path = /home/netlogon
 admin users = tech
 read only = No
 guest ok = Yes
 browseable = No

[profiles]
 path = /data/profiles
 read only = No
 create mask = 0600
 directory mask = 0700
 hide files = /desktop.ini/outlook*.lnk/*Briefcase*
 store dos attributes = Yes
 browseable = No

[homes]
 read only = No
 browseable = No


Below are various log files, some of which may be irrelevant, but I
don't know enough about the inner workings to know which of these have
significance.



log.lab06:

[2008/03/27 22:27:18, 1] smbd/service.c:make_connection_snum(1033)
 lab06 (192.168.110.220) connect to service pc06 initially as user
tech (uid=0, gid=527) (pid 5347)


[2008/03/27 22:27:21, 1] smbd/service.c:close_cnum(1230)
 lab06 (192.168.110.220) closed connection to service pc06
[2008/03/27 22:27:42, 0] auth/auth_util.c:create_builtin_administrators(792)


 create_builtin_administrators: Failed to create Administrators
[2008/03/27 22:27:42, 0] auth/auth_util.c:create_builtin_users(758)
 create_builtin_users: Failed to create Users
[2008/03/27 22:27:42, 1] smbd/service.c:make_connection_snum(1033)


 lab06 (192.168.110.220) connect to service tech initially as user
tech (uid=0, gid=527) (pid 5347)
[2008/03/27 22:27:42, 0] auth/auth_util.c:create_builtin_administrators(792)


 

On ssbbw4u: SSBBW4U updates, 400+ members!

2008-03-28 Thread ssbbw4u
A message to all members of ssbbw4u

Currently membership is a 430 members and counting. I would like to personally 
thank everybody who has joined, and everybody who has told a friend or two 
about this site. 

Thank you from SSBBW4U.COM

Visit ssbbw4u at: http://ssbbw4u.ning.com

--
To control which emails you receive on ssbbw4u, go to:
http://ssbbw4u.ning.com/profiles/profile/emailSettings

PLEASE READ THIS IMPORTANT ETIQUETTE MESSAGE BEFORE POSTING:

http://www.catb.org/~esr/faqs/smart-questions.html


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-504-g565a30a

2008-03-28 Thread Günther Deschner
The branch, v3-2-test has been updated
   via  565a30ac3208d89de617b28f4553911484033253 (commit)
   via  3219ed785330bbfac39aa738e8fc9cb0d7165f58 (commit)
   via  a4ffaff2e177a09b4f44a30f322dd9668ccbd380 (commit)
  from  64d4f290cf0aad962a0a3356473632a58e0e34df (commit)

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


- Log -
commit 565a30ac3208d89de617b28f4553911484033253
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Mar 28 09:56:21 2008 +0100

Fix blob used in pull_netr_AcctLockStr().
Thanks metze.

Guenther

commit 3219ed785330bbfac39aa738e8fc9cb0d7165f58
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Mar 28 09:55:18 2008 +0100

Re-run make idl.

Guenther

commit a4ffaff2e177a09b4f44a30f322dd9668ccbd380
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Mar 28 09:53:37 2008 +0100

Rename string to array in lsa_BinaryString.

Guenther

---

Summary of changes:
 source/librpc/gen_ndr/lsa.h |2 +-
 source/librpc/gen_ndr/ndr_lsa.c |   76 +++---
 source/librpc/idl/lsa.idl   |2 +-
 source/utils/net_rpc_samsync.c  |2 +-
 4 files changed, 41 insertions(+), 41 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/librpc/gen_ndr/lsa.h b/source/librpc/gen_ndr/lsa.h
index 4285a57..7686bec 100644
--- a/source/librpc/gen_ndr/lsa.h
+++ b/source/librpc/gen_ndr/lsa.h
@@ -43,7 +43,7 @@ struct lsa_AsciiStringLarge {
 struct lsa_BinaryString {
uint16_t length;
uint16_t size;
-   uint16_t *string;/* [unique,length_is(length/2),size_is(size/2)] */
+   uint16_t *array;/* [unique,length_is(length/2),size_is(size/2)] */
 }/* [public] */;
 
 struct lsa_LUID {
diff --git a/source/librpc/gen_ndr/ndr_lsa.c b/source/librpc/gen_ndr/ndr_lsa.c
index d881093..1aa055e 100644
--- a/source/librpc/gen_ndr/ndr_lsa.c
+++ b/source/librpc/gen_ndr/ndr_lsa.c
@@ -376,20 +376,20 @@ _PUBLIC_ void ndr_print_lsa_AsciiStringLarge(struct 
ndr_print *ndr, const char *
 
 _PUBLIC_ enum ndr_err_code ndr_push_lsa_BinaryString(struct ndr_push *ndr, int 
ndr_flags, const struct lsa_BinaryString *r)
 {
-   uint32_t cntr_string_1;
+   uint32_t cntr_array_1;
if (ndr_flags  NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r-length));
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r-size));
-   NDR_CHECK(ndr_push_unique_ptr(ndr, r-string));
+   NDR_CHECK(ndr_push_unique_ptr(ndr, r-array));
}
if (ndr_flags  NDR_BUFFERS) {
-   if (r-string) {
+   if (r-array) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r-size / 
2));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r-length / 
2));
-   for (cntr_string_1 = 0; cntr_string_1  r-length / 2; 
cntr_string_1++) {
-   NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 
r-string[cntr_string_1]));
+   for (cntr_array_1 = 0; cntr_array_1  r-length / 2; 
cntr_array_1++) {
+   NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 
r-array[cntr_array_1]));
}
}
}
@@ -398,44 +398,44 @@ _PUBLIC_ enum ndr_err_code 
ndr_push_lsa_BinaryString(struct ndr_push *ndr, int n
 
 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_BinaryString(struct ndr_pull *ndr, int 
ndr_flags, struct lsa_BinaryString *r)
 {
-   uint32_t _ptr_string;
-   uint32_t cntr_string_1;
-   TALLOC_CTX *_mem_save_string_0;
-   TALLOC_CTX *_mem_save_string_1;
+   uint32_t _ptr_array;
+   uint32_t cntr_array_1;
+   TALLOC_CTX *_mem_save_array_0;
+   TALLOC_CTX *_mem_save_array_1;
if (ndr_flags  NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r-length));
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r-size));
-   NDR_CHECK(ndr_pull_generic_ptr(ndr, _ptr_string));
-   if (_ptr_string) {
-   NDR_PULL_ALLOC(ndr, r-string);
+   NDR_CHECK(ndr_pull_generic_ptr(ndr, _ptr_array));
+   if (_ptr_array) {
+   NDR_PULL_ALLOC(ndr, r-array);
} else {
-   r-string = NULL;
+   r-array = NULL;
}
}
if (ndr_flags  NDR_BUFFERS) {
-   if (r-string) {
-   _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
-   NDR_PULL_SET_MEM_CTX(ndr, r-string, 0);
-   NDR_CHECK(ndr_pull_array_size(ndr, r-string));
-  

[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-1389-g326ae6c

2008-03-28 Thread Stefan Metzmacher
The branch, v4-0-test has been updated
   via  326ae6ce9c8a6f5800d5ecb4a2bfdfc32336797d (commit)
   via  91dd223bd432f0461c5c85259b4e48a1b7f83af1 (commit)
   via  a6cd4e7509dbd1aef4873c7c0eef2a13bc907880 (commit)
   via  89b7955733c34e9699a3b43ee54de92cb9469b90 (commit)
  from  2e14b4ea64ba7e223f29b5b535b1b1be326f711c (commit)

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


- Log -
commit 326ae6ce9c8a6f5800d5ecb4a2bfdfc32336797d
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Fri Mar 28 09:40:08 2008 +0100

torture: fix compiler warnings

metze

commit 91dd223bd432f0461c5c85259b4e48a1b7f83af1
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Fri Mar 28 09:39:32 2008 +0100

libcli/security: fix compiler warnings

metze

commit a6cd4e7509dbd1aef4873c7c0eef2a13bc907880
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Fri Mar 28 09:39:03 2008 +0100

cldap_server: fix compiler warning

metze

commit 89b7955733c34e9699a3b43ee54de92cb9469b90
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Fri Mar 28 07:56:20 2008 +0100

libreplace(samba4): let LIBREPLACE depend on LIBREPLACE_NETWORK for now

This should fix the build on solaris.
Later this needs better fixing...

metze

---

Summary of changes:
 source/cldap_server/cldap_server.h |2 ++
 source/lib/replace/samba.m4|2 +-
 source/libcli/security/security.h  |2 ++
 source/torture/util_provision.c|7 +++
 4 files changed, 8 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/cldap_server/cldap_server.h 
b/source/cldap_server/cldap_server.h
index e683d2b..da2bd20 100644
--- a/source/cldap_server/cldap_server.h
+++ b/source/cldap_server/cldap_server.h
@@ -29,4 +29,6 @@ struct cldapd_server {
struct ldb_context *samctx;
 };
 
+struct ldap_SearchRequest;
+
 #include cldap_server/proto.h
diff --git a/source/lib/replace/samba.m4 b/source/lib/replace/samba.m4
index e62c3d3..7984ef3 100644
--- a/source/lib/replace/samba.m4
+++ b/source/lib/replace/samba.m4
@@ -23,7 +23,7 @@ done
 
 SMB_SUBSYSTEM(LIBREPLACE,
[${LIBREPLACE_OBJS}],
-   [LIBREPLACE_EXT],
+   [LIBREPLACE_EXT LIBREPLACE_NETWORK],
[-Ilib/replace])
 
 LIBREPLACE_HOSTCC_OBJS=`echo ${LIBREPLACE_OBJS} |sed -e 's/\.o/\.ho/g'`
diff --git a/source/libcli/security/security.h 
b/source/libcli/security/security.h
index c7f2a09..46ef618 100644
--- a/source/libcli/security/security.h
+++ b/source/libcli/security/security.h
@@ -26,4 +26,6 @@ enum security_user_level {
SECURITY_SYSTEM
 };
 
+struct auth_session_info;
+
 #include libcli/security/proto.h
diff --git a/source/torture/util_provision.c b/source/torture/util_provision.c
index d7c8f47..d214fc1 100644
--- a/source/torture/util_provision.c
+++ b/source/torture/util_provision.c
@@ -20,6 +20,8 @@
 #include includes.h
 #include auth/auth.h
 #include lib/ldb_wrap.h
+#include torture/torture.h
+#include libcli/raw/libcliraw.h
 #include torture/util.h
 
 #include param/param.h
@@ -27,12 +29,9 @@
 #include scripting/python/modules.h
 
 NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
-   struct provision_settings 
*settings)
+   struct provision_settings *settings)
 {
-   bool ok;
PyObject *provision_mod, *provision_dict, *provision_fn, *result, 
*parameters;
-   struct ldb_context *ldb;
-   char *sam_ldb_path;

DEBUG(0,(Provision for Become-DC test using python\n));
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-1392-g764b787

2008-03-28 Thread Andrew Bartlett
The branch, v4-0-test has been updated
   via  764b7879d23bfa413a6747226f377ce2eaeaea26 (commit)
   via  727ef40c2b56910028ef3c1092b8eab1bfa6ce63 (commit)
   via  ebe5e8399422eb7e2ff4deb546338823e2718907 (commit)
  from  326ae6ce9c8a6f5800d5ecb4a2bfdfc32336797d (commit)

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


- Log -
commit 764b7879d23bfa413a6747226f377ce2eaeaea26
Merge: 727ef40c2b56910028ef3c1092b8eab1bfa6ce63 
326ae6ce9c8a6f5800d5ecb4a2bfdfc32336797d
Author: Andrew Bartlett [EMAIL PROTECTED]
Date:   Fri Mar 28 22:04:52 2008 +1100

Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 
4-0-local

commit 727ef40c2b56910028ef3c1092b8eab1bfa6ce63
Author: Andrew Bartlett [EMAIL PROTECTED]
Date:   Fri Mar 28 21:57:15 2008 +1100

Fix and test python scripts and kerberos

This fixes up the python credentials interface in a number of areas,
with the aim of supporting '-k yes' as a command line option.  (This
enables the use of kerberos).

As such, I've had to change the get_credentials call to take a
loadparm context, so that the credentials can be initialised
correctly.

The test_kinit script has been modified to prove that this continues
to work, as well as to provide greater code coverage of the kerberos
paths.

Andrew Bartlett

commit ebe5e8399422eb7e2ff4deb546338823e2718907
Author: Andrew Kroeger [EMAIL PROTECTED]
Date:   Fri Mar 28 01:08:49 2008 -0500

Convert some more files to GPLv3.

---

Summary of changes:
 source/auth/credentials/credentials.i |   13 +++-
 source/auth/credentials/credentials.py|5 +
 source/auth/credentials/credentials_wrap.c|  106 ++---
 source/auth/credentials/tests/bindings.py |2 +
 source/build/pasn1/asn1.yp|2 +-
 source/dsdb/samdb/ldb_modules/partition.c |2 +-
 source/dsdb/samdb/ldb_modules/samldb.c|2 +-
 source/dsdb/samdb/ldb_modules/schema.c|2 -
 source/dsdb/samdb/ldb_modules/schema_syntax.c |2 -
 source/dsdb/samdb/ldb_modules/schema_syntax.h |2 -
 source/lib/ldb/tests/python/ldap.py   |2 +-
 source/lib/policy/adm.h   |2 +-
 source/lib/policy/dumpadm.c   |2 +-
 source/lib/policy/lex.c   |2 +-
 source/lib/policy/lex.l   |2 +-
 source/lib/policy/parse_adm.y |2 +-
 source/lib/registry/hive.c|2 +-
 source/lib/registry/hive.h|2 +-
 source/lib/registry/local.c   |2 +-
 source/lib/registry/patchfile.h   |2 +-
 source/lib/registry/patchfile_dotreg.c|2 +-
 source/lib/registry/patchfile_preg.c  |2 +-
 source/lib/registry/tests/hive.c  |2 +-
 source/lib/registry/tests/registry.c  |2 +-
 source/libnet/libnet_group.h  |2 +-
 source/pidl/idl.yp|2 +-
 source/scripting/bin/smbstatus|2 +-
 source/scripting/bin/winreg   |2 +-
 source/scripting/libjs/auth.js|2 +-
 source/scripting/libjs/base.js|2 +-
 source/scripting/libjs/encoder.js |2 +-
 source/scripting/libjs/management.js  |2 +-
 source/scripting/libjs/provision.js   |2 +-
 source/scripting/libjs/samr.js|2 +-
 source/scripting/libjs/server_call.js |2 +-
 source/scripting/libjs/winreg.js  |2 +-
 source/scripting/python/samba/getopt.py   |   15 +++-
 source/scripting/python/samba/tests/samdb.py  |1 +
 source/scripting/python/subunit/__init__.py   |2 +-
 source/selftest/samba4_tests.sh   |2 +-
 source/selftest/test_win.sh   |2 +-
 source/selftest/win/VMHost.pm |2 +-
 source/selftest/win/common.exp|2 +-
 source/selftest/win/vm_get_ip.pl  |2 +-
 source/selftest/win/vm_load_snapshot.pl   |2 +-
 source/selftest/win/wintest_client.exp|2 +-
 source/selftest/win/wintest_remove.exp|2 +-
 source/selftest/win/wintest_setup.exp |2 +-
 source/setup/enableaccount|7 +-
 source/setup/newuser  |2 +-
 source/setup/provision|5 +-
 source/setup/provision-backend.js |2 +-
 source/setup/setpassword  |2 +-
 source/setup/upgrade.py   |6 +-
 source/torture/rpc/dfs.c  |2 +-
 source/torture/rpc/frsapi.c   |2 +-
 source/torture/rpc/spoolss_notify.c   |2 +-
 swat/scripting/client/call.js

[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-508-g34dd8f3

2008-03-28 Thread Günther Deschner
The branch, v3-2-test has been updated
   via  34dd8f32e1b7fe256ab5dfde5ef5bb8abeec121a (commit)
   via  7fa53911054a39681df3f08d19aad92f60d59e28 (commit)
   via  f8835462f2b88daa687edc79378511ffcb30905d (commit)
   via  62c876080c1f3afdd143d1f7f66529827b0f2990 (commit)
  from  565a30ac3208d89de617b28f4553911484033253 (commit)

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


- Log -
commit 34dd8f32e1b7fe256ab5dfde5ef5bb8abeec121a
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Mar 28 13:37:25 2008 +0100

Remove unneeded pack_dsdcinfo/unpack_dsdcinfo.

Guenther

commit 7fa53911054a39681df3f08d19aad92f60d59e28
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Mar 28 13:36:31 2008 +0100

Use NDR for netr_DsRGetDCNameInfo un-/marshalling in dsgetdcname.

Guenther

commit f8835462f2b88daa687edc79378511ffcb30905d
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Mar 28 13:31:40 2008 +0100

Re-run make idl.

Guenther

commit 62c876080c1f3afdd143d1f7f66529827b0f2990
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Mar 28 13:30:13 2008 +0100

Make netr_DsRGetDCNameInfo public.

Guenther

---

Summary of changes:
 source/librpc/gen_ndr/ndr_netlogon.c |4 +-
 source/librpc/gen_ndr/ndr_netlogon.h |2 +
 source/librpc/gen_ndr/netlogon.h |2 +-
 source/librpc/idl/netlogon.idl   |2 +-
 source/libsmb/dsgetdcname.c  |  186 +-
 5 files changed, 32 insertions(+), 164 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/librpc/gen_ndr/ndr_netlogon.c 
b/source/librpc/gen_ndr/ndr_netlogon.c
index 86535ca..7f340b6 100644
--- a/source/librpc/gen_ndr/ndr_netlogon.c
+++ b/source/librpc/gen_ndr/ndr_netlogon.c
@@ -6103,7 +6103,7 @@ _PUBLIC_ void ndr_print_netr_DsR_DcFlags(struct ndr_print 
*ndr, const char *name
ndr-depth--;
 }
 
-static enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, 
int ndr_flags, const struct netr_DsRGetDCNameInfo *r)
+_PUBLIC_ enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo(struct ndr_push 
*ndr, int ndr_flags, const struct netr_DsRGetDCNameInfo *r)
 {
if (ndr_flags  NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -6159,7 +6159,7 @@ static enum ndr_err_code 
ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, in
return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull *ndr, 
int ndr_flags, struct netr_DsRGetDCNameInfo *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull 
*ndr, int ndr_flags, struct netr_DsRGetDCNameInfo *r)
 {
uint32_t _ptr_dc_unc;
TALLOC_CTX *_mem_save_dc_unc_0;
diff --git a/source/librpc/gen_ndr/ndr_netlogon.h 
b/source/librpc/gen_ndr/ndr_netlogon.h
index dd9466b..3615e07 100644
--- a/source/librpc/gen_ndr/ndr_netlogon.h
+++ b/source/librpc/gen_ndr/ndr_netlogon.h
@@ -191,6 +191,8 @@ void ndr_print_netr_Blob(struct ndr_print *ndr, const char 
*name, const struct n
 void ndr_print_netr_DsRGetDCName_flags(struct ndr_print *ndr, const char 
*name, uint32_t r);
 void ndr_print_netr_DsRGetDCNameInfo_AddressType(struct ndr_print *ndr, const 
char *name, enum netr_DsRGetDCNameInfo_AddressType r);
 void ndr_print_netr_DsR_DcFlags(struct ndr_print *ndr, const char *name, 
uint32_t r);
+enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, int 
ndr_flags, const struct netr_DsRGetDCNameInfo *r);
+enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull *ndr, int 
ndr_flags, struct netr_DsRGetDCNameInfo *r);
 void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char *name, 
const struct netr_DsRGetDCNameInfo *r);
 void ndr_print_netr_BinaryString(struct ndr_print *ndr, const char *name, 
const struct netr_BinaryString *r);
 void ndr_print_netr_DomainQuery1(struct ndr_print *ndr, const char *name, 
const struct netr_DomainQuery1 *r);
diff --git a/source/librpc/gen_ndr/netlogon.h b/source/librpc/gen_ndr/netlogon.h
index b51c7cb..bcd9f4d 100644
--- a/source/librpc/gen_ndr/netlogon.h
+++ b/source/librpc/gen_ndr/netlogon.h
@@ -710,7 +710,7 @@ struct netr_DsRGetDCNameInfo {
uint32_t dc_flags;
const char *dc_site_name;/* [unique,charset(UTF16)] */
const char *client_site_name;/* [unique,charset(UTF16)] */
-};
+}/* [public] */;
 
 struct netr_BinaryString {
uint16_t length;
diff --git a/source/librpc/idl/netlogon.idl b/source/librpc/idl/netlogon.idl
index 8f07112..cbf78c7 100644
--- a/source/librpc/idl/netlogon.idl
+++ b/source/librpc/idl/netlogon.idl
@@ -1009,7 +1009,7 @@ interface netlogon
DS_DNS_FOREST= 0x8000
} netr_DsR_DcFlags;
 
-   typedef struct {
+   typedef [public] struct {

[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-512-g32c992e

2008-03-28 Thread Volker Lendecke
The branch, v3-2-test has been updated
   via  32c992e9573c9af34cd142393287e2f3538d2dd9 (commit)
   via  ce1bd43cdae63ff05aefaded419388e7b9e3ba9a (commit)
   via  e04fc36f223d8d905a930c077a6cf6c48ee57af7 (commit)
   via  99d980125054cbfef8ec85a31e83aa18a6e0bce3 (commit)
  from  34dd8f32e1b7fe256ab5dfde5ef5bb8abeec121a (commit)

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


- Log -
commit 32c992e9573c9af34cd142393287e2f3538d2dd9
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Fri Mar 28 12:05:54 2008 +0100

Fix a confusing variable name

commit ce1bd43cdae63ff05aefaded419388e7b9e3ba9a
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Thu Mar 27 22:54:10 2008 +0100

Fix a memory leak

commit e04fc36f223d8d905a930c077a6cf6c48ee57af7
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Wed Mar 26 18:39:11 2008 +0100

Make some fns static

commit 99d980125054cbfef8ec85a31e83aa18a6e0bce3
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Wed Mar 26 18:33:38 2008 +0100

printclose has only 1 vwv

---

Summary of changes:
 source/include/dbwrap.h   |4 ++--
 source/lib/sharesec.c |2 ++
 source/smbd/reply.c   |2 +-
 source/winbindd/idmap_cache.c |   21 +
 4 files changed, 10 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/dbwrap.h b/source/include/dbwrap.h
index 654c7a4..fe84709 100644
--- a/source/include/dbwrap.h
+++ b/source/include/dbwrap.h
@@ -34,11 +34,11 @@ struct db_context {
int (*fetch)(struct db_context *db, TALLOC_CTX *mem_ctx,
 TDB_DATA key, TDB_DATA *data);
int (*traverse)(struct db_context *db,
-   int (*f)(struct db_record *db,
+   int (*f)(struct db_record *rec,
 void *private_data),
void *private_data);
int (*traverse_read)(struct db_context *db,
-int (*f)(struct db_record *db,
+int (*f)(struct db_record *rec,
  void *private_data),
 void *private_data);
int (*get_seqnum)(struct db_context *db);
diff --git a/source/lib/sharesec.c b/source/lib/sharesec.c
index 5a8984f..2338cca 100644
--- a/source/lib/sharesec.c
+++ b/source/lib/sharesec.c
@@ -137,6 +137,8 @@ SEC_DESC *get_share_security( TALLOC_CTX *ctx, const char 
*servicename,
 
status = unmarshall_sec_desc(ctx, data.dptr, data.dsize, psd);
 
+   SAFE_FREE(data.dptr);
+
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, (unmarshall_sec_desc failed: %s\n,
  nt_errstr(status)));
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index 91d5f25..bababfe 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -4622,7 +4622,7 @@ void reply_printclose(struct smb_request *req)
 
START_PROFILE(SMBsplclose);
 
-   if (req-wct  3) {
+   if (req-wct  1) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
END_PROFILE(SMBsplclose);
return;
diff --git a/source/winbindd/idmap_cache.c b/source/winbindd/idmap_cache.c
index cf46196..f7e1d4e 100644
--- a/source/winbindd/idmap_cache.c
+++ b/source/winbindd/idmap_cache.c
@@ -70,12 +70,8 @@ struct idmap_cache_ctx *idmap_cache_init(TALLOC_CTX *memctx)
return cache;
 }
 
-void idmap_cache_shutdown(struct idmap_cache_ctx *cache)
-{
-   talloc_free(cache);
-}
-
-NTSTATUS idmap_cache_build_sidkey(TALLOC_CTX *ctx, char **sidkey, const struct 
id_map *id)
+static NTSTATUS idmap_cache_build_sidkey(TALLOC_CTX *ctx, char **sidkey,
+const struct id_map *id)
 {
fstring sidstr;
 
@@ -89,7 +85,8 @@ NTSTATUS idmap_cache_build_sidkey(TALLOC_CTX *ctx, char 
**sidkey, const struct i
return NT_STATUS_OK;
 }
 
-NTSTATUS idmap_cache_build_idkey(TALLOC_CTX *ctx, char **idkey, const struct 
id_map *id)
+static NTSTATUS idmap_cache_build_idkey(TALLOC_CTX *ctx, char **idkey,
+   const struct id_map *id)
 {
*idkey = talloc_asprintf(ctx, IDMAP/%s/%lu,
(id-xid.type==ID_TYPE_UID)?UID:GID,
@@ -256,7 +253,7 @@ done:
return ret;
 }
 
-NTSTATUS idmap_cache_fill_map(struct id_map *id, const char *value)
+static NTSTATUS idmap_cache_fill_map(struct id_map *id, const char *value)
 {
char *rem;
 
@@ -304,14 +301,6 @@ failed:
return NT_STATUS_INTERNAL_DB_CORRUPTION;
 }
 
-bool idmap_cache_is_negative(const char *val)
-{
-   if ( ! strcmp(IDMAP/NEGATIVE, val)) {
-   return True;
-   }
-   return False;
-}
-
 /* search the cahce for the SID an return a mapping if found *
  *
  * 4 cases are possible


-- 

[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-513-g40d1d64

2008-03-28 Thread Volker Lendecke
The branch, v3-2-test has been updated
   via  40d1d64c6a2ae128eb3fce0e7f5351b0c5942f30 (commit)
  from  32c992e9573c9af34cd142393287e2f3538d2dd9 (commit)

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


- Log -
commit 40d1d64c6a2ae128eb3fce0e7f5351b0c5942f30
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Fri Mar 28 10:34:37 2008 +0100

Fix a segfault

---

Summary of changes:
 source/groupdb/mapping_tdb.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/groupdb/mapping_tdb.c b/source/groupdb/mapping_tdb.c
index 9f2b250..d4ee523 100644
--- a/source/groupdb/mapping_tdb.c
+++ b/source/groupdb/mapping_tdb.c
@@ -130,7 +130,7 @@ static bool add_mapping_entry(GROUP_MAP *map, int flag)
return NULL;
}
 
-   len = tdb_pack(NULL, sizeof(buf), ddff,
+   len = tdb_pack(NULL, 0, ddff,
map-gid, map-sid_name_use, map-nt_name, map-comment);
 
buf = TALLOC_ARRAY(key, char, len);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-516-gcc65489

2008-03-28 Thread Günther Deschner
The branch, v3-2-test has been updated
   via  cc654892c0d76dea001cd8f7bd6f50cf9e89e9c9 (commit)
   via  9e7d673ac44f500863bcbd0198452adc7c5027f9 (commit)
   via  2134d80c05fd7a37f44317335b40d7961c429c7b (commit)
  from  40d1d64c6a2ae128eb3fce0e7f5351b0c5942f30 (commit)

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


- Log -
commit cc654892c0d76dea001cd8f7bd6f50cf9e89e9c9
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Mar 28 14:13:27 2008 +0100

Add Support for DOMAIN\DCNAME syntax in libnetjoin.
This format is used by Windows to enforce joining to a specific DC.

Guenther

commit 9e7d673ac44f500863bcbd0198452adc7c5027f9
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Mar 28 13:53:33 2008 +0100

Let libnetjoin find the dc in wkssvc NetrJoinDomain2/UnjoinDomain2.

Guenther

commit 2134d80c05fd7a37f44317335b40d7961c429c7b
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Mar 28 13:40:13 2008 +0100

Check for buffer in decode_wkssvc_join_password_buffer.

Guenther

---

Summary of changes:
 source/libnet/libnet_join.c   |   58 +
 source/libsmb/smbencrypt.c|   11 ++-
 source/rpc_server/srv_wkssvc_nt.c |   30 ---
 3 files changed, 68 insertions(+), 31 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libnet/libnet_join.c b/source/libnet/libnet_join.c
index 6d5449f..f55d558 100644
--- a/source/libnet/libnet_join.c
+++ b/source/libnet/libnet_join.c
@@ -1314,6 +1314,48 @@ static WERROR libnet_unjoin_config(struct 
libnet_UnjoinCtx *r)
 /
 /
 
+static bool libnet_parse_domain_dc(TALLOC_CTX *mem_ctx,
+  const char *domain_str,
+  const char **domain_p,
+  const char **dc_p)
+{
+   char *domain = NULL;
+   char *dc = NULL;
+   const char *p = NULL;
+
+   if (!domain_str || !domain_p || !dc_p) {
+   return false;
+   }
+
+   p = strchr_m(domain_str, '\\');
+
+   if (p != NULL) {
+   domain = talloc_strndup(mem_ctx, domain_str,
+PTR_DIFF(p, domain_str));
+   dc = talloc_strdup(mem_ctx, p+1);
+   if (!dc) {
+   return false;
+   }
+   } else {
+   domain = talloc_strdup(mem_ctx, domain_str);
+   dc = NULL;
+   }
+   if (!domain) {
+   return false;
+   }
+
+   *domain_p = domain;
+
+   if (!*dc_p  dc) {
+   *dc_p = dc;
+   }
+
+   return true;
+}
+
+/
+/
+
 static WERROR libnet_join_pre_processing(TALLOC_CTX *mem_ctx,
 struct libnet_JoinCtx *r)
 {
@@ -1323,6 +1365,14 @@ static WERROR libnet_join_pre_processing(TALLOC_CTX 
*mem_ctx,
return WERR_INVALID_PARAM;
}
 
+   if (!libnet_parse_domain_dc(mem_ctx, r-in.domain_name,
+   r-in.domain_name,
+   r-in.dc_name)) {
+   libnet_join_set_error_string(mem_ctx, r,
+   Failed to parse domain name);
+   return WERR_INVALID_PARAM;
+   }
+
if (r-in.modify_config  !lp_config_backend_is_registry()) {
libnet_join_set_error_string(mem_ctx, r,
Configuration manipulation requested but not 
@@ -1654,6 +1704,14 @@ static WERROR libnet_unjoin_pre_processing(TALLOC_CTX 
*mem_ctx,
return WERR_INVALID_PARAM;
}
 
+   if (!libnet_parse_domain_dc(mem_ctx, r-in.domain_name,
+   r-in.domain_name,
+   r-in.dc_name)) {
+   libnet_unjoin_set_error_string(mem_ctx, r,
+   Failed to parse domain name);
+   return WERR_INVALID_PARAM;
+   }
+
if (r-in.modify_config  !lp_config_backend_is_registry()) {
libnet_unjoin_set_error_string(mem_ctx, r,
Configuration manipulation requested but not 
diff --git a/source/libsmb/smbencrypt.c b/source/libsmb/smbencrypt.c
index c547a4a..e7198b8 100644
--- a/source/libsmb/smbencrypt.c
+++ b/source/libsmb/smbencrypt.c
@@ -748,16 +748,24 @@ WERROR decode_wkssvc_join_password_buffer(TALLOC_CTX 
*mem_ctx,
struct MD5Context ctx;
uint32_t pwd_len;
 
-   DATA_BLOB confounded_session_key = data_blob_talloc(mem_ctx, NULL, 16);
+   DATA_BLOB confounded_session_key;
 
   

[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-523-g7714f92

2008-03-28 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  7714f9232110b2ee50e6ba8371f0bc23b83717a6 (commit)
   via  8945dce4a18874bdf1a57f1ff8116a66a6f699a0 (commit)
   via  5a0ae1ad0c36e5ef97008a2c6bc2a921ca6538bd (commit)
   via  ff16b66631bc93909c0e7adf9e6bb1cf1d641ffd (commit)
   via  7a4de23aa318bd24948e576a5582a5c74d335154 (commit)
   via  df127f0b40d36ea8ee605c24ea88558c7d40a7fe (commit)
   via  38007a387a1f1b53877ef9ea518f83ecf026f4f3 (commit)
  from  cc654892c0d76dea001cd8f7bd6f50cf9e89e9c9 (commit)

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


- Log -
commit 7714f9232110b2ee50e6ba8371f0bc23b83717a6
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Mon Mar 24 21:05:30 2008 +0100

wbinfo: use wbcDomainInfo()

metze

commit 8945dce4a18874bdf1a57f1ff8116a66a6f699a0
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Mon Mar 24 20:44:34 2008 +0100

wbinfo: use wbcGetgrnam()

metze

commit 5a0ae1ad0c36e5ef97008a2c6bc2a921ca6538bd
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Mon Mar 24 20:32:14 2008 +0100

wbinfo: use wbcListUsers() and wbcListGroups()

metze

commit ff16b66631bc93909c0e7adf9e6bb1cf1d641ffd
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Sun Mar 23 22:41:45 2008 +0100

wbinfo: use wbcLookupUserSids()

metze

commit 7a4de23aa318bd24948e576a5582a5c74d335154
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Mon Mar 24 21:07:01 2008 +0100

libwbclient: remove prototype of non existing wbcDomainSequenceNumbers()

metze

commit df127f0b40d36ea8ee605c24ea88558c7d40a7fe
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Mon Mar 24 20:31:37 2008 +0100

libwbclient: add wbcListUsers() and wbcListGroups()

metze

commit 38007a387a1f1b53877ef9ea518f83ecf026f4f3
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Fri Mar 21 10:18:54 2008 +0100

libwbclient: add wbcLookupUserSids()

metze

---

Summary of changes:
 source/nsswitch/libwbclient/wbc_sid.c  |  224 ++
 source/nsswitch/libwbclient/wbclient.h |   15 ++-
 source/nsswitch/wbinfo.c   |  233 +++-
 3 files changed, 348 insertions(+), 124 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/nsswitch/libwbclient/wbc_sid.c 
b/source/nsswitch/libwbclient/wbc_sid.c
index 0519d8b..6ef9f44 100644
--- a/source/nsswitch/libwbclient/wbc_sid.c
+++ b/source/nsswitch/libwbclient/wbc_sid.c
@@ -423,3 +423,227 @@ wbcErr wbcLookupRids(struct wbcDomainSid *dom_sid,
 
return wbc_status;
 }
+
+/** @brief Get the groups a user belongs to
+ *
+ **/
+
+wbcErr wbcLookupUserSids(const struct wbcDomainSid *user_sid,
+bool domain_groups_only,
+uint32_t *num_sids,
+struct wbcDomainSid **_sids)
+{
+   uint32_t i;
+   const char *s;
+   struct winbindd_request request;
+   struct winbindd_response response;
+   char *sid_string = NULL;
+   struct wbcDomainSid *sids = NULL;
+   wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
+   int cmd;
+
+   /* Initialise request */
+
+   ZERO_STRUCT(request);
+   ZERO_STRUCT(response);
+
+   if (!user_sid) {
+   wbc_status = WBC_ERR_INVALID_PARAM;
+   BAIL_ON_WBC_ERROR(wbc_status);
+   }
+
+   wbc_status = wbcSidToString(user_sid, sid_string);
+   BAIL_ON_WBC_ERROR(wbc_status);
+
+   strncpy(request.data.sid, sid_string, sizeof(request.data.sid)-1);
+   wbcFreeMemory(sid_string);
+
+   if (domain_groups_only) {
+   cmd = WINBINDD_GETUSERDOMGROUPS;
+   } else {
+   cmd = WINBINDD_GETUSERSIDS;
+   }
+
+   wbc_status = wbcRequestResponse(cmd,
+   request,
+   response);
+   BAIL_ON_WBC_ERROR(wbc_status);
+
+   if (response.data.num_entries 
+   !response.extra_data.data) {
+   wbc_status = WBC_INVALID_RESPONSE;
+   BAIL_ON_WBC_ERROR(wbc_status);
+   }
+
+   sids = talloc_array(NULL, struct wbcDomainSid,
+   response.data.num_entries);
+   BAIL_ON_PTR_ERROR(sids, wbc_status);
+
+   s = (const char *)response.extra_data.data;
+   for (i = 0; i  response.data.num_entries; i++) {
+   char *n = strchr(s, '\n');
+   if (n) {
+   *n = '\0';
+   }
+   wbc_status = wbcStringToSid(s, sids[i]);
+   BAIL_ON_WBC_ERROR(wbc_status);
+   s += strlen(s) + 1;
+   }
+
+   *num_sids = response.data.num_entries;
+   *_sids = sids;
+   sids = NULL;
+   wbc_status = WBC_ERR_SUCCESS;
+
+ done:
+   if (response.extra_data.data) {
+   

[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-524-gfcb4979

2008-03-28 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  fcb497951a86551ce9c4be7b352335dad3be127a (commit)
  from  7714f9232110b2ee50e6ba8371f0bc23b83717a6 (commit)

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


- Log -
commit fcb497951a86551ce9c4be7b352335dad3be127a
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Fri Mar 28 07:56:20 2008 +0100

libreplace(samba4): let LIBREPLACE depend on LIBREPLACE_NETWORK for now

This should fix the build on solaris.
Later this needs better fixing...

metze
(cherry picked from commit 89b7955733c34e9699a3b43ee54de92cb9469b90)

---

Summary of changes:
 source/lib/replace/samba.m4 |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/replace/samba.m4 b/source/lib/replace/samba.m4
index e62c3d3..7984ef3 100644
--- a/source/lib/replace/samba.m4
+++ b/source/lib/replace/samba.m4
@@ -23,7 +23,7 @@ done
 
 SMB_SUBSYSTEM(LIBREPLACE,
[${LIBREPLACE_OBJS}],
-   [LIBREPLACE_EXT],
+   [LIBREPLACE_EXT LIBREPLACE_NETWORK],
[-Ilib/replace])
 
 LIBREPLACE_HOSTCC_OBJS=`echo ${LIBREPLACE_OBJS} |sed -e 's/\.o/\.ho/g'`


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-525-g8dd6458

2008-03-28 Thread Volker Lendecke
The branch, v3-2-test has been updated
   via  8dd6458049d1b9d6849730ac19c39b049a68f302 (commit)
  from  fcb497951a86551ce9c4be7b352335dad3be127a (commit)

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


- Log -
commit 8dd6458049d1b9d6849730ac19c39b049a68f302
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Fri Mar 28 15:21:14 2008 +0100

More ssize_t-SMB_OFF_T

---

Summary of changes:
 source/client/client.c   |2 +-
 source/libsmb/clireadwrite.c |   10 +-
 2 files changed, 6 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/client.c b/source/client/client.c
index 0b4438d..882ed4d 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -981,7 +981,7 @@ static int do_get(const char *rname, const char *lname_in, 
bool reget)
uint16 attr;
SMB_OFF_T size;
off_t start = 0;
-   ssize_t nread = 0;
+   SMB_OFF_T nread = 0;
int rc = 0;
struct cli_state *targetcli = NULL;
char *targetname = NULL;
diff --git a/source/libsmb/clireadwrite.c b/source/libsmb/clireadwrite.c
index f292fcb..668a269 100644
--- a/source/libsmb/clireadwrite.c
+++ b/source/libsmb/clireadwrite.c
@@ -191,7 +191,7 @@ struct cli_pull_state {
/*
 * For how many bytes did we send requests already?
 */
-   off_t requested;
+   SMB_OFF_T requested;
 
/*
 * Next request index to push into sink. This walks around the req
@@ -205,7 +205,7 @@ struct cli_pull_state {
 * How many bytes did we push into sink?
 */
 
-   off_t pushed;
+   SMB_OFF_T pushed;
 };
 
 static char *cli_pull_print(TALLOC_CTX *mem_ctx, struct async_req *req)
@@ -412,7 +412,7 @@ static void cli_pull_read_done(struct async_req *read_req)
async_req_done(pull_req);
 }
 
-NTSTATUS cli_pull_recv(struct async_req *req, ssize_t *received)
+NTSTATUS cli_pull_recv(struct async_req *req, SMB_OFF_T *received)
 {
struct cli_pull_state *state = talloc_get_type_abort(
req-private_data, struct cli_pull_state);
@@ -428,7 +428,7 @@ NTSTATUS cli_pull_recv(struct async_req *req, ssize_t 
*received)
 NTSTATUS cli_pull(struct cli_state *cli, uint16_t fnum,
  off_t start_offset, SMB_OFF_T size, size_t window_size,
  NTSTATUS (*sink)(char *buf, size_t n, void *priv),
- void *priv, ssize_t *received)
+ void *priv, SMB_OFF_T *received)
 {
TALLOC_CTX *frame = talloc_stackframe();
struct async_req *req;
@@ -466,7 +466,7 @@ ssize_t cli_read(struct cli_state *cli, int fnum, char *buf,
 off_t offset, size_t size)
 {
NTSTATUS status;
-   ssize_t ret;
+   SMB_OFF_T ret;
 
status = cli_pull(cli, fnum, offset, size, size,
  cli_read_sink, buf, ret);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-0pre2-242-g1a59097

2008-03-28 Thread Karolin Seeger
The branch, v3-2-stable has been updated
   via  1a59097946294d30e6fbd99c77021929f32a1557 (commit)
   via  fa47ae8880e08b968f530e602b0db4dd861de7e5 (commit)
   via  b9c19c5ff18c2c5383943193b31d72cd6c55a75b (commit)
  from  328c2282386079b94b65496b2f6b508044110b55 (commit)

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


- Log -
commit 1a59097946294d30e6fbd99c77021929f32a1557
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Thu Mar 27 22:54:10 2008 +0100

Fix a memory leak
(cherry picked from commit ce1bd43cdae63ff05aefaded419388e7b9e3ba9a)

commit fa47ae8880e08b968f530e602b0db4dd861de7e5
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Wed Mar 26 18:33:38 2008 +0100

printclose has only 1 vwv
(cherry picked from commit 99d980125054cbfef8ec85a31e83aa18a6e0bce3)

commit b9c19c5ff18c2c5383943193b31d72cd6c55a75b
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Fri Mar 28 15:21:14 2008 +0100

More ssize_t-SMB_OFF_T
(cherry picked from commit 8dd6458049d1b9d6849730ac19c39b049a68f302)

---

Summary of changes:
 source/client/client.c   |2 +-
 source/lib/sharesec.c|2 ++
 source/libsmb/clireadwrite.c |   10 +-
 source/smbd/reply.c  |2 +-
 4 files changed, 9 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/client.c b/source/client/client.c
index cda5a6a..67e5030 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -981,7 +981,7 @@ static int do_get(const char *rname, const char *lname_in, 
bool reget)
uint16 attr;
SMB_OFF_T size;
off_t start = 0;
-   ssize_t nread = 0;
+   SMB_OFF_T nread = 0;
int rc = 0;
struct cli_state *targetcli = NULL;
char *targetname = NULL;
diff --git a/source/lib/sharesec.c b/source/lib/sharesec.c
index 5a8984f..2338cca 100644
--- a/source/lib/sharesec.c
+++ b/source/lib/sharesec.c
@@ -137,6 +137,8 @@ SEC_DESC *get_share_security( TALLOC_CTX *ctx, const char 
*servicename,
 
status = unmarshall_sec_desc(ctx, data.dptr, data.dsize, psd);
 
+   SAFE_FREE(data.dptr);
+
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, (unmarshall_sec_desc failed: %s\n,
  nt_errstr(status)));
diff --git a/source/libsmb/clireadwrite.c b/source/libsmb/clireadwrite.c
index f292fcb..668a269 100644
--- a/source/libsmb/clireadwrite.c
+++ b/source/libsmb/clireadwrite.c
@@ -191,7 +191,7 @@ struct cli_pull_state {
/*
 * For how many bytes did we send requests already?
 */
-   off_t requested;
+   SMB_OFF_T requested;
 
/*
 * Next request index to push into sink. This walks around the req
@@ -205,7 +205,7 @@ struct cli_pull_state {
 * How many bytes did we push into sink?
 */
 
-   off_t pushed;
+   SMB_OFF_T pushed;
 };
 
 static char *cli_pull_print(TALLOC_CTX *mem_ctx, struct async_req *req)
@@ -412,7 +412,7 @@ static void cli_pull_read_done(struct async_req *read_req)
async_req_done(pull_req);
 }
 
-NTSTATUS cli_pull_recv(struct async_req *req, ssize_t *received)
+NTSTATUS cli_pull_recv(struct async_req *req, SMB_OFF_T *received)
 {
struct cli_pull_state *state = talloc_get_type_abort(
req-private_data, struct cli_pull_state);
@@ -428,7 +428,7 @@ NTSTATUS cli_pull_recv(struct async_req *req, ssize_t 
*received)
 NTSTATUS cli_pull(struct cli_state *cli, uint16_t fnum,
  off_t start_offset, SMB_OFF_T size, size_t window_size,
  NTSTATUS (*sink)(char *buf, size_t n, void *priv),
- void *priv, ssize_t *received)
+ void *priv, SMB_OFF_T *received)
 {
TALLOC_CTX *frame = talloc_stackframe();
struct async_req *req;
@@ -466,7 +466,7 @@ ssize_t cli_read(struct cli_state *cli, int fnum, char *buf,
 off_t offset, size_t size)
 {
NTSTATUS status;
-   ssize_t ret;
+   SMB_OFF_T ret;
 
status = cli_pull(cli, fnum, offset, size, size,
  cli_read_sink, buf, ret);
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index 818ff31..b3f0fc5 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -4622,7 +4622,7 @@ void reply_printclose(struct smb_request *req)
 
START_PROFILE(SMBsplclose);
 
-   if (req-wct  3) {
+   if (req-wct  1) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
END_PROFILE(SMBsplclose);
return;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-526-g3250068

2008-03-28 Thread Michael Adam
The branch, v3-2-test has been updated
   via  3250068eb980bd0489f814f702401cdc9c925a8d (commit)
  from  8dd6458049d1b9d6849730ac19c39b049a68f302 (commit)

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


- Log -
commit 3250068eb980bd0489f814f702401cdc9c925a8d
Author: Michael Adam [EMAIL PROTECTED]
Date:   Fri Mar 28 01:21:49 2008 +0100

net: add a net registry subcommand to locally access the registry.

The interface is like that of net rpc registry.
Access is direct local access to the registry tdb through reg_api.

Michael

---

Summary of changes:
 source/Makefile.in  |4 +-
 source/utils/net.c  |1 +
 source/utils/net_registry.c |  530 +++
 3 files changed, 534 insertions(+), 1 deletions(-)
 create mode 100644 source/utils/net_registry.c


Changeset truncated at 500 lines:

diff --git a/source/Makefile.in b/source/Makefile.in
index c6e3af0..d586082 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -841,7 +841,9 @@ NET_OBJ1 = utils/net.o utils/net_ads.o utils/net_help.o \
   utils/netlookup.o utils/net_sam.o utils/net_rpc_shell.o \
   utils/net_util.o utils/net_rpc_sh_acct.o utils/net_rpc_audit.o \
   $(PASSWD_UTIL_OBJ) utils/net_dns.o utils/net_ads_gpo.o \
-  utils/net_conf.o auth/token_util.o utils/net_dom.o 
nsswitch/wb_client.o
+  utils/net_conf.o \
+  utils/net_registry.o \
+  auth/token_util.o utils/net_dom.o nsswitch/wb_client.o
 
 NET_OBJ = $(NET_OBJ1) $(PARAM_WITHOUT_REG_OBJ) $(SECRETS_OBJ) $(LIBSMB_OBJ) \
  $(RPC_PARSE_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
diff --git a/source/utils/net.c b/source/utils/net.c
index 1b21c5e..5706e33 100644
--- a/source/utils/net.c
+++ b/source/utils/net.c
@@ -1001,6 +1001,7 @@ static struct functable net_func[] = {
{USERSHARE, net_usershare},
{USERSIDLIST, net_usersidlist},
{CONF, net_conf},
+   {REGISTRY, net_registry},
 #ifdef WITH_FAKE_KASERVER
{AFS, net_afs},
 #endif
diff --git a/source/utils/net_registry.c b/source/utils/net_registry.c
new file mode 100644
index 000..dfa3555
--- /dev/null
+++ b/source/utils/net_registry.c
@@ -0,0 +1,530 @@
+/*
+ * Samba Unix/Linux SMB client library
+ * Distributed SMB/CIFS Server Management Utility
+ * Local registry interface
+ *
+ * Copyright (C) Michael Adam 2008
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 utils/net.h
+
+
+/*
+ *
+ * Helper functions
+ *
+ */
+
+static void print_registry_key(const char *keyname, NTTIME *modtime)
+{
+   d_printf(Keyname   = %s\n, keyname);
+   d_printf(Modtime   = %s\n,
+modtime
+? http_timestring(nt_time_to_unix(*modtime))
+: None);
+   d_printf(\n);
+}
+
+static void print_registry_value(const char *valname,
+const struct registry_value *valvalue)
+{
+   d_printf(Valuename  = %s\n, valname);
+   d_printf(Type   = %s\n,
+reg_type_lookup(valvalue-type));
+   switch(valvalue-type) {
+   case REG_DWORD:
+   d_printf(Value  = %d\n, valvalue-v.dword);
+   break;
+   case REG_SZ:
+   case REG_EXPAND_SZ:
+   d_printf(Value  = \%s\\n, valvalue-v.sz.str);
+   break;
+   case REG_MULTI_SZ: {
+   uint32 j;
+   for (j = 0; j  valvalue-v.multi_sz.num_strings; j++) {
+   d_printf(Value[%3.3d] = \%s\\n, j,
+valvalue-v.multi_sz.strings[j]);
+   }
+   break;
+   }
+   case REG_BINARY:
+   d_printf(Value  = %d bytes\n,
+(int)valvalue-v.binary.length);
+   break;
+   default:
+   d_printf(Value  = unprintable\n);
+   break;
+   }
+   d_printf(\n);
+}
+
+/**
+ * Split path into hive name and subkeyname
+ * normalizations performed:
+ *  - convert '/' to '\\'
+ *  - strip trailing '\\' chars
+ */
+static WERROR split_hive_key(TALLOC_CTX *ctx, const char *path,
+char **hivename, const char **subkeyname)

[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-528-g16b5800

2008-03-28 Thread Michael Adam
The branch, v3-2-test has been updated
   via  16b5800d4e3a8b88bac67b2550d14e0302a9 (commit)
   via  971f6749ed23523f6eafe5136f6d4c920c20aec4 (commit)
  from  3250068eb980bd0489f814f702401cdc9c925a8d (commit)

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


- Log -
commit 16b5800d4e3a8b88bac67b2550d14e0302a9
Author: Michael Adam [EMAIL PROTECTED]
Date:   Fri Mar 28 15:49:13 2008 +0100

Add a talloc context parameter to current_timestring() to fix memleaks.

current_timestring used to return a string talloced to talloc_tos().
When called by DEBUG from a TALLOC_FREE, this produced messages
no talloc stackframe around, leaking memory. For example when
used from net conf.

This also adds a temporary talloc context to alloc_sub_basic().
For this purpose, the exit strategy is slightly altered: a common
exit point is used for success and failure.

Michael

commit 971f6749ed23523f6eafe5136f6d4c920c20aec4
Author: Michael Adam [EMAIL PROTECTED]
Date:   Fri Mar 28 15:39:52 2008 +0100

srv_winreg: add a debug message to _winreg_CreateKey().

Michael

---

Summary of changes:
 source/lib/debug.c|   10 ++
 source/lib/substitute.c   |   24 +++-
 source/lib/time.c |4 ++--
 source/libsmb/trusts_util.c   |2 +-
 source/rpc_server/srv_winreg_nt.c |3 +++
 source/rpcclient/cmd_spoolss.c|   12 
 source/smbd/change_trust_pw.c |2 +-
 source/web/swat.c |6 +-
 8 files changed, 41 insertions(+), 22 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/debug.c b/source/lib/debug.c
index c4a0d1b..a76a8db 100644
--- a/source/lib/debug.c
+++ b/source/lib/debug.c
@@ -1029,12 +1029,14 @@ bool dbghdr(int level, int cls, const char *file, const 
char *func, int line)
/* Print it all out at once to prevent split syslog output. */
if( lp_debug_prefix_timestamp() ) {
(void)Debug1( [%s, %2d%s] ,
-   current_timestring(lp_debug_hires_timestamp()), level,
-   header_str);
+   current_timestring(debug_ctx(),
+  lp_debug_hires_timestamp()),
+   level, header_str);
} else {
(void)Debug1( [%s, %2d%s] %s:%s(%d)\n,
-   current_timestring(lp_debug_hires_timestamp()), level,
-   header_str, file, func, line );
+   current_timestring(debug_ctx(),
+  lp_debug_hires_timestamp()),
+   level, header_str, file, func, line );
}
}
 
diff --git a/source/lib/substitute.c b/source/lib/substitute.c
index 6ecc3fc..62dfdb5 100644
--- a/source/lib/substitute.c
+++ b/source/lib/substitute.c
@@ -548,6 +548,7 @@ char *alloc_sub_basic(const char *smb_name, const char 
*domain_name,
fstring pidstr, vnnstr;
char addr[INET6_ADDRSTRLEN];
const char *local_machine_name = get_local_machine_name();
+   TALLOC_CTX *tmp_ctx = NULL;
 
/* workaround to prevent a crash while looking at bug #687 */

@@ -561,12 +562,14 @@ char *alloc_sub_basic(const char *smb_name, const char 
*domain_name,
DEBUG(0, (alloc_sub_basic: Out of memory!\n));
return NULL;
}
-   
+
+   tmp_ctx = talloc_stackframe();
+
for (b = s = a_string; (p = strchr_m(s, '%')); s = a_string + (p - b)) {
 
r = NULL;
b = a_string;
-   
+
switch (*(p+1)) {
case 'U' : 
r = strdup_lower(smb_name);
@@ -581,7 +584,7 @@ char *alloc_sub_basic(const char *smb_name, const char 
*domain_name,
if (r == NULL) {
goto error;
}
-   pass = Get_Pwnam_alloc(talloc_tos(), r);
+   pass = Get_Pwnam_alloc(tmp_ctx, r);
if (pass != NULL) {
a_string = realloc_string_sub(
a_string, %G,
@@ -631,7 +634,7 @@ char *alloc_sub_basic(const char *smb_name, const char 
*domain_name,
a_string = realloc_string_sub(a_string, %R, 
remote_proto);
break;
case 'T' :
-   a_string = realloc_string_sub(a_string, %T, 
current_timestring(False));
+   a_string = realloc_string_sub(a_string, %T, 
current_timestring(tmp_ctx, False));
break;
case 'a' :
a_string = 

[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-530-gc0be84c

2008-03-28 Thread Günther Deschner
The branch, v3-2-test has been updated
   via  c0be84c96d8133c6b77d1f0efe41f5f2373febb3 (commit)
   via  380e9d26db5341d10807ccbfb413d0f53d3ffc71 (commit)
  from  16b5800d4e3a8b88bac67b2550d14e0302a9 (commit)

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


- Log -
commit c0be84c96d8133c6b77d1f0efe41f5f2373febb3
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Mar 28 16:39:02 2008 +0100

Support net ads join format while joining to a specific ou.

libnetjoin now supports Computers/Servers/Unix as well as
ou=Computers,ou=Servers,ou=Unix,dc=ber,dc=realm,dc=com.

Guenther

commit 380e9d26db5341d10807ccbfb413d0f53d3ffc71
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Mar 28 16:33:54 2008 +0100

Add ads_check_ou_dn().

Guenther

---

Summary of changes:
 source/libads/ldap.c|   47 +++
 source/libnet/libnet_join.c |5 
 2 files changed, 52 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libads/ldap.c b/source/libads/ldap.c
index 00d36b7..a9eff48 100644
--- a/source/libads/ldap.c
+++ b/source/libads/ldap.c
@@ -22,6 +22,7 @@
 */
 
 #include includes.h
+#include lib/ldb/include/includes.h
 
 #ifdef HAVE_LDAP
 
@@ -3551,4 +3552,50 @@ const char 
*ads_get_extended_right_name_by_guid(ADS_STRUCT *ads,

 }
 
+/**
+ * verify or build and verify an account ou
+ * @param mem_ctx Pointer to talloc context
+ * @param ads connection to ads server
+ * @param account_ou
+ * @return status of search
+ **/
+
+ADS_STATUS ads_check_ou_dn(TALLOC_CTX *mem_ctx,
+  ADS_STRUCT *ads,
+  const char *account_ou)
+{
+   struct ldb_dn *name_dn = NULL;
+   const char *name = NULL;
+   char *ou_string = NULL;
+
+   name_dn = ldb_dn_explode(mem_ctx, account_ou);
+   if (name_dn) {
+   return ADS_SUCCESS;
+   }
+
+   ou_string = ads_ou_string(ads, account_ou);
+   if (!ou_string) {
+   return ADS_ERROR_LDAP(LDAP_INVALID_DN_SYNTAX);
+   }
+
+   name = talloc_asprintf(mem_ctx, %s,%s, ou_string,
+  ads-config.bind_path);
+   SAFE_FREE(ou_string);
+   if (!name) {
+   return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
+   }
+
+   name_dn = ldb_dn_explode(mem_ctx, name);
+   if (!name_dn) {
+   return ADS_ERROR_LDAP(LDAP_INVALID_DN_SYNTAX);
+   }
+
+   account_ou = talloc_strdup(mem_ctx, name);
+   if (!account_ou) {
+   return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
+   }
+
+   return ADS_SUCCESS;
+}
+
 #endif
diff --git a/source/libnet/libnet_join.c b/source/libnet/libnet_join.c
index f55d558..90e1b59 100644
--- a/source/libnet/libnet_join.c
+++ b/source/libnet/libnet_join.c
@@ -207,6 +207,11 @@ static ADS_STATUS 
libnet_join_precreate_machine_acct(TALLOC_CTX *mem_ctx,
const char *attrs[] = { dn, NULL };
bool moved = false;
 
+   status = ads_check_ou_dn(mem_ctx, r-in.ads, r-in.account_ou);
+   if (!ADS_ERR_OK(status)) {
+   return status;
+   }
+
status = ads_search_dn(r-in.ads, res, r-in.account_ou, attrs);
if (!ADS_ERR_OK(status)) {
return status;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-531-gd090d25

2008-03-28 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  d090d25cb702965b3d5e4635a26a06f2b62d235d (commit)
  from  c0be84c96d8133c6b77d1f0efe41f5f2373febb3 (commit)

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


- Log -
commit d090d25cb702965b3d5e4635a26a06f2b62d235d
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Mar 28 10:12:07 2008 -0700

Fix bug #5326 - OS/2 servers give strange high word replies for print 
jobs.
Jeremy.

---

Summary of changes:
 source/libsmb/clireadwrite.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libsmb/clireadwrite.c b/source/libsmb/clireadwrite.c
index 668a269..e79fd90 100644
--- a/source/libsmb/clireadwrite.c
+++ b/source/libsmb/clireadwrite.c
@@ -745,7 +745,9 @@ ssize_t cli_write(struct cli_state *cli,
break;
 
bwritten += SVAL(cli-inbuf, smb_vwv2);
-   bwritten += (((int)(SVAL(cli-inbuf, smb_vwv4)))16);
+   if (writesize  0x) {
+   bwritten += (((int)(SVAL(cli-inbuf, smb_vwv4)))16);
+   }
}
 
while (received  issued  cli_receive_smb(cli)) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-0-test updated - release-3-0-28a-15-g4648c1a

2008-03-28 Thread Jeremy Allison
The branch, v3-0-test has been updated
   via  4648c1ab78ccf00893c10a024928f165101c8e12 (commit)
  from  106ef5ba82380e13bdaf5011a25653040cb481fc (commit)

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


- Log -
commit 4648c1ab78ccf00893c10a024928f165101c8e12
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Mar 28 10:13:39 2008 -0700

Fix bug #5326 - OS/2 servers give strange high word replies for print 
jobs.
Jeremy.

---

Summary of changes:
 source/libsmb/clireadwrite.c |8 ++--
 1 files changed, 6 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libsmb/clireadwrite.c b/source/libsmb/clireadwrite.c
index dd7ddce..81e9043 100644
--- a/source/libsmb/clireadwrite.c
+++ b/source/libsmb/clireadwrite.c
@@ -352,10 +352,12 @@ ssize_t cli_write(struct cli_state *cli,
}
 
while (received  blocks) {
+   ssize_t size1;
 
while ((issued - received  mpx)  (issued  blocks)) {
ssize_t bsent = issued * block;
-   ssize_t size1 = MIN(block, size - bsent);
+
+   size1 = MIN(block, size - bsent);
 
if (!cli_issue_write(cli, fnum, offset + bsent,
write_mode,
@@ -374,7 +376,9 @@ ssize_t cli_write(struct cli_state *cli,
break;
 
bwritten += SVAL(cli-inbuf, smb_vwv2);
-   bwritten += (((int)(SVAL(cli-inbuf, smb_vwv4)))16);
+   if (size1  0x) {
+   bwritten += (((int)(SVAL(cli-inbuf, smb_vwv4)))16);
+   }
}
 
while (received  issued  cli_receive_smb(cli))


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-532-g235c056

2008-03-28 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  235c056a0ecbb70b21a2572d42c32067dd699988 (commit)
  from  d090d25cb702965b3d5e4635a26a06f2b62d235d (commit)

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


- Log -
commit 235c056a0ecbb70b21a2572d42c32067dd699988
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Fri Mar 28 15:06:56 2008 +0100

mapping_ldb: fix memory leak in group enumeration

metze

---

Summary of changes:
 source/groupdb/mapping_ldb.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/groupdb/mapping_ldb.c b/source/groupdb/mapping_ldb.c
index 454fe46..6775f61 100644
--- a/source/groupdb/mapping_ldb.c
+++ b/source/groupdb/mapping_ldb.c
@@ -310,7 +310,7 @@ static bool enum_group_mapping(const DOM_SID *domsid, enum 
lsa_SidType sid_name_
int i, ret;
char *expr;
fstring name;
-   struct ldb_result *res;
+   struct ldb_result *res = NULL;
struct ldb_dn *basedn=NULL;
TALLOC_CTX *tmp_ctx;
 
@@ -333,6 +333,7 @@ static bool enum_group_mapping(const DOM_SID *domsid, enum 
lsa_SidType sid_name_
}
 
ret = ldb_search(ldb, basedn, LDB_SCOPE_SUBTREE, expr, NULL, res);
+   talloc_steal(tmp_ctx, res);
if (ret != LDB_SUCCESS) goto failed;
 
(*pp_rmap) = NULL;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-533-g72101a7

2008-03-28 Thread Günther Deschner
The branch, v3-2-test has been updated
   via  72101a7d0868b19a413b17f8142637f92c6cdad5 (commit)
  from  235c056a0ecbb70b21a2572d42c32067dd699988 (commit)

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


- Log -
commit 72101a7d0868b19a413b17f8142637f92c6cdad5
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Mar 28 23:39:57 2008 +0100

Add some paranoia fixes for _wkssvc_NetrJoinDomain2/UnjoinDomain2.

Guenther

---

Summary of changes:
 source/rpc_server/srv_wkssvc_nt.c |   24 ++--
 1 files changed, 22 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/rpc_server/srv_wkssvc_nt.c 
b/source/rpc_server/srv_wkssvc_nt.c
index f864aad..32d315f 100644
--- a/source/rpc_server/srv_wkssvc_nt.c
+++ b/source/rpc_server/srv_wkssvc_nt.c
@@ -4,7 +4,8 @@
  *
  *  Copyright (C) Andrew Tridgell  1992-1997,
  *  Copyright (C) Gerald (Jerry) Carter2006.
- *  
+ *  Copyright (C) Guenther Deschner2007-2008.
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
@@ -298,6 +299,10 @@ WERROR _wkssvc_NetrJoinDomain2(pipes_struct *p,
return WERR_INVALID_PARAM;
}
 
+   if (!r-in.admin_account || !r-in.encrypted_password) {
+   return WERR_INVALID_PARAM;
+   }
+
if (!user_has_privileges(token, se_machine_account) 
!nt_token_check_domain_rid(token, DOMAIN_GROUP_RID_ADMINS) 
!nt_token_check_domain_rid(token, BUILTIN_ALIAS_RID_ADMINS)) {
@@ -306,6 +311,11 @@ WERROR _wkssvc_NetrJoinDomain2(pipes_struct *p,
return WERR_ACCESS_DENIED;
}
 
+   if ((r-in.join_flags  WKSSVC_JOIN_FLAGS_MACHINE_PWD_PASSED) ||
+   (r-in.join_flags  WKSSVC_JOIN_FLAGS_JOIN_UNSECURE)) {
+   return WERR_NOT_SUPPORTED;
+   }
+
werr = decode_wkssvc_join_password_buffer(p-mem_ctx,
  r-in.encrypted_password,
  p-session_key,
@@ -336,7 +346,7 @@ WERROR _wkssvc_NetrJoinDomain2(pipes_struct *p,
unbecome_root();
 
if (!W_ERROR_IS_OK(werr)) {
-   DEBUG(5,(_wkssvc_NetrJoinDomain2: libnet_Join gave %s\n,
+   DEBUG(5,(_wkssvc_NetrJoinDomain2: libnet_Join failed with: 
%s\n,
j-out.error_string ? j-out.error_string :
dos_errstr(werr)));
}
@@ -359,6 +369,10 @@ WERROR _wkssvc_NetrUnjoinDomain2(pipes_struct *p,
WERROR werr;
struct nt_user_token *token = p-pipe_user.nt_user_token;
 
+   if (!r-in.account || !r-in.encrypted_password) {
+   return WERR_INVALID_PARAM;
+   }
+
if (!user_has_privileges(token, se_machine_account) 
!nt_token_check_domain_rid(token, DOMAIN_GROUP_RID_ADMINS) 
!nt_token_check_domain_rid(token, BUILTIN_ALIAS_RID_ADMINS)) {
@@ -396,6 +410,12 @@ WERROR _wkssvc_NetrUnjoinDomain2(pipes_struct *p,
werr = libnet_Unjoin(p-mem_ctx, u);
unbecome_root();
 
+   if (!W_ERROR_IS_OK(werr)) {
+   DEBUG(5,(_wkssvc_NetrUnjoinDomain2: libnet_Unjoin failed with: 
%s\n,
+   u-out.error_string ? u-out.error_string :
+   dos_errstr(werr)));
+   }
+
TALLOC_FREE(u);
return werr;
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-1393-g6e863e5

2008-03-28 Thread Andrew Bartlett
The branch, v4-0-test has been updated
   via  6e863e5fecf83f95ddc5b0149cf7093e2a6a1b07 (commit)
  from  764b7879d23bfa413a6747226f377ce2eaeaea26 (commit)

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


- Log -
commit 6e863e5fecf83f95ddc5b0149cf7093e2a6a1b07
Author: Andrew Bartlett [EMAIL PROTECTED]
Date:   Sat Mar 29 09:43:58 2008 +1100

Finally found the magic string to skip the python registry tests.

(I really do wish it was clear what strings should be used in this file)

Until these tests authenticate, we can't pass against Samba4, and they
never could pass against AD.

Andrew Bartlett

---

Summary of changes:
 source/samba4-skip |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/samba4-skip b/source/samba4-skip
index 4d2da6e..19ff924 100644
--- a/source/samba4-skip
+++ b/source/samba4-skip
@@ -46,3 +46,4 @@ nss.test  # Fails
 samba4.samba3sam.python# Conversion from EJS not yet finished
 samba4.samdb.python# Not finished yet
 raw.offline# Samba 4 doesn't have much offline support yet
+winreg*  #Does not authenticate against the target server


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-535-g58018ad

2008-03-28 Thread Günther Deschner
The branch, v3-2-test has been updated
   via  58018ad7f65409d971e5db7165f1b32b572cc275 (commit)
   via  1cd1c27a0e5aa87682820c8dd81188b7bcc6551a (commit)
  from  72101a7d0868b19a413b17f8142637f92c6cdad5 (commit)

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


- Log -
commit 58018ad7f65409d971e5db7165f1b32b572cc275
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Mar 28 23:46:26 2008 +0100

Re-run make idl.

Guenther

commit 1cd1c27a0e5aa87682820c8dd81188b7bcc6551a
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Mar 28 23:44:43 2008 +0100

Fill in netr_NegotiateFlags.

Guenther

---

Summary of changes:
 source/librpc/gen_ndr/ndr_netlogon.c |   69 --
 source/librpc/gen_ndr/ndr_netlogon.h |1 +
 source/librpc/gen_ndr/netlogon.h |   29 +-
 source/librpc/idl/netlogon.idl   |   40 
 4 files changed, 116 insertions(+), 23 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/librpc/gen_ndr/ndr_netlogon.c 
b/source/librpc/gen_ndr/ndr_netlogon.c
index 7f340b6..e634151 100644
--- a/source/librpc/gen_ndr/ndr_netlogon.c
+++ b/source/librpc/gen_ndr/ndr_netlogon.c
@@ -5942,6 +5942,51 @@ _PUBLIC_ void 
ndr_print_netr_CONTROL_DATA_INFORMATION(struct ndr_print *ndr, con
}
 }
 
+static enum ndr_err_code ndr_push_netr_NegotiateFlags(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_netr_NegotiateFlags(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_netr_NegotiateFlags(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), 
NETLOGON_NEG_ACCOUNT_LOCKOUT, NETLOGON_NEG_ACCOUNT_LOCKOUT, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_PERSISTENT_SAMREPL, NETLOGON_NEG_PERSISTENT_SAMREPL, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), NETLOGON_NEG_ARCFOUR, 
NETLOGON_NEG_ARCFOUR, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_PROMOTION_COUNT, NETLOGON_NEG_PROMOTION_COUNT, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_CHANGELOG_BDC, NETLOGON_NEG_CHANGELOG_BDC, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_FULL_SYNC_REPL, NETLOGON_NEG_FULL_SYNC_REPL, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_MULTIPLE_SIDS, NETLOGON_NEG_MULTIPLE_SIDS, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), NETLOGON_NEG_REDO, 
NETLOGON_NEG_REDO, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL, NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL, 
r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_SEND_PASSWORD_INFO_PDC, NETLOGON_NEG_SEND_PASSWORD_INFO_PDC, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_GENERIC_PASSTHROUGH, NETLOGON_NEG_GENERIC_PASSTHROUGH, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_CONCURRENT_RPC, NETLOGON_NEG_CONCURRENT_RPC, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL, NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL, 
NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), NETLOGON_NEG_128BIT, 
NETLOGON_NEG_128BIT, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_TRANSITIVE_TRUSTS, NETLOGON_NEG_TRANSITIVE_TRUSTS, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_DNS_DOMAIN_TRUSTS, NETLOGON_NEG_DNS_DOMAIN_TRUSTS, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_PASSWORD_SET2, NETLOGON_NEG_PASSWORD_SET2, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_GETDOMAININFO, NETLOGON_NEG_GETDOMAININFO, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_CROSS_FOREST_TRUSTS, NETLOGON_NEG_CROSS_FOREST_TRUSTS, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION, NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION, 
r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_RODC_PASSTHROUGH, NETLOGON_NEG_RODC_PASSTHROUGH, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_AUTHENTICATED_RPC_LSASS, NETLOGON_NEG_AUTHENTICATED_RPC_LSASS, 
r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), NETLOGON_NEG_SCHANNEL, 
NETLOGON_NEG_SCHANNEL, r);
+   ndr-depth--;
+}
+
 static enum 

[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-537-g73ead75

2008-03-28 Thread Günther Deschner
The branch, v3-2-test has been updated
   via  73ead752c5ec7104ea0eed7d963dc36467c81981 (commit)
   via  6a576cfe9b87e69af6acbe9abc04124b8b743fd3 (commit)
  from  58018ad7f65409d971e5db7165f1b32b572cc275 (commit)

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


- Log -
commit 73ead752c5ec7104ea0eed7d963dc36467c81981
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Sat Mar 29 00:49:09 2008 +0100

Zero initial return_authenticator in net rpc samdump.

Guenther

commit 6a576cfe9b87e69af6acbe9abc04124b8b743fd3
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Sat Mar 29 00:47:42 2008 +0100

Don't let winbind getgroups crash when we have no gids in the token.

Guenther

---

Summary of changes:
 source/utils/net_rpc_samsync.c   |2 ++
 source/winbindd/winbindd_group.c |8 +---
 2 files changed, 7 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/utils/net_rpc_samsync.c b/source/utils/net_rpc_samsync.c
index 80bc6ee..87d35b3 100644
--- a/source/utils/net_rpc_samsync.c
+++ b/source/utils/net_rpc_samsync.c
@@ -337,6 +337,8 @@ static void dump_database(struct rpc_pipe_client *pipe_hnd,
uint16_t restart_state = 0;
uint32_t sync_context = 0;
 
+   ZERO_STRUCT(return_authenticator);
+
if (!(mem_ctx = talloc_init(dump_database))) {
return;
}
diff --git a/source/winbindd/winbindd_group.c b/source/winbindd/winbindd_group.c
index 6a704cf..5dbd8c5 100644
--- a/source/winbindd/winbindd_group.c
+++ b/source/winbindd/winbindd_group.c
@@ -1595,9 +1595,11 @@ static void getgroups_sid2gid_recv(void *private_data, 
bool success, gid_t gid)
}
 
s-state-response.data.num_entries = s-num_token_gids;
-   /* s-token_gids are talloced */
-   s-state-response.extra_data.data = smb_xmemdup(s-token_gids, 
s-num_token_gids * sizeof(gid_t));
-   s-state-response.length += s-num_token_gids * sizeof(gid_t);
+   if (s-num_token_gids) {
+   /* s-token_gids are talloced */
+   s-state-response.extra_data.data = smb_xmemdup(s-token_gids, 
s-num_token_gids * sizeof(gid_t));
+   s-state-response.length += s-num_token_gids * sizeof(gid_t);
+   }
request_ok(s-state);
 }
 


-- 
Samba Shared Repository


Build status as of Sat Mar 29 00:00:02 2008

2008-03-28 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2008-03-28 
00:00:55.0 +
+++ /home/build/master/cache/broken_results.txt 2008-03-29 00:00:43.0 
+
@@ -1,4 +1,4 @@
-Build status as of Fri Mar 28 00:00:02 2008
+Build status as of Sat Mar 29 00:00:02 2008
 
 Build counts:
 Tree Total  Broken Panic 
@@ -9,13 +9,13 @@
 ldb  29 12 0 
 libreplace   28 10 0 
 lorikeet-heimdal 23 19 0 
-pidl 16 3  0 
+pidl 16 13 0 
 ppp  9  0  0 
 rsync29 12 0 
 samba-docs   0  0  0 
 samba-gtk4  4  0 
 samba_3_2_test 29 24 0 
-samba_4_0_test 27 25 0 
+samba_4_0_test 27 21 0 
 smb-build27 3  0 
 talloc   29 6  0 
 tdb  29 12 0 


[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-1394-g95314f2

2008-03-28 Thread Andrew Bartlett
The branch, v4-0-test has been updated
   via  95314f29a9cf83db71d37e68728bfb5009fce60d (commit)
  from  6e863e5fecf83f95ddc5b0149cf7093e2a6a1b07 (commit)

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


- Log -
commit 95314f29a9cf83db71d37e68728bfb5009fce60d
Author: Andrew Bartlett [EMAIL PROTECTED]
Date:   Sat Mar 29 11:18:00 2008 +1100

Fix some valgrind issues.

These small changes seem to fix some of the early issues in 'make
valgrindtest'

Previously, the subtree_delete code didn't pass on the timeout,
leaving it uninitialised.

The ldap_server/ldap_backend.c change tidies up the talloc hierarchy a
bit.

Andrew Bartlett

---

Summary of changes:
 source/dsdb/samdb/ldb_modules/subtree_delete.c |6 ++
 source/ldap_server/ldap_backend.c  |6 +++---
 2 files changed, 9 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/dsdb/samdb/ldb_modules/subtree_delete.c 
b/source/dsdb/samdb/ldb_modules/subtree_delete.c
index 56ae7b2..9c332d2 100644
--- a/source/dsdb/samdb/ldb_modules/subtree_delete.c
+++ b/source/dsdb/samdb/ldb_modules/subtree_delete.c
@@ -160,6 +160,12 @@ static int subtree_delete(struct ldb_module *module, 
struct ldb_request *req)
return ret;
}
 
+   ret = ldb_set_timeout_from_prev_req(module-ldb, req, new_req);
+
+   if (ret != LDB_SUCCESS) {
+   return ret;
+   }
+
ac-search_req = new_req;
if (req == NULL) {
ldb_oom(ac-module-ldb);
diff --git a/source/ldap_server/ldap_backend.c 
b/source/ldap_server/ldap_backend.c
index 346aaca..8b1c3ce 100644
--- a/source/ldap_server/ldap_backend.c
+++ b/source/ldap_server/ldap_backend.c
@@ -216,9 +216,6 @@ static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call 
*call)
lreq = talloc(local_ctx, struct ldb_request);
NT_STATUS_HAVE_NO_MEMORY(lreq);
 
-   res = talloc_zero(local_ctx, struct ldb_result);
-   NT_STATUS_HAVE_NO_MEMORY(res);
-   
lreq-operation = LDB_SEARCH;
lreq-op.search.base = basedn;
lreq-op.search.scope = scope;
@@ -242,6 +239,9 @@ static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call 
*call)
}
}
 
+   res = talloc_zero(lreq, struct ldb_result);
+   NT_STATUS_HAVE_NO_MEMORY(res);
+   
lreq-context = res;
lreq-callback = ldb_search_default_callback;
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-540-g251df53

2008-03-28 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  251df53811e4272b629575a4b50c29a99715ccf9 (commit)
   via  985bd1e642b6e54f1bc95cd4cfcceb96107e383d (commit)
   via  eef53e9603d4f3d892ffe00b061def5d717ca481 (commit)
  from  73ead752c5ec7104ea0eed7d963dc36467c81981 (commit)

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


- Log -
commit 251df53811e4272b629575a4b50c29a99715ccf9
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Mar 28 17:32:52 2008 -0700

Fix missing ''.
Jeremy.

commit 985bd1e642b6e54f1bc95cd4cfcceb96107e383d
Merge: eef53e9603d4f3d892ffe00b061def5d717ca481 
73ead752c5ec7104ea0eed7d963dc36467c81981
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Mar 28 17:31:33 2008 -0700

Merge branch 'v3-2-test' of ssh://[EMAIL PROTECTED]/data/git/samba into 
v3-2-test

commit eef53e9603d4f3d892ffe00b061def5d717ca481
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Mar 28 17:31:06 2008 -0700

Only allow sendfile on non-stream fsp's. Should fix make test for streams
as sendfile isn't implemented in the streams vfs modules yet.
Jeremy.

---

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


Changeset truncated at 500 lines:

diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index bababfe..972f30d 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -2656,7 +2656,7 @@ void send_file_readbraw(connection_struct *conn,
 * reply_readbraw has already checked the length.
 */
 
-   if ( (chain_size == 0)  (nread  0) 
+   if ( (chain_size == 0)  (nread  0)  (fsp-base_fsp == NULL) 
(fsp-wcp == NULL)  lp_use_sendfile(SNUM(conn)) ) {
char header[4];
DATA_BLOB header_blob;
@@ -3131,7 +3131,7 @@ static void send_file_readX(connection_struct *conn, 
struct smb_request *req,
 */
 
if ((chain_size == 0)  (CVAL(req-inbuf,smb_vwv0) == 0xFF) 
-   !is_encrypted_packet(req-inbuf) 
+   !is_encrypted_packet(req-inbuf)  (fsp-base_fsp == NULL) 
lp_use_sendfile(SNUM(conn))  (fsp-wcp == NULL) ) {
uint8 headerbuf[smb_size + 12 * 2];
DATA_BLOB header;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-541-g6d3fc63

2008-03-28 Thread Michael Adam
The branch, v3-2-test has been updated
   via  6d3fc63bfab06346fa57719e8747397873a3c46d (commit)
  from  251df53811e4272b629575a4b50c29a99715ccf9 (commit)

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


- Log -
commit 6d3fc63bfab06346fa57719e8747397873a3c46d
Author: Michael Adam [EMAIL PROTECTED]
Date:   Sat Mar 29 01:05:17 2008 +0100

winbindd_cache: add missing validation function for pwinfo cache entry

Michael

---

Summary of changes:
 source/winbindd/winbindd_cache.c |   24 
 1 files changed, 24 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/winbindd/winbindd_cache.c b/source/winbindd/winbindd_cache.c
index a8a98e5..0f8bd49 100644
--- a/source/winbindd/winbindd_cache.c
+++ b/source/winbindd/winbindd_cache.c
@@ -3209,6 +3209,29 @@ static int validate_de(TALLOC_CTX *mem_ctx, const char 
*keystr, TDB_DATA dbuf,
return 0;
 }
 
+static int validate_pwinfo(TALLOC_CTX *mem_ctx, const char *keystr,
+  TDB_DATA dbuf, struct tdb_validation_status *state)
+{
+   struct cache_entry *centry = create_centry_validate(keystr, dbuf, 
state);
+
+   if (!centry) {
+   return 1;
+   }
+
+   (void)centry_string(centry, mem_ctx);
+   (void)centry_string(centry, mem_ctx);
+   (void)centry_string(centry, mem_ctx);
+   (void)centry_uint32(centry);
+
+   centry_free(centry);
+
+   if (!(state-success)) {
+   return 1;
+   }
+   DEBUG(10,(validate_pwinfo: %s ok\n, keystr));
+   return 0;
+}
+
 static int validate_trustdoms(TALLOC_CTX *mem_ctx, const char *keystr, 
TDB_DATA dbuf,
  struct tdb_validation_status *state)
 {
@@ -3307,6 +3330,7 @@ struct key_val_struct {
{GM/, validate_gm},
{DR/, validate_dr},
{DE/, validate_de},
+   {NSS/PWINFO/, validate_pwinfo},
{TRUSTDOMS/, validate_trustdoms},
{TRUSTDOMCACHE/, validate_trustdomcache},
{WINBINDD_OFFLINE, validate_offline},


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-1395-geefd462

2008-03-28 Thread Andrew Bartlett
The branch, v4-0-test has been updated
   via  eefd46289b90967ce6b4cd385fb1f7e1d6f9b343 (commit)
  from  95314f29a9cf83db71d37e68728bfb5009fce60d (commit)

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


- Log -
commit eefd46289b90967ce6b4cd385fb1f7e1d6f9b343
Author: Andrew Bartlett [EMAIL PROTECTED]
Date:   Sat Mar 29 13:32:15 2008 +1100

Fix more valgrind issues.

This passes down the timeout more consistantly, and ensures that no
matter how the modules screw up, we don't free() the memory we are
going to write into the ASN1 packet until we actually write it out.

Andrew Bartlett

---

Summary of changes:
 source/dsdb/samdb/ldb_modules/linked_attributes.c |   30 -
 source/dsdb/samdb/ldb_modules/subtree_rename.c|   16 ++-
 source/ldap_server/ldap_backend.c |5 +++
 source/ldap_server/ldap_server.c  |4 ++-
 4 files changed, 52 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/dsdb/samdb/ldb_modules/linked_attributes.c 
b/source/dsdb/samdb/ldb_modules/linked_attributes.c
index 8685c72..04b9987 100644
--- a/source/dsdb/samdb/ldb_modules/linked_attributes.c
+++ b/source/dsdb/samdb/ldb_modules/linked_attributes.c
@@ -520,6 +520,12 @@ static int linked_attributes_modify(struct ldb_module 
*module, struct ldb_reques

talloc_steal(new_req, attrs);

+   ret = ldb_set_timeout_from_prev_req(module-ldb, req, 
new_req);
+   
+   if (ret != LDB_SUCCESS) {
+   return ret;
+   }
+
/* Create a spot in the list for the requests */
ac-down_req = talloc_realloc(ac, ac-down_req, 
  struct ldb_request *, 
ac-num_requests + 1);
@@ -568,6 +574,12 @@ static int linked_attributes_modify(struct ldb_module 
*module, struct ldb_reques

talloc_steal(new_req, attrs);

+   ret = ldb_set_timeout_from_prev_req(module-ldb, req, 
new_req);
+   
+   if (ret != LDB_SUCCESS) {
+   return ret;
+   }
+
/* Create a spot in the list for the requests */
ac-down_req = talloc_realloc(ac, ac-down_req, 
  struct ldb_request *, 
ac-num_requests + 1);
@@ -629,7 +641,11 @@ static int linked_attributes_modify(struct ldb_module 
*module, struct ldb_reques

talloc_steal(new_req, new_msg);

-   ldb_set_timeout_from_prev_req(module-ldb, req, 
new_req);
+   ret = ldb_set_timeout_from_prev_req(module-ldb, req, 
new_req);
+   
+   if (ret != LDB_SUCCESS) {
+   return ret;
+   }

/* Now add it to the list */
ac-down_req = talloc_realloc(ac, ac-down_req, 
@@ -752,6 +768,12 @@ static int linked_attributes_rename(struct ldb_module 
*module, struct ldb_reques
 
talloc_steal(new_req, attrs);
 
+   ret = ldb_set_timeout_from_prev_req(module-ldb, req, new_req);
+
+   if (ret != LDB_SUCCESS) {
+   return ret;
+   }
+
ac-search_req = new_req;
ac-step = LA_SEARCH;
return ldb_next_request(module, new_req);
@@ -805,6 +827,12 @@ static int linked_attributes_delete(struct ldb_module 
*module, struct ldb_reques
 
talloc_steal(new_req, attrs);
 
+   ret = ldb_set_timeout_from_prev_req(module-ldb, req, new_req);
+
+   if (ret != LDB_SUCCESS) {
+   return ret;
+   }
+
ac-search_req = new_req;
ac-step = LA_SEARCH;
return ldb_next_request(module, new_req);
diff --git a/source/dsdb/samdb/ldb_modules/subtree_rename.c 
b/source/dsdb/samdb/ldb_modules/subtree_rename.c
index bf8124e..fd1388d 100644
--- a/source/dsdb/samdb/ldb_modules/subtree_rename.c
+++ b/source/dsdb/samdb/ldb_modules/subtree_rename.c
@@ -117,7 +117,15 @@ static int subtree_rename_search_callback(struct 
ldb_context *ldb, void *context
   NULL,
   NULL);

-   if (ret != LDB_SUCCESS) return ret;
+   if (ret != LDB_SUCCESS) {
+   return ret;
+   }
+
+   ret = ldb_set_timeout_from_prev_req(ldb, ac-orig_req, req);
+   
+   if 

[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-1399-g96eb3f1

2008-03-28 Thread Andrew Bartlett
The branch, v4-0-test has been updated
   via  96eb3f1691fbc8808e3cb80a45283fb7dff53826 (commit)
   via  e06911de3326fcbd751932d6ab1b9d4644619135 (commit)
   via  f39af7c2c35abb794e1dc1a496c1960221f006f2 (commit)
   via  66efff41a72190ad73512cbf08fa68b1b44406b9 (commit)
  from  eefd46289b90967ce6b4cd385fb1f7e1d6f9b343 (commit)

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


- Log -
commit 96eb3f1691fbc8808e3cb80a45283fb7dff53826
Author: Andrew Bartlett [EMAIL PROTECTED]
Date:   Sat Mar 29 14:37:09 2008 +1100

Add a few more safety catches to the mkrelease.sh script.

Andrew Bartlett

commit e06911de3326fcbd751932d6ab1b9d4644619135
Author: Andrew Bartlett [EMAIL PROTECTED]
Date:   Sat Mar 29 14:23:43 2008 +1100

Don't leave release trees hanging around

Andrew Bartlett

commit f39af7c2c35abb794e1dc1a496c1960221f006f2
Merge: eefd46289b90967ce6b4cd385fb1f7e1d6f9b343 
66efff41a72190ad73512cbf08fa68b1b44406b9
Author: Andrew Bartlett [EMAIL PROTECTED]
Date:   Sat Mar 29 14:14:25 2008 +1100

Merge branch 'v4-0-test' of git://git.id10ts.net/samba into 4-0-local

commit 66efff41a72190ad73512cbf08fa68b1b44406b9
Author: Andrew Kroeger [EMAIL PROTECTED]
Date:   Fri Mar 28 21:55:09 2008 -0500

mkrelease: Update to work with Git instead of SVN.

---

Summary of changes:
 source/script/mkrelease.sh |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/script/mkrelease.sh b/source/script/mkrelease.sh
index a6e7c84..e6b6c2a 100755
--- a/source/script/mkrelease.sh
+++ b/source/script/mkrelease.sh
@@ -1,10 +1,9 @@
 #!/bin/sh
 
-TMPDIR=`mktemp samba-X`
-rm $TMPDIR || exit 1
-svn export . $TMPDIR || exit 1
+TMPDIR=`mktemp -d samba-X`
+(git archive --format=tar HEAD | (cd $TMPDIR/  tar xf -))
 
-( cd $TMPDIR/source
+( cd $TMPDIR/source || exit 1
  ./autogen.sh || exit 1
  ./configure || exit 1
  make dist  || exit 1
@@ -12,7 +11,8 @@ svn export . $TMPDIR || exit 1
 
 VERSION=`sed -n 's/^SAMBA_VERSION_STRING=//p' $TMPDIR/source/version.h`
 mv $TMPDIR samba-$VERSION || exit 1
-tar -cf samba-$VERSION.tar samba-$VERSION || exit 1
+tar -cf samba-$VERSION.tar samba-$VERSION || (rm -rf samba-$VERSION; exit 1)
+rm -rf samba-$VERSION || exit 1
 echo Now run: 
 echo gpg --detach-sign --armor samba-$VERSION.tar
 echo gzip samba-$VERSION.tar 


-- 
Samba Shared Repository