[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2019-ga12b857

2009-06-04 Thread Andrew Bartlett
The branch, master has been updated
   via  a12b8571fe3da55968715a4c36dd9ea77f13b335 (commit)
  from  44f762c30d1aa709146f80da5fb786201df7e668 (commit)

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


- Log -
commit a12b8571fe3da55968715a4c36dd9ea77f13b335
Author: Andrew Bartlett 
Date:   Thu Jun 4 18:12:59 2009 +1000

s4:torture Cut the RPC-SAMR-LARGE-DC test down to size

This removes the validation of the estimated number of accounts,
because MS-SAMR 3.1.5.5.1.1 makes clear the number returned cannot be
relied apon.

I've also converted a bit more of the test to use torture_assert(),
and where that is impractical, to print error messages when things
fail.

Andrew Bartlett

---

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


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 94c646a..2e78c65 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -6060,7 +6060,7 @@ static bool test_EnumDomainUsers(struct dcerpc_pipe *p,
struct samr_SamArray *sam;
 
r.in.domain_handle = domain_handle;
-   r.in.acct_flags = ACB_NORMAL;
+   r.in.acct_flags = 0;
r.in.max_size = (uint32_t)-1;
r.in.resume_handle = &resume_handle;
 
@@ -6296,8 +6296,11 @@ static bool test_ManyObjects(struct dcerpc_pipe *p,
torture_assert_int_equal(tctx, num_disp, num_anounced + num_created,
"unexpected number of results returned in dispinfo call");
 #endif
-   torture_assert_int_equal(tctx, num_enum, num_anounced + num_created,
-   "unexpected number of results returned in enum call");
+   if (which_ops == TORTURE_SAMR_MANY_ACCOUNTS && num_enum != num_anounced 
+ num_created) {
+   torture_comment(tctx, 
+   "unexpected number of results (%u) returned in 
enum call, expected %u", 
+   num_enum != num_anounced + num_created);
+   }
return ret;
 }
 
@@ -6334,7 +6337,7 @@ static bool test_OpenDomain(struct dcerpc_pipe *p, struct 
torture_context *tctx,
 
/* run the domain tests with the main handle closed - this tests
   the servers reference counting */
-   ret &= test_samr_handle_Close(p, tctx, handle);
+   torture_assert(tctx, test_samr_handle_Close(p, tctx, handle), "Failed 
to close SAMR handle");
 
switch (which_ops) {
case TORTURE_SAMR_PASSWORDS:
@@ -6343,6 +6346,9 @@ static bool test_OpenDomain(struct dcerpc_pipe *p, struct 
torture_context *tctx,
ret &= test_CreateUser2(p, tctx, &domain_handle, sid, 
which_ops, NULL);
}
ret &= test_CreateUser(p, tctx, &domain_handle, 
TEST_ACCOUNT_NAME, &user_handle, sid, which_ops, NULL, true);
+   if (!ret) {
+   printf("Testing PASSWORDS or PRIVILAGES on domain %s 
failed!\n", dom_sid_string(tctx, sid));
+   }
break;
case TORTURE_SAMR_USER_ATTRIBUTES:
if (!torture_setting_bool(tctx, "samba3", false)) {
@@ -6352,7 +6358,7 @@ static bool test_OpenDomain(struct dcerpc_pipe *p, struct 
torture_context *tctx,
/* This test needs 'complex' users to validate */
ret &= test_QueryDisplayInfo(p, tctx, &domain_handle);
if (!ret) {
-   printf("Testing PASSWORDS or ATTRIBUTES on domain %s 
failed!\n", dom_sid_string(tctx, sid));
+   printf("Testing ATTRIBUTES on domain %s failed!\n", 
dom_sid_string(tctx, sid));
}
break;
case TORTURE_SAMR_PASSWORDS_PWDLASTSET:
@@ -6368,6 +6374,9 @@ static bool test_OpenDomain(struct dcerpc_pipe *p, struct 
torture_context *tctx,
case TORTURE_SAMR_MANY_GROUPS:
case TORTURE_SAMR_MANY_ALIASES:
ret &= test_ManyObjects(p, tctx, &domain_handle, sid, 
which_ops);
+   if (!ret) {
+   printf("Testing MANY-{ACCOUNTS,GROUPS,ALIASES} on 
domain %s failed!\n", dom_sid_string(tctx, sid));
+   }
break;
case TORTURE_SAMR_OTHER:
ret &= test_CreateUser(p, tctx, &domain_handle, 
TEST_ACCOUNT_NAME, &user_handle, sid, which_ops, NULL, true);
@@ -6421,10 +6430,10 @@ static bool test_OpenDomain(struct dcerpc_pipe *p, 
struct torture_context *tctx,
ret = false;
}
 
-   ret &= test_samr_handle_Close(p, tctx, &domain_handle);
+   torture_assert(tctx, test_samr_handle_Close(p, tctx, &domain_handle), 
"Failed to close SAMR domain handle");
 
+   torture_assert(tctx, test_Connect(p, tctx, handle), "Faile to 
re-connect SAMR handle");
/* re

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2023-g8def5cb

2009-06-04 Thread Günther Deschner
The branch, master has been updated
   via  8def5cb352fbc79c112227375100361124d5ba7a (commit)
   via  dc9b7056674910f469ba97ad67944a08b388ab6a (commit)
   via  c49f6b7bc6b7a958123a7821ade1648875d8419e (commit)
   via  911624567ab464b8570c1580dae055a5fdc5587a (commit)
  from  a12b8571fe3da55968715a4c36dd9ea77f13b335 (commit)

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


- Log -
commit 8def5cb352fbc79c112227375100361124d5ba7a
Author: Günther Deschner 
Date:   Wed Jun 3 21:09:52 2009 +0200

nss_wrapper: more coherence tests for group membership.

Guenther

commit dc9b7056674910f469ba97ad67944a08b388ab6a
Author: Günther Deschner 
Date:   Wed Jun 3 14:31:20 2009 +0200

nss_wrapper: add coherency tests for get{gr,pw}{nam,id}.

Guenther

commit c49f6b7bc6b7a958123a7821ade1648875d8419e
Author: Günther Deschner 
Date:   Tue Jun 2 12:24:43 2009 +0200

nss_wrapper: refactor test_nwrap_membership_user() in testsuite.

Guenther

commit 911624567ab464b8570c1580dae055a5fdc5587a
Author: Günther Deschner 
Date:   Tue Jun 2 12:20:54 2009 +0200

nss_wrapper: make full talloced copies of struct passwd and group in 
testsuite.

Guenther

---

Summary of changes:
 lib/nss_wrapper/testsuite.c |  218 +--
 1 files changed, 189 insertions(+), 29 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/nss_wrapper/testsuite.c b/lib/nss_wrapper/testsuite.c
index 4f37354..e3ba5bf 100644
--- a/lib/nss_wrapper/testsuite.c
+++ b/lib/nss_wrapper/testsuite.c
@@ -24,6 +24,21 @@
 #include "lib/replace/system/passwd.h"
 #include "lib/nss_wrapper/nss_wrapper.h"
 
+static bool copy_passwd(struct torture_context *tctx,
+   const struct passwd *pwd,
+   struct passwd *p)
+{
+   p->pw_name  = talloc_strdup(tctx, pwd->pw_name);
+   p->pw_passwd= talloc_strdup(tctx, pwd->pw_passwd);
+   p->pw_uid   = pwd->pw_uid;
+   p->pw_gid   = pwd->pw_gid;
+   p->pw_gecos = talloc_strdup(tctx, pwd->pw_gecos);
+   p->pw_dir   = talloc_strdup(tctx, pwd->pw_dir);
+   p->pw_shell = talloc_strdup(tctx, pwd->pw_shell);
+
+   return true;
+}
+
 static void print_passwd(struct passwd *pwd)
 {
printf("%s:%s:%lu:%lu:%s:%s:%s\n",
@@ -38,7 +53,8 @@ static void print_passwd(struct passwd *pwd)
 
 
 static bool test_nwrap_getpwnam(struct torture_context *tctx,
-   const char *name)
+   const char *name,
+   struct passwd *pwd_p)
 {
struct passwd *pwd;
 
@@ -49,11 +65,16 @@ static bool test_nwrap_getpwnam(struct torture_context 
*tctx,
print_passwd(pwd);
}
 
+   if (pwd_p) {
+   copy_passwd(tctx, pwd, pwd_p);
+   }
+
return pwd ? true : false;
 }
 
 static bool test_nwrap_getpwuid(struct torture_context *tctx,
-   uid_t uid)
+   uid_t uid,
+   struct passwd *pwd_p)
 {
struct passwd *pwd;
 
@@ -64,9 +85,33 @@ static bool test_nwrap_getpwuid(struct torture_context *tctx,
print_passwd(pwd);
}
 
+   if (pwd_p) {
+   copy_passwd(tctx, pwd, pwd_p);
+   }
+
return pwd ? true : false;
 }
 
+static bool copy_group(struct torture_context *tctx,
+  const struct group *grp,
+  struct group *g)
+{
+   int i;
+
+   g->gr_name  = talloc_strdup(tctx, grp->gr_name);
+   g->gr_passwd= talloc_strdup(tctx, grp->gr_passwd);
+   g->gr_gid   = grp->gr_gid;
+   g->gr_mem   = NULL;
+
+   for (i=0; grp->gr_mem && grp->gr_mem[i]; i++) {
+   g->gr_mem = talloc_realloc(tctx, g->gr_mem, char *, i + 2);
+   g->gr_mem[i] = talloc_strdup(g->gr_mem, grp->gr_mem[i]);
+   g->gr_mem[i+1] = NULL;
+   }
+
+   return true;
+}
+
 static void print_group(struct group *grp)
 {
int i;
@@ -87,7 +132,8 @@ static void print_group(struct group *grp)
 }
 
 static bool test_nwrap_getgrnam(struct torture_context *tctx,
-   const char *name)
+   const char *name,
+   struct group *grp_p)
 {
struct group *grp;
 
@@ -98,11 +144,16 @@ static bool test_nwrap_getgrnam(struct torture_context 
*tctx,
print_group(grp);
}
 
+   if (grp_p) {
+   copy_group(tctx, grp, grp_p);
+   }
+
return grp ? true : false;
 }
 
 static bool test_nwrap_getgrgid(struct torture_context *tctx,
-   gid_t gid)
+   gid_t gid,
+   struct group *grp_p)
 {

Re: [SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1987-gb3491df

2009-06-04 Thread Guenther Deschner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Björn Jacke wrote:
> The branch, master has been updated
>via  b3491df2f9db2c550845243975ddbf0a2f9658e6 (commit)
>   from  b0654b332360437e046bbc921f91df8c5b5c57e2 (commit)
> 
> http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
> 
> 
> - Log -
> commit b3491df2f9db2c550845243975ddbf0a2f9658e6
> Author: Björn Jacke 
> Date:   Wed Jun 3 17:39:50 2009 +0200
> 
> s3:torture: fix password timestamp checks on NetBSD
> 
> The Open Group says:
> 
> "The useconds argument [of usleep] must be less than 1,000,000."
> 
> NetBSD takes this seriously. usleep of more than 99 are effectless.


wow, what a great catch. Thanks Bjoern, for looking after this! It drove
me nuts why seconds where not progressing as seconds on bsd for the samr
tests.

Guenther

- --
Günther DeschnerGPG-ID: 8EE11688
Red Hat gdesch...@redhat.com
Samba Team  g...@samba.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkonijIACgkQSOk3aI7hFoiZIwCdH3ryyXv5/YempRpo8NhOelTU
phAAn1KwXHQ4vGXCx9uvyuH/udBUWE6a
=l17r
-END PGP SIGNATURE-


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2024-g7433008

2009-06-04 Thread Volker Lendecke
The branch, master has been updated
   via  74330085ecad1d7ab686f5cc421fdc66022f0da7 (commit)
  from  8def5cb352fbc79c112227375100361124d5ba7a (commit)

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


- Log -
commit 74330085ecad1d7ab686f5cc421fdc66022f0da7
Author: Volker Lendecke 
Date:   Thu Jun 4 12:02:38 2009 +0200

Only err on readability if writev_send was explicitly asked to do so

A socket might be readable for other reasons

---

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


Changeset truncated at 500 lines:

diff --git a/lib/async_req/async_sock.c b/lib/async_req/async_sock.c
index d88edb1..a505fcf 100644
--- a/lib/async_req/async_sock.c
+++ b/lib/async_req/async_sock.c
@@ -425,7 +425,7 @@ static void writev_handler(struct tevent_context *ev, 
struct tevent_fd *fde,
 
to_write = 0;
 
-   if (flags & TEVENT_FD_READ) {
+   if ((state->flags & TEVENT_FD_READ) && (flags & TEVENT_FD_READ)) {
tevent_req_error(req, EPIPE);
return;
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2025-g9dad053

2009-06-04 Thread Stefan Metzmacher
The branch, master has been updated
   via  9dad0536d6e91cb993edd636f7659d2351d98000 (commit)
  from  74330085ecad1d7ab686f5cc421fdc66022f0da7 (commit)

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


- Log -
commit 9dad0536d6e91cb993edd636f7659d2351d98000
Author: Stefan Metzmacher 
Date:   Thu Jun 4 17:12:40 2009 +0200

nss_wrapper: call the nwrap_files_*() from nwrap_files_*_r()

We should not call the public functions, as this could lead
to a recursive loop when we have multiple nwrap backends
in future.

This also fixes the build if --enable-nss-wrapper was not
given to ./configure.

metze

---

Summary of changes:
 lib/nss_wrapper/nss_wrapper.c |   16 +++-
 1 files changed, 7 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/nss_wrapper/nss_wrapper.c b/lib/nss_wrapper/nss_wrapper.c
index 4384c3f..8789906 100644
--- a/lib/nss_wrapper/nss_wrapper.c
+++ b/lib/nss_wrapper/nss_wrapper.c
@@ -892,7 +892,7 @@ static int nwrap_files_getpwnam_r(const char *name, struct 
passwd *pwdst,
 {
struct passwd *pw;
 
-   pw = nwrap_getpwnam(name);
+   pw = nwrap_files_getpwnam(name);
if (!pw) {
if (errno == 0) {
return ENOENT;
@@ -931,7 +931,7 @@ static int nwrap_files_getpwuid_r(uid_t uid, struct passwd 
*pwdst,
 {
struct passwd *pw;
 
-   pw = nwrap_getpwuid(uid);
+   pw = nwrap_files_getpwuid(uid);
if (!pw) {
if (errno == 0) {
return ENOENT;
@@ -974,7 +974,7 @@ static int nwrap_files_getpwent_r(struct passwd *pwdst, 
char *buf,
 {
struct passwd *pw;
 
-   pw = nwrap_getpwent();
+   pw = nwrap_files_getpwent();
if (!pw) {
if (errno == 0) {
return ENOENT;
@@ -1026,7 +1026,7 @@ static int nwrap_files_getgrnam_r(const char *name, 
struct group *grdst,
 {
struct group *gr;
 
-   gr = nwrap_getgrnam(name);
+   gr = nwrap_files_getgrnam(name);
if (!gr) {
if (errno == 0) {
return ENOENT;
@@ -1065,7 +1065,7 @@ static int nwrap_files_getgrgid_r(gid_t gid, struct group 
*grdst,
 {
struct group *gr;
 
-   gr = nwrap_getgrgid(gid);
+   gr = nwrap_files_getgrgid(gid);
if (!gr) {
if (errno == 0) {
return ENOENT;
@@ -1074,8 +1074,6 @@ static int nwrap_files_getgrgid_r(gid_t gid, struct group 
*grdst,
}
 
return nwrap_gr_copy_r(gr, grdst, buf, buflen, grdstp);
-
-   return ENOENT;
 }
 
 /* group enum functions */
@@ -1110,7 +1108,7 @@ static int nwrap_files_getgrent_r(struct group *grdst, 
char *buf,
 {
struct group *gr;
 
-   gr = nwrap_getgrent();
+   gr = nwrap_files_getgrent();
if (!gr) {
if (errno == 0) {
return ENOENT;
@@ -1144,7 +1142,7 @@ static int nwrap_files_getgrouplist(const char *user, 
gid_t group, gid_t *groups
 
memcpy(groups_tmp, &group, sizeof(gid_t));
 
-   grp = nwrap_getgrgid(group);
+   grp = nwrap_files_getgrgid(group);
if (grp) {
name_of_group = grp->gr_name;
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2026-gc6f39b4

2009-06-04 Thread Volker Lendecke
The branch, master has been updated
   via  c6f39b46a7b0505331612a1bee15a82f97009f0d (commit)
  from  9dad0536d6e91cb993edd636f7659d2351d98000 (commit)

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


- Log -
commit c6f39b46a7b0505331612a1bee15a82f97009f0d
Author: Volker Lendecke 
Date:   Thu Jun 4 17:26:23 2009 +0200

Add tevent_req_notify_callback

This is necessary for requests that have multiple results. Examples would be
SMBEcho and ldap_search.

---

Summary of changes:
 lib/tevent/tevent.h |4 
 lib/tevent/tevent_req.c |   13 +
 2 files changed, 13 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index 6c5df63..2cbd175 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -252,6 +252,10 @@ bool tevent_req_set_endtime(struct tevent_req *req,
struct tevent_context *ev,
struct timeval endtime);
 
+void _tevent_req_notify_callback(struct tevent_req *req, const char *location);
+#define tevent_req_notify_callback(req)\
+   _tevent_req_notify_callback(req, __location__)
+
 void _tevent_req_done(struct tevent_req *req,
  const char *location);
 #define tevent_req_done(req) \
diff --git a/lib/tevent/tevent_req.c b/lib/tevent/tevent_req.c
index 017..541f93f 100644
--- a/lib/tevent/tevent_req.c
+++ b/lib/tevent/tevent_req.c
@@ -117,17 +117,22 @@ struct tevent_req *_tevent_req_create(TALLOC_CTX *mem_ctx,
return req;
 }
 
-static void tevent_req_finish(struct tevent_req *req,
- enum tevent_req_state state,
- const char *location)
+void _tevent_req_notify_callback(struct tevent_req *req, const char *location)
 {
-   req->internal.state = state;
req->internal.finish_location = location;
if (req->async.fn != NULL) {
req->async.fn(req);
}
 }
 
+static void tevent_req_finish(struct tevent_req *req,
+ enum tevent_req_state state,
+ const char *location)
+{
+   req->internal.state = state;
+   _tevent_req_notify_callback(req, location);
+}
+
 /**
  * @brief An async request has successfully finished
  * @param[in] req  The finished request


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2027-gd0aedeb

2009-06-04 Thread Volker Lendecke
The branch, master has been updated
   via  d0aedeb46e5d2da582b5c030114186f8d755b528 (commit)
  from  c6f39b46a7b0505331612a1bee15a82f97009f0d (commit)

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


- Log -
commit d0aedeb46e5d2da582b5c030114186f8d755b528
Author: Volker Lendecke 
Date:   Thu Jun 4 17:48:17 2009 +0200

Increase tevent version for tevent_req_notify_callback()

---

Summary of changes:
 lib/tevent/configure.ac |2 +-
 source4/min_versions.m4 |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/configure.ac b/lib/tevent/configure.ac
index 1c62a70..0d3f21d 100644
--- a/lib/tevent/configure.ac
+++ b/lib/tevent/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ(2.50)
-AC_INIT(tevent, 0.9.5)
+AC_INIT(tevent, 0.9.6)
 AC_CONFIG_SRCDIR([tevent.c])
 AC_CONFIG_HEADER(config.h)
 
diff --git a/source4/min_versions.m4 b/source4/min_versions.m4
index 76bc1fe..0d9f439 100644
--- a/source4/min_versions.m4
+++ b/source4/min_versions.m4
@@ -3,4 +3,4 @@
 define(TDB_MIN_VERSION,1.1.4)
 define(TALLOC_MIN_VERSION,1.3.0)
 define(LDB_REQUIRED_VERSION,0.9.5)
-define(TEVENT_REQUIRED_VERSION,0.9.5)
+define(TEVENT_REQUIRED_VERSION,0.9.6)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2028-ge53ca48

2009-06-04 Thread Jeremy Allison
The branch, master has been updated
   via  e53ca4845e123eeff5e29869995e4a1a455f5f5d (commit)
  from  d0aedeb46e5d2da582b5c030114186f8d755b528 (commit)

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


- Log -
commit e53ca4845e123eeff5e29869995e4a1a455f5f5d
Author: Jeremy Allison 
Date:   Thu Jun 4 11:14:20 2009 -0700

Add NTLMSSP SPNEGO to smb2 auth. Tested with Win7.
Jeremy.

---

Summary of changes:
 source3/smbd/smb2_negprot.c   |6 +++-
 source3/smbd/smb2_server.c|3 +-
 source3/smbd/smb2_sesssetup.c |   75 +
 3 files changed, 75 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_negprot.c b/source3/smbd/smb2_negprot.c
index e946490..b312a7f 100644
--- a/source3/smbd/smb2_negprot.c
+++ b/source3/smbd/smb2_negprot.c
@@ -142,11 +142,15 @@ NTSTATUS smbd_smb2_request_process_negprot(struct 
smbd_smb2_request *req)
}
 
security_offset = SMB2_HDR_BODY + 0x40;
+
+#if 1
+   /* Try SPNEGO auth... */
security_buffer = data_blob_const(negprot_spnego_blob.data + 16,
  negprot_spnego_blob.length - 16);
-
+#else
/* for now we want raw NTLMSSP */
security_buffer = data_blob_const(NULL, 0);
+#endif
 
outbody = data_blob_talloc(req->out.vector, NULL, 0x40);
if (outbody.data == NULL) {
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index f7aad0e..20754fb 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -245,7 +245,8 @@ static NTSTATUS smbd_smb2_request_setup_out(struct 
smbd_smb2_request *req)
  NT_STATUS_V(NT_STATUS_INTERNAL_ERROR));
SSVAL(outhdr, SMB2_HDR_OPCODE,
  SVAL(inhdr, SMB2_HDR_OPCODE));
-   SSVAL(outhdr, SMB2_HDR_CREDIT,  0);
+   /* Make up a number for now... JRA. FIXME ! FIXME !*/
+   SSVAL(outhdr, SMB2_HDR_CREDIT,  20);
SIVAL(outhdr, SMB2_HDR_FLAGS,   SMB2_HDR_FLAG_REDIRECT);
SIVAL(outhdr, SMB2_HDR_NEXT_COMMAND,next_command_ofs);
SBVAL(outhdr, SMB2_HDR_MESSAGE_ID,
diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c
index 0f0a900..faf7bd3 100644
--- a/source3/smbd/smb2_sesssetup.c
+++ b/source3/smbd/smb2_sesssetup.c
@@ -150,6 +150,7 @@ static NTSTATUS smbd_smb2_session_setup(struct 
smbd_smb2_request *req,
NTSTATUS status;
 
*out_session_flags = 0;
+   *out_session_id = 0;
 
if (in_session_id == 0) {
int id;
@@ -202,15 +203,75 @@ static NTSTATUS smbd_smb2_session_setup(struct 
smbd_smb2_request *req,
}
}
 
-   status = auth_ntlmssp_update(session->auth_ntlmssp_state,
-in_security_buffer,
-out_security_buffer);
-   if (NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
+   if (in_security_buffer.data[0] == ASN1_APPLICATION(0)) {
+   DATA_BLOB secblob_in;
+   DATA_BLOB chal_out;
+   char *kerb_mech = NULL;
+
+   status = parse_spnego_mechanisms(in_security_buffer,
+   &secblob_in, &kerb_mech);
+   if (!NT_STATUS_IS_OK(status)) {
+   TALLOC_FREE(session);
+   return nt_status_squash(status);
+   }
+
+   /* For now, just SPNEGO NTLMSSP - krb5 goes here later.. */
+   status = auth_ntlmssp_update(session->auth_ntlmssp_state,
+secblob_in,
+&chal_out);
+
+   if (!NT_STATUS_IS_OK(status) &&
+   !NT_STATUS_EQUAL(status, 
NT_STATUS_MORE_PROCESSING_REQUIRED)) {
+   auth_ntlmssp_end(&session->auth_ntlmssp_state);
+   TALLOC_FREE(session);
+   return nt_status_squash(status);
+   }
+
+   *out_security_buffer = spnego_gen_auth_response(&chal_out,
+status, OID_NTLMSSP);
+
*out_session_id = session->vuid;
return status;
-   } else if (!NT_STATUS_IS_OK(status)) {
-   TALLOC_FREE(session);
-   return status;
+   } else if (in_security_buffer.data[0] == ASN1_CONTEXT(1)) {
+   DATA_BLOB auth = data_blob_null;
+   DATA_BLOB auth_out = data_blob_null;
+
+   /* its an auth packet */
+   if (!spnego_parse_auth(in_security_buffer, &auth)) {
+   TALLOC_FREE(session);
+   return NT_STATUS_LOGON_FAILURE;
+   }
+   /*

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2029-g9f94c40

2009-06-04 Thread Kai Blin
The branch, master has been updated
   via  9f94c408851505a5eb2d5fbf4b0ac37ff0b0e037 (commit)
  from  e53ca4845e123eeff5e29869995e4a1a455f5f5d (commit)

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


- Log -
commit 9f94c408851505a5eb2d5fbf4b0ac37ff0b0e037
Author: Kai Blin 
Date:   Thu Jun 4 20:14:28 2009 +0200

nsstest: Relicense header file to LGPLv3+

---

Summary of changes:
 nsswitch/nsstest.h |   20 
 1 files changed, 12 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/nsstest.h b/nsswitch/nsstest.h
index e69f17c..53adce5 100644
--- a/nsswitch/nsstest.h
+++ b/nsswitch/nsstest.h
@@ -3,17 +3,21 @@
nss includes for the nss tester
Copyright (C) Kai Blin 2007
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+ ** NOTE! The following LGPL license applies to the nsstest
+ ** header. This does NOT imply that all of Samba is released
+ ** under the LGPL
 
-   This program is distributed in the hope that it will be useful,
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 3 of the License, or (at your option) any later version.
+
+   This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see .
 */
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2031-g46e2bbd

2009-06-04 Thread Günther Deschner
The branch, master has been updated
   via  46e2bbd141b9fb88019462f90886b39cd3eac80b (commit)
   via  abbcd574db6ac7a94856801f83b2ade971a6a396 (commit)
  from  9f94c408851505a5eb2d5fbf4b0ac37ff0b0e037 (commit)

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


- Log -
commit 46e2bbd141b9fb88019462f90886b39cd3eac80b
Author: Günther Deschner 
Date:   Thu Jun 4 21:15:41 2009 +0200

gitignore: remove traces of source4/libcli/auth.

This makes it possible clean up a master checkout with git clean -x -f -d 
and
build samba4 afterwards.

Guenther

commit abbcd574db6ac7a94856801f83b2ade971a6a396
Author: Günther Deschner 
Date:   Thu Jun 4 21:14:25 2009 +0200

s4-smbtorture: fix comment in RPC-SAMR-LARGE-DC test.

Andrew, I think you wanted to print this instead.

Guenther

---

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


Changeset truncated at 500 lines:

diff --git a/.gitignore b/.gitignore
index 168c9bf..e8e1dfa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -180,7 +180,6 @@ source4/include/config_tmp.h.in
 source4/kdc/pac_glue.h
 source4/ldap_server/proto.h
 source4/lib/charset/charset_proto.h
-source4/libcli/auth/proto.h
 source4/libcli/composite/proto.h
 source4/libcli/finddcs.h
 source4/libcli/ldap/ldap_proto.h
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 2e78c65..f9eb294 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -6297,9 +6297,9 @@ static bool test_ManyObjects(struct dcerpc_pipe *p,
"unexpected number of results returned in dispinfo call");
 #endif
if (which_ops == TORTURE_SAMR_MANY_ACCOUNTS && num_enum != num_anounced 
+ num_created) {
-   torture_comment(tctx, 
-   "unexpected number of results (%u) returned in 
enum call, expected %u", 
-   num_enum != num_anounced + num_created);
+   torture_comment(tctx,
+   "unexpected number of results (%u) returned in 
enum call, expected %u\n",
+   num_enum, num_anounced + num_created);
}
return ret;
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2032-g930ea7c

2009-06-04 Thread Günther Deschner
The branch, master has been updated
   via  930ea7c8a8879e98826ffdc391bab8b5a2864c5f (commit)
  from  46e2bbd141b9fb88019462f90886b39cd3eac80b (commit)

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


- Log -
commit 930ea7c8a8879e98826ffdc391bab8b5a2864c5f
Author: Günther Deschner 
Date:   Thu Jun 4 20:12:27 2009 +0200

nss_wrapper: remove getgrouplist from nwrap_ops table.

Guenther

---

Summary of changes:
 lib/nss_wrapper/nss_wrapper.c |  136 +++--
 1 files changed, 64 insertions(+), 72 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/nss_wrapper/nss_wrapper.c b/lib/nss_wrapper/nss_wrapper.c
index 8789906..7b67e69 100644
--- a/lib/nss_wrapper/nss_wrapper.c
+++ b/lib/nss_wrapper/nss_wrapper.c
@@ -164,7 +164,6 @@ struct nwrap_ops {
int (*nw_getgrent_r)(struct group *grdst, char *buf,
  size_t buflen, struct group **grdstp);
void(*nw_endgrent)(void);
-   int (*nw_getgrouplist)(const char *user, gid_t group, gid_t 
*groups, int *ngroups);
 };
 
 static struct passwd *nwrap_files_getpwnam(const char *name);
@@ -190,7 +189,6 @@ static struct group *nwrap_files_getgrent(void);
 static int nwrap_files_getgrent_r(struct group *grdst, char *buf,
  size_t buflen, struct group **grdstp);
 static void nwrap_files_endgrent(void);
-static int nwrap_files_getgrouplist(const char *user, gid_t group, gid_t 
*groups, int *ngroups);
 
 struct nwrap_ops nwrap_files_ops = {
.name   = "files",
@@ -211,7 +209,6 @@ struct nwrap_ops nwrap_files_ops = {
.nw_getgrent= nwrap_files_getgrent,
.nw_getgrent_r  = nwrap_files_getgrent_r,
.nw_endgrent= nwrap_files_endgrent,
-   .nw_getgrouplist= nwrap_files_getgrouplist
 };
 
 struct nwrap_main {
@@ -1124,74 +1121,6 @@ static void nwrap_files_endgrent(void)
nwrap_gr_global.idx = 0;
 }
 
-static int nwrap_files_getgrouplist(const char *user, gid_t group, gid_t 
*groups, int *ngroups)
-{
-   struct group *grp;
-   gid_t *groups_tmp;
-   int count = 1;
-   const char *name_of_group = NULL;
-
-   NWRAP_DEBUG(("%s: getgrouplist called for %s\n", __location__, user));
-
-   groups_tmp = (gid_t *)malloc(count * sizeof(gid_t));
-   if (!groups_tmp) {
-   NWRAP_ERROR(("%s:calloc failed\n",__location__));
-   errno = ENOMEM;
-   return -1;
-   }
-
-   memcpy(groups_tmp, &group, sizeof(gid_t));
-
-   grp = nwrap_files_getgrgid(group);
-   if (grp) {
-   name_of_group = grp->gr_name;
-   }
-
-   nwrap_files_setgrent();
-   while ((grp = nwrap_files_getgrent()) != NULL) {
-   int i = 0;
-
-   NWRAP_VERBOSE(("%s: inspecting %s for group membership\n",
-  __location__, grp->gr_name));
-
-   for (i=0; grp->gr_mem && grp->gr_mem[i] != NULL; i++) {
-
-   if ((strcmp(user, grp->gr_mem[i]) == 0) &&
-   (strcmp(name_of_group, grp->gr_name) != 0)) {
-
-   NWRAP_DEBUG(("%s: %s is member of %s\n",
-   __location__, user, grp->gr_name));
-
-   groups_tmp = (gid_t *)realloc(groups_tmp, 
(count + 1) * sizeof(gid_t));
-   if (!groups_tmp) {
-   NWRAP_ERROR(("%s:calloc 
failed\n",__location__));
-   errno = ENOMEM;
-   return -1;
-   }
-
-   memcpy(&groups_tmp[count], &grp->gr_gid, 
sizeof(gid_t));
-   count++;
-   }
-   }
-   }
-   nwrap_files_endgrent();
-
-   NWRAP_VERBOSE(("%s: %s is member of %d groups: %d\n",
-  __location__, user, *ngroups));
-
-   if (*ngroups < count) {
-   *ngroups = count;
-   free(groups_tmp);
-   return -1;
-   }
-
-   *ngroups = count;
-   memcpy(groups, groups_tmp, count * sizeof(gid_t));
-   free(groups_tmp);
-
-   return count;
-}
-
 /*
  * PUBLIC interface
  */
@@ -1391,9 +1320,72 @@ _PUBLIC_ void nwrap_endgrent(void)
 
 _PUBLIC_ int nwrap_getgrouplist(const char *user, gid_t group, gid_t *groups, 
int *ngroups)
 {
+   struct group *grp;
+   gid_t *groups_tmp;
+   int count = 1;
+   const char *name_of_group = NULL;
+
if (!nwrap_enabled()) {
return real_getgrouplist(user, group, groups, ngroups);
}
 
-   return nwrap_main_global->ops->nw_getgrouplist(user, group, groups, 
ngroups);
+   NWRAP_DEBUG

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2033-g73e3c85

2009-06-04 Thread Jeremy Allison
The branch, master has been updated
   via  73e3c85abac706be0a1836f3a4375ab379eceb86 (commit)
  from  930ea7c8a8879e98826ffdc391bab8b5a2864c5f (commit)

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


- Log -
commit 73e3c85abac706be0a1836f3a4375ab379eceb86
Author: Jeremy Allison 
Date:   Thu Jun 4 12:47:17 2009 -0700

Change smbd_smb2_request_error() to add a __location__.
This allows quick identification of smb2 parsing errors.
Jeremy.

---

Summary of changes:
 source3/include/smb_macros.h |3 +++
 source3/smbd/globals.h   |7 +++
 source3/smbd/smb2_server.c   |   13 +++--
 3 files changed, 13 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index 7528883..6dd9cab 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -339,4 +339,7 @@ extern const char toupper_ascii_fast_table[];
 #define toupper_ascii_fast(c) toupper_ascii_fast_table[(unsigned int)(c)];
 #endif
 
+#define smbd_smb2_request_error(req, status) \
+   smbd_smb2_request_error_((req), (status), __location__)
+
 #endif /* _SMB_MACROS_H */
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index 1c2b628..4c90e8f 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -176,10 +176,9 @@ void reply_smb2002(struct smb_request *req, uint16_t 
choice);
 void smbd_smb2_first_negprot(struct smbd_server_connection *conn,
 const uint8_t *inbuf, size_t size);
 
-NTSTATUS smbd_smb2_request_error_ex(struct smbd_smb2_request *req,
-   NTSTATUS status, DATA_BLOB *info);
-NTSTATUS smbd_smb2_request_error(struct smbd_smb2_request *req,
-NTSTATUS status);
+NTSTATUS smbd_smb2_request_error_(struct smbd_smb2_request *req,
+NTSTATUS status,
+const char *wherestr);
 NTSTATUS smbd_smb2_request_done_ex(struct smbd_smb2_request *req,
   NTSTATUS status,
   DATA_BLOB body, DATA_BLOB *dyn);
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 20754fb..5c4bdca 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -583,16 +583,17 @@ static void smbd_smb2_request_writev_done(struct 
tevent_req *subreq)
talloc_free(mem_pool);
 }
 
-NTSTATUS smbd_smb2_request_error_ex(struct smbd_smb2_request *req,
+static NTSTATUS smbd_smb2_request_error_ex(struct smbd_smb2_request *req,
NTSTATUS status,
+   const char *wherestr,
DATA_BLOB *info)
 {
uint8_t *outhdr;
uint8_t *outbody;
int i = req->current_idx;
 
-   DEBUG(10,("smbd_smb2_request_error_ex: idx[%d] status[%s]%s\n",
- i, nt_errstr(status), info ? " +info" : ""));
+   DEBUG(10,("smbd_smb2_request_error_ex: idx[%d] status[%s] at %s |%s|\n",
+ i, nt_errstr(status), wherestr, info ? " +info" : ""));
 
outhdr = (uint8_t *)req->out.vector[i].iov_base;
 
@@ -619,10 +620,10 @@ NTSTATUS smbd_smb2_request_error_ex(struct 
smbd_smb2_request *req,
return smbd_smb2_request_reply(req);
 }
 
-NTSTATUS smbd_smb2_request_error(struct smbd_smb2_request *req,
-NTSTATUS status)
+NTSTATUS smbd_smb2_request_error_(struct smbd_smb2_request *req,
+NTSTATUS status, const char *wherestr)
 {
-   return smbd_smb2_request_error_ex(req, status, NULL);
+   return smbd_smb2_request_error_ex(req, status, wherestr, NULL);
 }
 
 NTSTATUS smbd_smb2_request_done_ex(struct smbd_smb2_request *req,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2034-ge1eb48b

2009-06-04 Thread Björn Jacke
The branch, master has been updated
   via  e1eb48bc6baf370c58f41f8ddec4b03809c3b193 (commit)
  from  73e3c85abac706be0a1836f3a4375ab379eceb86 (commit)

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


- Log -
commit e1eb48bc6baf370c58f41f8ddec4b03809c3b193
Author: Björn Jacke 
Date:   Thu Jun 4 18:56:58 2009 +0200

s3: map NetBSD's errno on posix open calls for symlinks

This is well undocumented but NetBSD returns EFTYPE on O_NOFOLLOW open 
calls on
symlinks.

---

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


Changeset truncated at 500 lines:

diff --git a/source3/lib/errmap_unix.c b/source3/lib/errmap_unix.c
index bb09726..0c39a57 100644
--- a/source3/lib/errmap_unix.c
+++ b/source3/lib/errmap_unix.c
@@ -43,6 +43,9 @@ const struct unix_error_map unix_dos_nt_errmap[] = {
 #ifdef ELOOP
{ ELOOP, ERRDOS, ERRbadpath, NT_STATUS_OBJECT_PATH_NOT_FOUND },
 #endif
+#ifdef EFTYPE
+   { EFTYPE, ERRDOS, ERRbadpath, NT_STATUS_OBJECT_PATH_NOT_FOUND },
+#endif
 #ifdef EDQUOT
{ EDQUOT, ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL }, /* Windows apps 
need this, not NT_STATUS_QUOTA_EXCEEDED */
 #endif


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2035-g5e67aa9

2009-06-04 Thread Kai Blin
The branch, master has been updated
   via  5e67aa92f6f715a4375d769ca1b24145cf6d41bb (commit)
  from  e1eb48bc6baf370c58f41f8ddec4b03809c3b193 (commit)

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


- Log -
commit 5e67aa92f6f715a4375d769ca1b24145cf6d41bb
Author: Kai Blin 
Date:   Thu Jun 4 22:32:21 2009 +0200

libwbclient: Attempt to fix build on AIX

---

Summary of changes:
 nsswitch/libwbclient/wbc_guid.c  |1 +
 nsswitch/libwbclient/wbc_idmap.c |1 +
 nsswitch/libwbclient/wbc_pam.c   |1 +
 nsswitch/libwbclient/wbc_pwd.c   |1 +
 nsswitch/libwbclient/wbc_sid.c   |1 +
 nsswitch/libwbclient/wbc_util.c  |1 +
 nsswitch/libwbclient/wbclient.c  |1 +
 7 files changed, 7 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/libwbclient/wbc_guid.c b/nsswitch/libwbclient/wbc_guid.c
index c343e24..d55a197 100644
--- a/nsswitch/libwbclient/wbc_guid.c
+++ b/nsswitch/libwbclient/wbc_guid.c
@@ -22,6 +22,7 @@
 
 /* Required Headers */
 
+#include "replace.h"
 #include "libwbclient.h"
 
 /* Convert a binary GUID to a character string */
diff --git a/nsswitch/libwbclient/wbc_idmap.c b/nsswitch/libwbclient/wbc_idmap.c
index 5b2ab87..10a02fd 100644
--- a/nsswitch/libwbclient/wbc_idmap.c
+++ b/nsswitch/libwbclient/wbc_idmap.c
@@ -22,6 +22,7 @@
 
 /* Required Headers */
 
+#include "replace.h"
 #include "libwbclient.h"
 
 /* Convert a Windows SID to a Unix uid, allocating an uid if needed */
diff --git a/nsswitch/libwbclient/wbc_pam.c b/nsswitch/libwbclient/wbc_pam.c
index eeb798a..a245d8a 100644
--- a/nsswitch/libwbclient/wbc_pam.c
+++ b/nsswitch/libwbclient/wbc_pam.c
@@ -22,6 +22,7 @@
 
 /* Required Headers */
 
+#include "replace.h"
 #include "libwbclient.h"
 
 /* Authenticate a username/password pair */
diff --git a/nsswitch/libwbclient/wbc_pwd.c b/nsswitch/libwbclient/wbc_pwd.c
index dacd949..897bf1f 100644
--- a/nsswitch/libwbclient/wbc_pwd.c
+++ b/nsswitch/libwbclient/wbc_pwd.c
@@ -22,6 +22,7 @@
 
 /* Required Headers */
 
+#include "replace.h"
 #include "libwbclient.h"
 
 /** @brief The maximum number of pwent structs to get from winbindd
diff --git a/nsswitch/libwbclient/wbc_sid.c b/nsswitch/libwbclient/wbc_sid.c
index 46c59a9..aa32e83 100644
--- a/nsswitch/libwbclient/wbc_sid.c
+++ b/nsswitch/libwbclient/wbc_sid.c
@@ -22,6 +22,7 @@
 
 /* Required Headers */
 
+#include "replace.h"
 #include "libwbclient.h"
 
 
diff --git a/nsswitch/libwbclient/wbc_util.c b/nsswitch/libwbclient/wbc_util.c
index 5c5034e..fcb7671 100644
--- a/nsswitch/libwbclient/wbc_util.c
+++ b/nsswitch/libwbclient/wbc_util.c
@@ -22,6 +22,7 @@
 
 /* Required Headers */
 
+#include "replace.h"
 #include "libwbclient.h"
 
 
diff --git a/nsswitch/libwbclient/wbclient.c b/nsswitch/libwbclient/wbclient.c
index 77b7e12..f4620ff 100644
--- a/nsswitch/libwbclient/wbclient.c
+++ b/nsswitch/libwbclient/wbclient.c
@@ -22,6 +22,7 @@
 
 /* Required Headers */
 
+#include "replace.h"
 #include "lib/talloc/talloc.h"
 #include "lib/tevent/tevent.h"
 #include "libwbclient.h"


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2038-g7f09736

2009-06-04 Thread Stefan Metzmacher
The branch, master has been updated
   via  7f097368ed3c65467add701f1b3eb99081769ddb (commit)
   via  e545b253d805028dbe3fe2bd94189ef3b0520885 (commit)
   via  427235eb0e2559c07189713e44828e24e3f45bf8 (commit)
  from  5e67aa92f6f715a4375d769ca1b24145cf6d41bb (commit)

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


- Log -
commit 7f097368ed3c65467add701f1b3eb99081769ddb
Author: Stefan Metzmacher 
Date:   Thu Jun 4 12:17:37 2009 +0200

s3:smbd: ignore NTCREATEX_OPTIONS_SYNC_ALERT and 
NTCREATEX_OPTIONS_ASYNC_ALERT for SMB2 Create

This should make the Windows Explorer happier.

metze

commit e545b253d805028dbe3fe2bd94189ef3b0520885
Author: Stefan Metzmacher 
Date:   Thu Jun 4 12:17:01 2009 +0200

s3:smbd: call set_current_service() when a SMB2 tcon will be used

metze

commit 427235eb0e2559c07189713e44828e24e3f45bf8
Author: Stefan Metzmacher 
Date:   Thu Jun 4 12:46:30 2009 +0200

s3:smbd: fix potential fsp leak if print_fsp_open() fails

metze

---

Summary of changes:
 source3/smbd/reply.c   |1 +
 source3/smbd/smb2_create.c |4 
 source3/smbd/smb2_tcon.c   |5 +
 3 files changed, 10 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 0c0d647..70d5537 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -4953,6 +4953,7 @@ void reply_printopen(struct smb_request *req)
status = print_fsp_open(req, conn, NULL, req->vuid, fsp, &sbuf);
 
if (!NT_STATUS_IS_OK(status)) {
+   file_free(req, fsp);
reply_nterror(req, status);
END_PROFILE(SMBsplopen);
return;
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index 8cd0c3b..0f955a4 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -231,6 +231,10 @@ static NTSTATUS smbd_smb2_create(struct smbd_smb2_request 
*req,
break;
}
 
+   /* these are ignored for SMB2 */
+   in_create_options &= ~(0x10);/* NTCREATEX_OPTIONS_SYNC_ALERT */
+   in_create_options &= ~(0x20);/* NTCREATEX_OPTIONS_ASYNC_ALERT */
+
status = SMB_VFS_CREATE_FILE(req->tcon->compat_conn,
 smbreq,
 0, /* root_dir_fid */
diff --git a/source3/smbd/smb2_tcon.c b/source3/smbd/smb2_tcon.c
index d99c218..8c4b1f1 100644
--- a/source3/smbd/smb2_tcon.c
+++ b/source3/smbd/smb2_tcon.c
@@ -236,6 +236,11 @@ NTSTATUS smbd_smb2_request_check_tcon(struct 
smbd_smb2_request *req)
return NT_STATUS_ACCESS_DENIED;
}
 
+   /* should we pass FLAG_CASELESS_PATHNAMES here? */
+   if (!set_current_service(tcon->compat_conn, 0, true)) {
+   return NT_STATUS_ACCESS_DENIED;
+   }
+
req->tcon = tcon;
return NT_STATUS_OK;
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2039-gb65ba0e

2009-06-04 Thread Jelmer Vernooij
The branch, master has been updated
   via  b65ba0e26c781647e097f3f6fa279c7f3f7f4bd2 (commit)
  from  7f097368ed3c65467add701f1b3eb99081769ddb (commit)

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


- Log -
commit b65ba0e26c781647e097f3f6fa279c7f3f7f4bd2
Author: Jelmer Vernooij 
Date:   Thu Jun 4 23:43:31 2009 +0200

clikrb5: Prefer krb5_free_keytab_entry_contents to krb5_kt_free_entry.

Both functions exist in MIT Kerberos >= 1.7, but only
krb5_free_keytab_entry_contents has a prototype.

---

Summary of changes:
 source3/libsmb/clikrb5.c |   11 ---
 1 files changed, 8 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c
index aa98d76..8a567dc 100644
--- a/source3/libsmb/clikrb5.c
+++ b/source3/libsmb/clikrb5.c
@@ -924,10 +924,15 @@ failed:
 
  krb5_error_code smb_krb5_kt_free_entry(krb5_context context, 
krb5_keytab_entry *kt_entry)
 {
-#if defined(HAVE_KRB5_KT_FREE_ENTRY)
-   return krb5_kt_free_entry(context, kt_entry);
-#elif defined(HAVE_KRB5_FREE_KEYTAB_ENTRY_CONTENTS)
+/* Try krb5_free_keytab_entry_contents first, since 
+ * MIT Kerberos >= 1.7 has both krb5_free_keytab_entry_contents and 
+ * krb5_kt_free_entry but only has a prototype for the first, while the 
+ * second is considered private. 
+ */
+#if defined(HAVE_KRB5_FREE_KEYTAB_ENTRY_CONTENTS)
return krb5_free_keytab_entry_contents(context, kt_entry);
+#elif defined(HAVE_KRB5_KT_FREE_ENTRY)
+   return krb5_kt_free_entry(context, kt_entry);
 #else
 #error UNKNOWN_KT_FREE_FUNCTION
 #endif


-- 
Samba Shared Repository


Build status as of Fri Jun 5 00:00:02 2009

2009-06-04 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2009-06-04 
00:00:31.0 +
+++ /home/build/master/cache/broken_results.txt 2009-06-05 00:00:29.0 
+
@@ -1,9 +1,9 @@
-Build status as of Thu Jun  4 00:00:01 2009
+Build status as of Fri Jun  5 00:00:02 2009
 
 Build counts:
 Tree Total  Broken Panic 
 build_farm   0  0  0 
-ccache   31 6  0 
+ccache   32 6  0 
 distcc   0  0  0 
 ldb  32 32 0 
 libreplace   31 12 0 
@@ -13,10 +13,10 @@
 rsync32 11 0 
 samba-docs   0  0  0 
 samba-web0  0  0 
-samba_3_current 29 18 0 
-samba_3_master 31 29 3 
+samba_3_current 28 18 0 
+samba_3_master 31 29 2 
 samba_3_next 31 30 1 
-samba_4_0_test 32 31 0 
+samba_4_0_test 32 30 0 
 talloc   31 31 0 
 tdb  30 11 0 
 


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2040-ge53ee27

2009-06-04 Thread Andrew Bartlett
The branch, master has been updated
   via  e53ee270916a5a1e6d21c4275b5307f642ab2794 (commit)
  from  b65ba0e26c781647e097f3f6fa279c7f3f7f4bd2 (commit)

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


- Log -
commit e53ee270916a5a1e6d21c4275b5307f642ab2794
Author: Andrew Bartlett 
Date:   Fri Jun 5 10:27:30 2009 +1000

pidl Fix samba4.pidl.typelist test after addition of 'double'

---

Summary of changes:
 pidl/tests/typelist.pl |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/pidl/tests/typelist.pl b/pidl/tests/typelist.pl
index 28bf394..adefd65 100755
--- a/pidl/tests/typelist.pl
+++ b/pidl/tests/typelist.pl
@@ -37,6 +37,7 @@ is_deeply(getType("uint16"), {
 
 is_deeply(getType("double"), {
NAME => "double",
+   BASEFILE => "",
TYPE => "TYPEDEF",
DATA => { NAME => "double", TYPE => "SCALAR" }});
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2041-gfcc7372

2009-06-04 Thread Andrew Tridgell
The branch, master has been updated
   via  fcc7372975757d19e9e4366a26396bf210bdf86a (commit)
  from  e53ee270916a5a1e6d21c4275b5307f642ab2794 (commit)

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


- Log -
commit fcc7372975757d19e9e4366a26396bf210bdf86a
Author: Andrew Tridgell 
Date:   Fri Jun 5 16:25:44 2009 +1000

fixed handling of change notify buffer overruns

When the notify buffer overruns and there are no pending notify
requests, the notify buffer doesn't actually get destroyed, it just
gets put in a state where new notifies are discarded and the next
notify change request will return 0 changes.

---

Summary of changes:
 source4/ntvfs/posix/pvfs_notify.c |   11 +--
 1 files changed, 9 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/ntvfs/posix/pvfs_notify.c 
b/source4/ntvfs/posix/pvfs_notify.c
index 09aa0f6..3e6f442 100644
--- a/source4/ntvfs/posix/pvfs_notify.c
+++ b/source4/ntvfs/posix/pvfs_notify.c
@@ -34,6 +34,7 @@ struct pvfs_notify_buffer {
struct notify_changes *changes;
uint32_t max_buffer_size;
uint32_t current_buffer_size;
+   bool overflowed;
 
/* a list of requests waiting for events on this handle */
struct notify_pending {
@@ -71,7 +72,7 @@ static void pvfs_notify_send(struct pvfs_notify_buffer 
*notify_buffer,
while (notify_buffer->pending) {
pvfs_notify_send(notify_buffer, NT_STATUS_OK, 
immediate);
}
-   talloc_free(notify_buffer);
+   notify_buffer->overflowed = true;
return;
}
 
@@ -88,6 +89,7 @@ static void pvfs_notify_send(struct pvfs_notify_buffer 
*notify_buffer,
info->nttrans.out.num_changes = notify_buffer->num_changes;
info->nttrans.out.changes = talloc_steal(req, notify_buffer->changes);
notify_buffer->num_changes = 0;
+   notify_buffer->overflowed = false;
notify_buffer->changes = NULL;
notify_buffer->current_buffer_size = 0;
 
@@ -133,6 +135,10 @@ static void pvfs_notify_callback(void *private_data, const 
struct notify_event *
struct notify_changes *n2;
char *new_path;
 
+   if (n->overflowed) {
+   return;
+   }
+
n2 = talloc_realloc(n, n->changes, struct notify_changes, 
n->num_changes+1);
if (n2 == NULL) {
/* nothing much we can do for this */
@@ -267,7 +273,8 @@ NTSTATUS pvfs_notify(struct ntvfs_module_context *ntvfs,
DLIST_ADD_END(f->notify_buffer->pending, pending, struct notify_pending 
*);
 
/* if the buffer is empty then start waiting */
-   if (f->notify_buffer->num_changes == 0) {
+   if (f->notify_buffer->num_changes == 0 && 
+   !f->notify_buffer->overflowed) {
struct pvfs_wait *wait_handle;
wait_handle = pvfs_wait_message(pvfs, req, -1,
timeval_zero(),


-- 
Samba Shared Repository


svn commit: samba-web r1299 - in trunk/docs: .

2009-06-04 Thread kseeger
Author: kseeger
Date: 2009-06-05 06:30:44 + (Fri, 05 Jun 2009)
New Revision: 1299

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=1299

Log:
-Add link to Russian smb.conf man page
-Remove broken link to German translation
Karolin
Modified:
   trunk/docs/index.html


Changeset:
Modified: trunk/docs/index.html
===
--- trunk/docs/index.html   2009-06-02 20:15:31 UTC (rev 1298)
+++ trunk/docs/index.html   2009-06-05 06:30:44 UTC (rev 1299)
@@ -58,8 +58,7 @@
 French
   http://gertranssmb3.berlios.de/";>Samba HOWTO Collection in 
 German
-  http://www.millin.de/downloads/3-89990-121-5/kapitel17/index.html";>Samba 
-  3.0.9 smb.conf man page in German
+  http://http://smb-conf.ru/";>Samba 3 smb.conf man page in 
Russian
 
 
 Contributing



svn commit: samba-web r1300 - in trunk/docs: .

2009-06-04 Thread kseeger
Author: kseeger
Date: 2009-06-05 06:39:48 + (Fri, 05 Jun 2009)
New Revision: 1300

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=1300

Log:
Docs have been moved to git.
Karolin
Modified:
   trunk/docs/index.html


Changeset:
Modified: trunk/docs/index.html
===
--- trunk/docs/index.html   2009-06-05 06:30:44 UTC (rev 1299)
+++ trunk/docs/index.html   2009-06-05 06:39:48 UTC (rev 1300)
@@ -68,12 +68,12 @@
typo corrections or a write up of new or previously undocumented 
features.
 
-To get the lastest docs sources from Subversion, run:
+The documentation is located in the docs-xml directory in each release
+   branch. Please see the
+   http://wiki.samba.org/index.php/Using_Git_for_Samba_Development";>
+   Samba Wiki for information about the release branches and a short
+   introduction into git.
 
-
-svn co svn://svnanon.samba.org/samba-docs/trunk samba-docs
-
-
 Documentation "patches" can be reported through 
https://bugzilla.samba.org/";>bugzilla. From the bugzilla home
page, select 'Enter a new bug report,' choose the appropriate Samba 



svn commit: samba-web r1301 - in trunk/docs: .

2009-06-04 Thread kseeger
Author: kseeger
Date: 2009-06-05 06:40:54 + (Fri, 05 Jun 2009)
New Revision: 1301

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=1301

Log:
Fix typo
Karolin
Modified:
   trunk/docs/index.html


Changeset:
Modified: trunk/docs/index.html
===
--- trunk/docs/index.html   2009-06-05 06:39:48 UTC (rev 1300)
+++ trunk/docs/index.html   2009-06-05 06:40:54 UTC (rev 1301)
@@ -58,7 +58,7 @@
 French
   http://gertranssmb3.berlios.de/";>Samba HOWTO Collection in 
 German
-  http://http://smb-conf.ru/";>Samba 3 smb.conf man page in 
Russian
+  http://smb-conf.ru/";>Samba 3 smb.conf man page in 
Russian
 
 
 Contributing