[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-768-gdf42719

2009-02-10 Thread Volker Lendecke
The branch, master has been updated
   via  df42719ca374f92980ead8885987f606181c4321 (commit)
  from  abec7cfa165580f2a46f71bdd43c5a76d692257c (commit)

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


- Log -
commit df42719ca374f92980ead8885987f606181c4321
Author: Volker Lendecke 
Date:   Wed Feb 11 08:42:29 2009 +0100

Fix an uninitialized variable

---

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


Changeset truncated at 500 lines:

diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 4a1d5cd..93c2a1d 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -2593,7 +2593,7 @@ static WERROR cmd_spoolss_printercmp(struct 
rpc_pipe_client *cli,
 TALLOC_CTX *mem_ctx, int argc,
 const char **argv)
 {
-   const char *printername;
+   const char *printername = argv[1];
char *printername_path = NULL;
struct cli_state *cli_server2 = NULL;
struct rpc_pipe_client *cli2 = NULL;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-767-gabec7cf

2009-02-10 Thread Tim Prouty
The branch, master has been updated
   via  abec7cfa165580f2a46f71bdd43c5a76d692257c (commit)
  from  7eb097a66df2491bf975471a095fb4356216d974 (commit)

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


- Log -
commit abec7cfa165580f2a46f71bdd43c5a76d692257c
Author: Tim Prouty 
Date:   Tue Feb 10 22:16:26 2009 -0800

s3: Remove some unused vars

---

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


Changeset truncated at 500 lines:

diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c
index f273ced..17769b1 100644
--- a/source3/torture/cmd_vfs.c
+++ b/source3/torture/cmd_vfs.c
@@ -141,8 +141,6 @@ static NTSTATUS cmd_opendir(struct vfs_state *vfs, 
TALLOC_CTX *mem_ctx, int argc
 
 static NTSTATUS cmd_readdir(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int 
argc, const char **argv)
 {
-   const char *user;
-   const char *group;
SMB_STRUCT_STAT st;
SMB_STRUCT_DIRENT *dent = NULL;
 
@@ -178,9 +176,9 @@ static NTSTATUS cmd_readdir(struct vfs_state *vfs, 
TALLOC_CTX *mem_ctx, int argc
printf(" Inode: %10u", (unsigned int)st.st_ino);
printf(" Links: %10u\n", (unsigned int)st.st_nlink);
printf("  Access: %05o", (st.st_mode) & 00);
-   printf(" Uid: %5lu/%.16s Gid: %5lu/%.16s\n",
-  (unsigned long)st.st_uid, user,
-  (unsigned long)st.st_gid, group);
+   printf(" Uid: %5lu Gid: %5lu\n",
+  (unsigned long)st.st_uid,
+  (unsigned long)st.st_gid);
printf("  Access: %s", ctime(&(st.st_atime)));
printf("  Modify: %s", ctime(&(st.st_mtime)));
printf("  Change: %s", ctime(&(st.st_ctime)));


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-766-g7eb097a

2009-02-10 Thread Tim Prouty
The branch, master has been updated
   via  7eb097a66df2491bf975471a095fb4356216d974 (commit)
  from  49b84197e0e055bc6045051874a76268d766a4f7 (commit)

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


- Log -
commit 7eb097a66df2491bf975471a095fb4356216d974
Author: Tim Prouty 
Date:   Tue Feb 10 16:51:47 2009 -0800

s4 torture: Change nttransrename to use a normal access mask

batch9 already tests for stat-only opens

---

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


Changeset truncated at 500 lines:

diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c
index c10c49e..0aeded8 100644
--- a/source4/torture/raw/oplock.c
+++ b/source4/torture/raw/oplock.c
@@ -2241,7 +2241,7 @@ bool test_nttransrename(struct torture_context *tctx, 
struct smbcli_state *cli1)
*/
io.generic.level = RAW_OPEN_NTCREATEX;
io.ntcreatex.in.root_fid = 0;
-   io.ntcreatex.in.access_mask = 0;/* ask for no access at all */;
+   io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
io.ntcreatex.in.alloc_size = 0;
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_NONE;


-- 
Samba Shared Repository


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

2009-02-10 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  4ac94e5f08c7454228e10711575e79fba34c5df9 (commit)
  from  0331720a321c849141349eb7982ee83298ec47c1 (commit)

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


- Log -
commit 4ac94e5f08c7454228e10711575e79fba34c5df9
Author: Volker Lendecke 
Date:   Tue Feb 10 19:08:46 2009 -0800

Fix resume handle for _samr_EnumDomainGroups

---

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


Changeset truncated at 500 lines:

diff --git a/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c
index 6b1d465..6e37ea5 100644
--- a/source/rpc_server/srv_samr_nt.c
+++ b/source/rpc_server/srv_samr_nt.c
@@ -1177,9 +1177,7 @@ NTSTATUS _samr_EnumDomainGroups(pipes_struct *p,
 
*r->out.sam = samr_array;
*r->out.num_entries = num_groups;
-   /* this was missing, IMHO:
*r->out.resume_handle = num_groups + *r->in.resume_handle;
-   */
 
DEBUG(5,("_samr_EnumDomainGroups: %d\n", __LINE__));
 


-- 
Samba Shared Repository


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

2009-02-10 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  5f69f4a57ec0942d3c5c6969cb2bccab0ca6ec4c (commit)
  from  d5d668efc0b5af825344ec01851c105fe91a3096 (commit)

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


- Log -
commit 5f69f4a57ec0942d3c5c6969cb2bccab0ca6ec4c
Author: Volker Lendecke 
Date:   Tue Feb 10 19:08:46 2009 -0800

Fix resume handle for _samr_EnumDomainGroups

---

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


Changeset truncated at 500 lines:

diff --git a/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c
index 7b2fe6f..7a131b3 100644
--- a/source/rpc_server/srv_samr_nt.c
+++ b/source/rpc_server/srv_samr_nt.c
@@ -1177,9 +1177,7 @@ NTSTATUS _samr_EnumDomainGroups(pipes_struct *p,
 
*r->out.sam = samr_array;
*r->out.num_entries = num_groups;
-   /* this was missing, IMHO:
*r->out.resume_handle = num_groups + *r->in.resume_handle;
-   */
 
DEBUG(5,("_samr_EnumDomainGroups: %d\n", __LINE__));
 


-- 
Samba Shared Repository


[SCM] SAMBA-CTDB repository - branch v3-2-ctdb updated - build_3.2.7_ctdb.54-115-gc98cb13

2009-02-10 Thread Michael Adam
The branch, v3-2-ctdb has been updated
   via  c98cb1395d11c22db979b793e82ee9c6022bb66f (commit)
   via  0331720a321c849141349eb7982ee83298ec47c1 (commit)
   via  bfa086eef3db925ae32d554dbb7edb0f53df35e2 (commit)
   via  26e6ca1b3e7378d11ad4d6cb17b9f79244fa59b6 (commit)
   via  9e4db632387667b68cb7d7f44c20c67e6ebb9bf7 (commit)
   via  911424facd9227505eb72d11c480b685a130e720 (commit)
   via  84127f881bffebfa666d98636772307b35697270 (commit)
   via  b698559694d3f1799dec290433f75fbb73aceb32 (commit)
  from  4b392baa28a59c6c0b0eaa774b59e204f17fb1fe (commit)

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


- Log -
commit c98cb1395d11c22db979b793e82ee9c6022bb66f
Merge: 4b392baa28a59c6c0b0eaa774b59e204f17fb1fe 
0331720a321c849141349eb7982ee83298ec47c1
Author: Michael Adam 
Date:   Wed Feb 11 01:08:24 2009 +0100

Merge commit 'origin/v3-2-test' into v3-2-ctdb

commit 0331720a321c849141349eb7982ee83298ec47c1
Author: Michael Adam 
Date:   Tue Feb 10 23:52:40 2009 +0100

packaging: make update-pkginfo callable from any directory

Michael
(cherry picked from commit 7ea90835ebf6e2f2c6f325760800d8361d087ede)

commit bfa086eef3db925ae32d554dbb7edb0f53df35e2
Author: Michael Adam 
Date:   Fri Sep 12 15:07:00 2008 +0200

packaging: use "find" instead of "du" to find files... :-)

Michael
(This used to be commit 768aa82361a2c4b0aab71433b7593723a2868f0a)
(cherry picked from commit fd7635a1161e25d88a8252a5cf9de70ca2fe4232)

commit 26e6ca1b3e7378d11ad4d6cb17b9f79244fa59b6
Author: Michael Adam 
Date:   Tue Feb 10 23:50:14 2009 +0100

packaging: remove commented out stuff from update-pkginfo

Michael
(cherry picked from commit d714e58ec1f74897cd13e7cd9dd9003600052b45)

commit 9e4db632387667b68cb7d7f44c20c67e6ebb9bf7
Author: Michael Adam 
Date:   Tue Feb 10 23:31:52 2009 +0100

packaging: don't clutter the output of fillup-templates  with popd output

Michael
(cherry picked from commit 0c711935d30b500a15ef06fd658d382b2c1e2c84)

commit 911424facd9227505eb72d11c480b685a130e720
Author: Michael Adam 
Date:   Tue Feb 10 23:30:48 2009 +0100

packaging: fix fill-templates call to update-pkginfo to pushd appropriately 
first

Michael
(cherry picked from commit c28d4ae537d9fc0b76eae758d32356eaf1113c89)

commit 84127f881bffebfa666d98636772307b35697270
Author: Michael Adam 
Date:   Tue Feb 10 18:54:16 2009 +0100

packaging: add script fill-templates

This is a standalone-wrapper for update-pkginfo, which is
usually called from create-tarball. It basically repeats
some functionality of create-tarball.

Michael
(cherry picked from commit ca23469a906bab690162184e8d3949897f7b5a67)

commit b698559694d3f1799dec290433f75fbb73aceb32
Author: Günther Deschner 
Date:   Tue Feb 10 10:59:34 2009 +0100

s3-spoolss: fix memleak in get_remote_printer_publishing_data().

Guenther
(cherry picked from commit 97f1514ce95800f1296b1979f1b34dcc5d56a376)

---

Summary of changes:
 packaging/bin/fill-templates |   47 ++
 packaging/bin/update-pkginfo |   11 ++---
 source/libads/ldap_printer.c |   10 +++-
 3 files changed, 62 insertions(+), 6 deletions(-)
 create mode 100755 packaging/bin/fill-templates


Changeset truncated at 500 lines:

diff --git a/packaging/bin/fill-templates b/packaging/bin/fill-templates
new file mode 100755
index 000..4e1be39
--- /dev/null
+++ b/packaging/bin/fill-templates
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# Script to fill the packaging templates with the version
+# information that is created by mkversion in advance.
+#
+# This is a standalone wrapper for update-pkginfo, which
+# is ususally called from release-scripts/create-tarball.
+# This allows for testing some aspects of packaging without
+# the need to go through all of create-tarball.
+#
+# Copyright (C) Michael Adam 2009
+#
+# License: GPL
+
+DIRNAME=$(dirname $0)
+TOPDIR=${DIRNAME}/../../
+SRCDIR=${TOPDIR}/source
+VERSION_H=${SRCDIR}/include/version.h
+
+pushd ${SRCDIR} > /dev/null 2>&1
+./script/mkversion.sh
+popd > /dev/null 2>&1
+
+if [ ! -f ${VERSION_H} ] ; then
+   echo "Error creating version.h"
+   exit 1
+fi
+
+VERSION=`grep SAMBA_VERSION_OFFICIAL_STRING ${VERSION_H} | awk '{print $3}'`
+
+vendor_version=`grep SAMBA_VERSION_VENDOR_SUFFIX ${VERSION_H} | awk '{print 
$3}'`
+if test "x${vendor_version}" != "x" ; then
+   VERSION="${VERSION}-${vendor_version}"
+fi
+
+vendor_patch=`grep SAMBA_VERSION_VENDOR_PATCH ${VERSION_H} | awk '{print $3}'`
+if test "x${vendor_patch}" != "x" ; then
+   VERSION="${VERSION}-${vendor_patch}"
+fi
+
+VERSION=`echo ${VERSION} | sed 's/\"//g'`
+
+echo "VERSION: ${VERSION}"
+
+pushd ${TOPDIR}/packaging > /dev/null 2>&1
+${TOPDIR}/packaging/bin/update-pkginfo "

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

2009-02-10 Thread Michael Adam
The branch, v3-2-test has been updated
   via  0331720a321c849141349eb7982ee83298ec47c1 (commit)
   via  bfa086eef3db925ae32d554dbb7edb0f53df35e2 (commit)
   via  26e6ca1b3e7378d11ad4d6cb17b9f79244fa59b6 (commit)
   via  9e4db632387667b68cb7d7f44c20c67e6ebb9bf7 (commit)
   via  911424facd9227505eb72d11c480b685a130e720 (commit)
   via  84127f881bffebfa666d98636772307b35697270 (commit)
  from  b698559694d3f1799dec290433f75fbb73aceb32 (commit)

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


- Log -
commit 0331720a321c849141349eb7982ee83298ec47c1
Author: Michael Adam 
Date:   Tue Feb 10 23:52:40 2009 +0100

packaging: make update-pkginfo callable from any directory

Michael
(cherry picked from commit 7ea90835ebf6e2f2c6f325760800d8361d087ede)

commit bfa086eef3db925ae32d554dbb7edb0f53df35e2
Author: Michael Adam 
Date:   Fri Sep 12 15:07:00 2008 +0200

packaging: use "find" instead of "du" to find files... :-)

Michael
(This used to be commit 768aa82361a2c4b0aab71433b7593723a2868f0a)
(cherry picked from commit fd7635a1161e25d88a8252a5cf9de70ca2fe4232)

commit 26e6ca1b3e7378d11ad4d6cb17b9f79244fa59b6
Author: Michael Adam 
Date:   Tue Feb 10 23:50:14 2009 +0100

packaging: remove commented out stuff from update-pkginfo

Michael
(cherry picked from commit d714e58ec1f74897cd13e7cd9dd9003600052b45)

commit 9e4db632387667b68cb7d7f44c20c67e6ebb9bf7
Author: Michael Adam 
Date:   Tue Feb 10 23:31:52 2009 +0100

packaging: don't clutter the output of fillup-templates  with popd output

Michael
(cherry picked from commit 0c711935d30b500a15ef06fd658d382b2c1e2c84)

commit 911424facd9227505eb72d11c480b685a130e720
Author: Michael Adam 
Date:   Tue Feb 10 23:30:48 2009 +0100

packaging: fix fill-templates call to update-pkginfo to pushd appropriately 
first

Michael
(cherry picked from commit c28d4ae537d9fc0b76eae758d32356eaf1113c89)

commit 84127f881bffebfa666d98636772307b35697270
Author: Michael Adam 
Date:   Tue Feb 10 18:54:16 2009 +0100

packaging: add script fill-templates

This is a standalone-wrapper for update-pkginfo, which is
usually called from create-tarball. It basically repeats
some functionality of create-tarball.

Michael
(cherry picked from commit ca23469a906bab690162184e8d3949897f7b5a67)

---

Summary of changes:
 packaging/bin/fill-templates |   47 ++
 packaging/bin/update-pkginfo |   11 ++---
 2 files changed, 54 insertions(+), 4 deletions(-)
 create mode 100755 packaging/bin/fill-templates


Changeset truncated at 500 lines:

diff --git a/packaging/bin/fill-templates b/packaging/bin/fill-templates
new file mode 100755
index 000..4e1be39
--- /dev/null
+++ b/packaging/bin/fill-templates
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# Script to fill the packaging templates with the version
+# information that is created by mkversion in advance.
+#
+# This is a standalone wrapper for update-pkginfo, which
+# is ususally called from release-scripts/create-tarball.
+# This allows for testing some aspects of packaging without
+# the need to go through all of create-tarball.
+#
+# Copyright (C) Michael Adam 2009
+#
+# License: GPL
+
+DIRNAME=$(dirname $0)
+TOPDIR=${DIRNAME}/../../
+SRCDIR=${TOPDIR}/source
+VERSION_H=${SRCDIR}/include/version.h
+
+pushd ${SRCDIR} > /dev/null 2>&1
+./script/mkversion.sh
+popd > /dev/null 2>&1
+
+if [ ! -f ${VERSION_H} ] ; then
+   echo "Error creating version.h"
+   exit 1
+fi
+
+VERSION=`grep SAMBA_VERSION_OFFICIAL_STRING ${VERSION_H} | awk '{print $3}'`
+
+vendor_version=`grep SAMBA_VERSION_VENDOR_SUFFIX ${VERSION_H} | awk '{print 
$3}'`
+if test "x${vendor_version}" != "x" ; then
+   VERSION="${VERSION}-${vendor_version}"
+fi
+
+vendor_patch=`grep SAMBA_VERSION_VENDOR_PATCH ${VERSION_H} | awk '{print $3}'`
+if test "x${vendor_patch}" != "x" ; then
+   VERSION="${VERSION}-${vendor_patch}"
+fi
+
+VERSION=`echo ${VERSION} | sed 's/\"//g'`
+
+echo "VERSION: ${VERSION}"
+
+pushd ${TOPDIR}/packaging > /dev/null 2>&1
+${TOPDIR}/packaging/bin/update-pkginfo "${VERSION}" 1 ""
+popd > /dev/null 2>&1
diff --git a/packaging/bin/update-pkginfo b/packaging/bin/update-pkginfo
index 020c773..7587f68 100755
--- a/packaging/bin/update-pkginfo
+++ b/packaging/bin/update-pkginfo
@@ -14,10 +14,13 @@ if [ $# -ne 3 ]; then
 echo Usage: update-pkginfo VERSION RELEASE REVISION
 exit 1
 fi
-# PREV=`echo ${REVISION} | sed 's/[^0-9]//g'`
-# PREV="."`echo ${REVISION} | sed 's/[0-9]//g'`".${PREV}"
 
-for f in `du -a | awk '{print $2}' | grep \.tmpl$`; do
+DIRNAME=$(dirname $0)
+TOPDIR=${DIRNAME}/../../
+PACKAGINGDIR=${TOPDIR}/packaging
+
+pushd ${PACKAGINGDIR} > /dev/null 2>&1
+for f in `find . -type f -name "*.tmpl"`; do
 f2=`echo $f | sed s/.tmpl//g`
   

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

2009-02-10 Thread Michael Adam
The branch, v3-3-test has been updated
   via  d5d668efc0b5af825344ec01851c105fe91a3096 (commit)
   via  0f7ced3088f327417e32a509fa3e5b4c3c19b93c (commit)
   via  6e47cc96526961486e545285a46f2bc31e6cd2a2 (commit)
   via  9e54a408acab42abb073c8660cadebdd0975fa04 (commit)
   via  0f9cfcb7a1b34a6e76209a0fe0e8d49e3ffe15c5 (commit)
   via  3c7927141d0fa586440ecd4c39bd601c1f9a5bfa (commit)
  from  eeeceea8b92b8b814209f496a7ab953dcd0a8367 (commit)

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


- Log -
commit d5d668efc0b5af825344ec01851c105fe91a3096
Author: Michael Adam 
Date:   Tue Feb 10 23:52:40 2009 +0100

packaging: make update-pkginfo callable from any directory

Michael
(cherry picked from commit 7ea90835ebf6e2f2c6f325760800d8361d087ede)

commit 0f7ced3088f327417e32a509fa3e5b4c3c19b93c
Author: Michael Adam 
Date:   Fri Sep 12 15:07:00 2008 +0200

packaging: use "find" instead of "du" to find files... :-)

Michael
(This used to be commit 768aa82361a2c4b0aab71433b7593723a2868f0a)
(cherry picked from commit fd7635a1161e25d88a8252a5cf9de70ca2fe4232)

commit 6e47cc96526961486e545285a46f2bc31e6cd2a2
Author: Michael Adam 
Date:   Tue Feb 10 23:50:14 2009 +0100

packaging: remove commented out stuff from update-pkginfo

Michael
(cherry picked from commit d714e58ec1f74897cd13e7cd9dd9003600052b45)

commit 9e54a408acab42abb073c8660cadebdd0975fa04
Author: Michael Adam 
Date:   Tue Feb 10 23:31:52 2009 +0100

packaging: don't clutter the output of fillup-templates  with popd output

Michael
(cherry picked from commit 0c711935d30b500a15ef06fd658d382b2c1e2c84)

commit 0f9cfcb7a1b34a6e76209a0fe0e8d49e3ffe15c5
Author: Michael Adam 
Date:   Tue Feb 10 23:30:48 2009 +0100

packaging: fix fill-templates call to update-pkginfo to pushd appropriately 
first

Michael
(cherry picked from commit c28d4ae537d9fc0b76eae758d32356eaf1113c89)

commit 3c7927141d0fa586440ecd4c39bd601c1f9a5bfa
Author: Michael Adam 
Date:   Tue Feb 10 18:54:16 2009 +0100

packaging: add script fill-templates

This is a standalone-wrapper for update-pkginfo, which is
usually called from create-tarball. It basically repeats
some functionality of create-tarball.

Michael
(cherry picked from commit ca23469a906bab690162184e8d3949897f7b5a67)

---

Summary of changes:
 packaging/bin/fill-templates |   47 ++
 packaging/bin/update-pkginfo |   11 ++---
 2 files changed, 54 insertions(+), 4 deletions(-)
 create mode 100755 packaging/bin/fill-templates


Changeset truncated at 500 lines:

diff --git a/packaging/bin/fill-templates b/packaging/bin/fill-templates
new file mode 100755
index 000..4e1be39
--- /dev/null
+++ b/packaging/bin/fill-templates
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# Script to fill the packaging templates with the version
+# information that is created by mkversion in advance.
+#
+# This is a standalone wrapper for update-pkginfo, which
+# is ususally called from release-scripts/create-tarball.
+# This allows for testing some aspects of packaging without
+# the need to go through all of create-tarball.
+#
+# Copyright (C) Michael Adam 2009
+#
+# License: GPL
+
+DIRNAME=$(dirname $0)
+TOPDIR=${DIRNAME}/../../
+SRCDIR=${TOPDIR}/source
+VERSION_H=${SRCDIR}/include/version.h
+
+pushd ${SRCDIR} > /dev/null 2>&1
+./script/mkversion.sh
+popd > /dev/null 2>&1
+
+if [ ! -f ${VERSION_H} ] ; then
+   echo "Error creating version.h"
+   exit 1
+fi
+
+VERSION=`grep SAMBA_VERSION_OFFICIAL_STRING ${VERSION_H} | awk '{print $3}'`
+
+vendor_version=`grep SAMBA_VERSION_VENDOR_SUFFIX ${VERSION_H} | awk '{print 
$3}'`
+if test "x${vendor_version}" != "x" ; then
+   VERSION="${VERSION}-${vendor_version}"
+fi
+
+vendor_patch=`grep SAMBA_VERSION_VENDOR_PATCH ${VERSION_H} | awk '{print $3}'`
+if test "x${vendor_patch}" != "x" ; then
+   VERSION="${VERSION}-${vendor_patch}"
+fi
+
+VERSION=`echo ${VERSION} | sed 's/\"//g'`
+
+echo "VERSION: ${VERSION}"
+
+pushd ${TOPDIR}/packaging > /dev/null 2>&1
+${TOPDIR}/packaging/bin/update-pkginfo "${VERSION}" 1 ""
+popd > /dev/null 2>&1
diff --git a/packaging/bin/update-pkginfo b/packaging/bin/update-pkginfo
index 020c773..7587f68 100755
--- a/packaging/bin/update-pkginfo
+++ b/packaging/bin/update-pkginfo
@@ -14,10 +14,13 @@ if [ $# -ne 3 ]; then
 echo Usage: update-pkginfo VERSION RELEASE REVISION
 exit 1
 fi
-# PREV=`echo ${REVISION} | sed 's/[^0-9]//g'`
-# PREV="."`echo ${REVISION} | sed 's/[0-9]//g'`".${PREV}"
 
-for f in `du -a | awk '{print $2}' | grep \.tmpl$`; do
+DIRNAME=$(dirname $0)
+TOPDIR=${DIRNAME}/../../
+PACKAGINGDIR=${TOPDIR}/packaging
+
+pushd ${PACKAGINGDIR} > /dev/null 2>&1
+for f in `find . -type f -name "*.tmpl"`; do
 f2=`echo $f | sed s/.tmpl//g`
   

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-765-g49b8419

2009-02-10 Thread Michael Adam
The branch, master has been updated
   via  49b84197e0e055bc6045051874a76268d766a4f7 (commit)
   via  d68e4a15039afc58760d0eed1a83ce8862ddeca4 (commit)
   via  e374bef8fc212722af289cf6540f8ae3392661a8 (commit)
   via  97cbf86e7993449d8299c9c1accb4dca3f44cb0c (commit)
   via  aa33bc134a85fd8748923fa011346be6fbe28242 (commit)
  from  473c558937303226c1200ad01bad3920fc8a51f6 (commit)

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


- Log -
commit 49b84197e0e055bc6045051874a76268d766a4f7
Author: Michael Adam 
Date:   Tue Feb 10 23:52:40 2009 +0100

packaging: make update-pkginfo callable from any directory

Michael

commit d68e4a15039afc58760d0eed1a83ce8862ddeca4
Author: Michael Adam 
Date:   Tue Feb 10 23:50:14 2009 +0100

packaging: remove commented out stuff from update-pkginfo

Michael

commit e374bef8fc212722af289cf6540f8ae3392661a8
Author: Michael Adam 
Date:   Tue Feb 10 23:31:52 2009 +0100

packaging: don't clutter the output of fillup-templates  with popd output

Michael

commit 97cbf86e7993449d8299c9c1accb4dca3f44cb0c
Author: Michael Adam 
Date:   Tue Feb 10 23:30:48 2009 +0100

packaging: fix fill-templates call to update-pkginfo to pushd appropriately 
first

Michael

commit aa33bc134a85fd8748923fa011346be6fbe28242
Author: Michael Adam 
Date:   Tue Feb 10 23:10:23 2009 +0100

packaging: fix source dir to source3 in fill-templates

Michael

---

Summary of changes:
 packaging/bin/fill-templates |9 +
 packaging/bin/update-pkginfo |9 ++---
 2 files changed, 11 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/packaging/bin/fill-templates b/packaging/bin/fill-templates
index 941..e74020f 100755
--- a/packaging/bin/fill-templates
+++ b/packaging/bin/fill-templates
@@ -14,12 +14,12 @@
 
 DIRNAME=$(dirname $0)
 TOPDIR=${DIRNAME}/../../
-SRCDIR=${TOPDIR}/source
+SRCDIR=${TOPDIR}/source3
 VERSION_H=${SRCDIR}/include/version.h
 
-pushd ${SRCDIR}
+pushd ${SRCDIR} > /dev/null 2>&1
 ./script/mkversion.sh
-popd
+popd > /dev/null 2>&1
 
 if [ ! -f ${VERSION_H} ] ; then
echo "Error creating version.h"
@@ -42,5 +42,6 @@ VERSION=`echo ${VERSION} | sed 's/\"//g'`
 
 echo "VERSION: ${VERSION}"
 
+pushd ${TOPDIR}/packaging > /dev/null 2>&1
 ${TOPDIR}/packaging/bin/update-pkginfo "${VERSION}" 1 ""
-
+popd > /dev/null 2>&1
diff --git a/packaging/bin/update-pkginfo b/packaging/bin/update-pkginfo
index 9d8006a..7587f68 100755
--- a/packaging/bin/update-pkginfo
+++ b/packaging/bin/update-pkginfo
@@ -14,9 +14,12 @@ if [ $# -ne 3 ]; then
 echo Usage: update-pkginfo VERSION RELEASE REVISION
 exit 1
 fi
-# PREV=`echo ${REVISION} | sed 's/[^0-9]//g'`
-# PREV="."`echo ${REVISION} | sed 's/[0-9]//g'`".${PREV}"
 
+DIRNAME=$(dirname $0)
+TOPDIR=${DIRNAME}/../../
+PACKAGINGDIR=${TOPDIR}/packaging
+
+pushd ${PACKAGINGDIR} > /dev/null 2>&1
 for f in `find . -type f -name "*.tmpl"`; do
 f2=`echo $f | sed s/.tmpl//g`
 echo $f2
@@ -25,4 +28,4 @@ for f in `find . -type f -name "*.tmpl"`; do
-e s/PREVISION/${REVISION}/g \
-e s/PRPMREV/${RPMREVISION}/g < $f > $f2
 done
-
+popd > /dev/null 2>&1


-- 
Samba Shared Repository


Build status as of Wed Feb 11 00:00:02 2009

2009-02-10 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2009-02-10 
00:00:30.0 +
+++ /home/build/master/cache/broken_results.txt 2009-02-11 00:00:19.0 
+
@@ -1,9 +1,9 @@
-Build status as of Tue Feb 10 00:00:02 2009
+Build status as of Wed Feb 11 00:00:02 2009
 
 Build counts:
 Tree Total  Broken Panic 
 build_farm   0  0  0 
-ccache   30 6  0 
+ccache   29 6  0 
 ctdb 0  0  0 
 distcc   1  0  0 
 ldb  30 30 0 
@@ -14,9 +14,9 @@
 rsync30 8  0 
 samba-docs   0  0  0 
 samba-gtk5  5  0 
-samba_3_X_devel 27 26 0 
+samba_3_X_devel 27 24 0 
 samba_3_X_test 27 24 0 
-samba_4_0_test 28 24 0 
+samba_4_0_test 29 23 1 
 smb-build28 7  0 
 talloc   30 30 0 
 tdb  27 9  0 


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-760-g473c558

2009-02-10 Thread Günther Deschner
The branch, master has been updated
   via  473c558937303226c1200ad01bad3920fc8a51f6 (commit)
   via  46bb22fe5e9f88a705f4842b12ce4343879c339c (commit)
  from  0f58db81585316103b9c9c26223121f451e1cfa9 (commit)

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


- Log -
commit 473c558937303226c1200ad01bad3920fc8a51f6
Author: Günther Deschner 
Date:   Tue Feb 10 15:11:29 2009 +0100

s3-rpcclient: use one macro for all printername formats.

Guenther

commit 46bb22fe5e9f88a705f4842b12ce4343879c339c
Author: Günther Deschner 
Date:   Tue Feb 10 13:55:03 2009 +0100

s3-spoolss: remove more whitespace.

Guenther

---

Summary of changes:
 source3/printing/printing.c |  270 +++---
 source3/rpcclient/cmd_spoolss.c |  168 -
 2 files changed, 186 insertions(+), 252 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 0721713..17ddc55 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -1,20 +1,20 @@
-/* 
+/*
Unix SMB/Netbios implementation.
Version 3.0
printing backend routines
Copyright (C) Andrew Tridgell 1992-2000
Copyright (C) Jeremy Allison 2002
-   
+
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 .
 */
@@ -28,10 +28,10 @@ extern userdom_struct current_user_info;
 /* Current printer interface */
 static bool remove_from_jobs_changed(const char* sharename, uint32 jobid);
 
-/* 
+/*
the printing backend revolves around a tdb database that stores the
-   SMB view of the print queue 
-   
+   SMB view of the print queue
+
The key for this database is a jobid - a internally generated number that
uniquely identifies a print job
 
@@ -39,7 +39,7 @@ static bool remove_from_jobs_changed(const char* sharename, 
uint32 jobid);
  - possibly running lpq and updating the internal database from that
  - reading entries from the database
 
-   jobids are assigned when a job starts spooling. 
+   jobids are assigned when a job starts spooling.
 */
 
 static TDB_CONTEXT *rap_tdb;
@@ -114,7 +114,7 @@ bool rap_to_pjobid(uint16 rap_jobid, fstring sharename, 
uint32 *pjobid)
key.dptr = buf;
key.dsize = sizeof(rap_jobid);
data = tdb_fetch(rap_tdb, key);
-   if ( data.dptr && data.dsize == sizeof(struct rap_jobid_key) ) 
+   if ( data.dptr && data.dsize == sizeof(struct rap_jobid_key) )
{
struct rap_jobid_key *jinfo = (struct rap_jobid_key*)data.dptr;
fstrcpy( sharename, jinfo->sharename );
@@ -223,10 +223,10 @@ void printing_end(void)
 }
 
 /
- Retrieve the set of printing functions for a given service.  This allows 
+ Retrieve the set of printing functions for a given service.  This allows
  us to set the printer function table based on the value of the 'printing'
  service parameter.
- 
+
  Use the generic interface as the default and only use cups interface only
  when asked for (and only when supported)
 /
@@ -248,7 +248,7 @@ static struct printif *get_printer_fns_from_type( enum 
printing_types type )
 #endif /* HAVE_IPRINT */
 
printer_fns->type = type;
-   
+
return printer_fns;
 }
 
@@ -273,9 +273,9 @@ static TDB_DATA print_key(uint32 jobid, uint32 *tmp)
 }
 
 /***
- unpack a pjob from a tdb buffer 
+ unpack a pjob from a tdb buffer
 ***/
- 
+
 int unpack_pjob( uint8 *buf, int buflen, struct printjob *pjob )
 {
int len = 0;
@@ -285,7 +285,7 @@ int unpack_pjob( uint8 *buf, int buflen, struct printjob 
*pjob )
 
if ( !buf || !pjob )
return -1;
-   
+
len += tdb_unpack(buf+len, buflen-len, "d",
&pjpid,
&pjsysjob,
@@ -300,13 +300,13 @@ int unpack_pjob( uint8 *buf, int buflen, struct printjob 
*pjob )
pjob->jobname,

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-758-g0f58db8

2009-02-10 Thread Günther Deschner
The branch, master has been updated
   via  0f58db81585316103b9c9c26223121f451e1cfa9 (commit)
   via  d92e1347b87bf5e1ff19048e7ae18e0fe8b42691 (commit)
   via  645e3c892dc10cf2a2a68db8cf6f9c510e44ecf5 (commit)
  from  e3e03d7d83eabfb728cd31c0ae6848ca094c0274 (commit)

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


- Log -
commit 0f58db81585316103b9c9c26223121f451e1cfa9
Author: Günther Deschner 
Date:   Tue Feb 10 13:54:39 2009 +0100

s3-spoolss: remove devmode fields from include file.

Guenther

commit d92e1347b87bf5e1ff19048e7ae18e0fe8b42691
Author: Günther Deschner 
Date:   Tue Feb 10 13:54:20 2009 +0100

s3: re-run make samba3-idl.

Guenther

commit 645e3c892dc10cf2a2a68db8cf6f9c510e44ecf5
Author: Günther Deschner 
Date:   Tue Feb 10 13:53:54 2009 +0100

spoolss: add spoolss_DeviceModeFields bitmap.

Guenther

---

Summary of changes:
 librpc/gen_ndr/ndr_spoolss.c  |   55 ++--
 librpc/gen_ndr/ndr_spoolss.h  |1 +
 librpc/gen_ndr/spoolss.h  |   30 ++
 librpc/idl/spoolss.idl|   33 +++-
 source3/include/rpc_spoolss.h |   34 -
 5 files changed, 115 insertions(+), 38 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c
index c696e53..f9d4216 100644
--- a/librpc/gen_ndr/ndr_spoolss.c
+++ b/librpc/gen_ndr/ndr_spoolss.c
@@ -265,6 +265,55 @@ _PUBLIC_ void ndr_print_spoolss_PrinterInfo0(struct 
ndr_print *ndr, const char *
ndr->depth--;
 }
 
+static enum ndr_err_code ndr_push_spoolss_DeviceModeFields(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_spoolss_DeviceModeFields(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_spoolss_DeviceModeFields(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), "DEVMODE_ORIENTATION", 
DEVMODE_ORIENTATION, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PAPERSIZE", 
DEVMODE_PAPERSIZE, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PAPERLENGTH", 
DEVMODE_PAPERLENGTH, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PAPERWIDTH", 
DEVMODE_PAPERWIDTH, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_SCALE", 
DEVMODE_SCALE, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_POSITION", 
DEVMODE_POSITION, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_NUP", 
DEVMODE_NUP, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_COPIES", 
DEVMODE_COPIES, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_DEFAULTSOURCE", 
DEVMODE_DEFAULTSOURCE, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PRINTQUALITY", 
DEVMODE_PRINTQUALITY, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_COLOR", 
DEVMODE_COLOR, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_DUPLEX", 
DEVMODE_DUPLEX, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_YRESOLUTION", 
DEVMODE_YRESOLUTION, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_TTOPTION", 
DEVMODE_TTOPTION, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_COLLATE", 
DEVMODE_COLLATE, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_FORMNAME", 
DEVMODE_FORMNAME, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_LOGPIXELS", 
DEVMODE_LOGPIXELS, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_BITSPERPEL", 
DEVMODE_BITSPERPEL, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PELSWIDTH", 
DEVMODE_PELSWIDTH, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PELSHEIGHT", 
DEVMODE_PELSHEIGHT, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_DISPLAYFLAGS", 
DEVMODE_DISPLAYFLAGS, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
"DEVMODE_DISPLAYFREQUENCY", DEVMODE_DISPLAYFREQUENCY, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_ICMMETHOD", 
DEVMODE_ICMMETHOD, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_ICMINTENT", 
DEVMODE_ICMINTENT, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_MEDIATYPE", 
DEVMODE_MEDIATYPE, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_DITHERTYPE", 
DEVMODE_DITHERTYPE, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PANNINGWIDTH",

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-755-ge3e03d7

2009-02-10 Thread Günther Deschner
The branch, master has been updated
   via  e3e03d7d83eabfb728cd31c0ae6848ca094c0274 (commit)
   via  fd8e8d5e58a2df09be591852c475e18a11c51ae1 (commit)
   via  c1dbcd4cf8adca907f4088b98998c85a07c1c6bc (commit)
   via  aee462893b0a215ef72ae413d48f58fd8584a9c1 (commit)
   via  1c82217c01e516ad7ca78b25f659d4e38b2a2753 (commit)
   via  f4c46bc2e831eda7483eaa84b060dd193102bd42 (commit)
  from  a45c5c607ab3c43d947dad96b46a94b81b6a9559 (commit)

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


- Log -
commit e3e03d7d83eabfb728cd31c0ae6848ca094c0274
Author: Günther Deschner 
Date:   Mon Feb 9 15:50:34 2009 +0100

s4-spoolss: fix dcerpc_spoolss_ReplyOpenPrinter caller.

Guenther

commit fd8e8d5e58a2df09be591852c475e18a11c51ae1
Author: Günther Deschner 
Date:   Mon Feb 9 15:16:25 2009 +0100

s3-spoolss: remove old spoolss_ReplyOpenPrinter.

Guenther

commit c1dbcd4cf8adca907f4088b98998c85a07c1c6bc
Author: Günther Deschner 
Date:   Mon Feb 9 15:15:46 2009 +0100

s4-smbtorture: fix SPOOLSS test w.r.t. spoolss_ReplyOpenPrinter.

Guenther

commit aee462893b0a215ef72ae413d48f58fd8584a9c1
Author: Günther Deschner 
Date:   Mon Feb 9 15:15:26 2009 +0100

s3-spoolss: use rpccli_spoolss_ReplyOpenPrinter.

Guenther

commit 1c82217c01e516ad7ca78b25f659d4e38b2a2753
Author: Günther Deschner 
Date:   Mon Feb 9 15:14:52 2009 +0100

s3: re-run make samba3-idl.

Guenther

commit f4c46bc2e831eda7483eaa84b060dd193102bd42
Author: Günther Deschner 
Date:   Mon Feb 9 15:14:30 2009 +0100

spoolss: fix spoolss_ReplyOpenPrinter IDL.

Guenther

---

Summary of changes:
 librpc/gen_ndr/cli_spoolss.c|8 ++--
 librpc/gen_ndr/cli_spoolss.h|4 +-
 librpc/gen_ndr/ndr_spoolss.c|   42 +--
 librpc/gen_ndr/spoolss.h|4 +-
 librpc/idl/spoolss.idl  |4 +-
 source3/include/proto.h |7 ---
 source3/include/rpc_spoolss.h   |   17 --
 source3/rpc_client/cli_spoolss_notify.c |   36 -
 source3/rpc_parse/parse_spoolss.c   |   73 ---
 source3/rpc_server/srv_spoolss_nt.c |   18 ---
 source4/rpc_server/spoolss/dcesrv_spoolss.c |4 +-
 source4/torture/rpc/spoolss.c   |4 +-
 12 files changed, 60 insertions(+), 161 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c
index fbbbfd4..4906d23 100644
--- a/librpc/gen_ndr/cli_spoolss.c
+++ b/librpc/gen_ndr/cli_spoolss.c
@@ -2743,8 +2743,8 @@ NTSTATUS rpccli_spoolss_ReplyOpenPrinter(struct 
rpc_pipe_client *cli,
 const char *server_name /* [in] 
[charset(UTF16)] */,
 uint32_t printer_local /* [in]  */,
 enum winreg_Type type /* [in]  */,
-uint32_t unknown1 /* [in]  */,
-uint32_t unknown2 /* [in]  */,
+uint32_t bufsize /* [in] 
[range(0,512)] */,
+uint8_t *buffer /* [in] 
[unique,size_is(bufsize)] */,
 struct policy_handle *handle /* [out] 
[ref] */,
 WERROR *werror)
 {
@@ -2755,8 +2755,8 @@ NTSTATUS rpccli_spoolss_ReplyOpenPrinter(struct 
rpc_pipe_client *cli,
r.in.server_name = server_name;
r.in.printer_local = printer_local;
r.in.type = type;
-   r.in.unknown1 = unknown1;
-   r.in.unknown2 = unknown2;
+   r.in.bufsize = bufsize;
+   r.in.buffer = buffer;
 
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(spoolss_ReplyOpenPrinter, &r);
diff --git a/librpc/gen_ndr/cli_spoolss.h b/librpc/gen_ndr/cli_spoolss.h
index 852f53d..9eb43d6 100644
--- a/librpc/gen_ndr/cli_spoolss.h
+++ b/librpc/gen_ndr/cli_spoolss.h
@@ -343,8 +343,8 @@ NTSTATUS rpccli_spoolss_ReplyOpenPrinter(struct 
rpc_pipe_client *cli,
 const char *server_name /* [in] 
[charset(UTF16)] */,
 uint32_t printer_local /* [in]  */,
 enum winreg_Type type /* [in]  */,
-uint32_t unknown1 /* [in]  */,
-uint32_t unknown2 /* [in]  */,
+uint32_t bufsize /* [in] 
[range(0,512)] */,
+uint8_t *buffer /* [in] 
[unique,size_is(bufsize)] */,
 struct policy_handle *handle /* [out] 
[ref] */,
 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-749-ga45c5c6

2009-02-10 Thread Steven Danneman
The branch, master has been updated
   via  a45c5c607ab3c43d947dad96b46a94b81b6a9559 (commit)
   via  9d4d2f70cbf83919a11c194c8234de269c5d91ee (commit)
  from  fdd282afa3e80712790c5bbac84bf4f88644692a (commit)

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


- Log -
commit a45c5c607ab3c43d947dad96b46a94b81b6a9559
Author: todd stecher 
Date:   Tue Feb 10 12:14:39 2009 -0800

S3: Add in missing full audit entries.

commit 9d4d2f70cbf83919a11c194c8234de269c5d91ee
Author: todd stecher 
Date:   Mon Feb 9 13:25:59 2009 -0800

S3: Fixes for coverity issues.

---

Summary of changes:
 source3/auth/pampass.c   |4 +-
 source3/lib/smbrun.c |   14 +---
 source3/modules/vfs_full_audit.c |   40 -
 source3/utils/net_ads.c  |   10 -
 source3/utils/net_cache.c|3 +-
 source3/utils/ntlm_auth.c|5 ++-
 6 files changed, 60 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/auth/pampass.c b/source3/auth/pampass.c
index 4312b77..4eec269 100644
--- a/source3/auth/pampass.c
+++ b/source3/auth/pampass.c
@@ -276,7 +276,7 @@ static int smb_pam_passchange_conv(int num_msg,
fstring current_prompt;
fstring current_reply;
struct smb_pam_userdata *udp = (struct smb_pam_userdata *)appdata_ptr;
-   struct chat_struct *pw_chat= make_pw_chat(lp_passwd_chat());
+   struct chat_struct *pw_chat;
struct chat_struct *t;
bool found; 
*resp = NULL;
@@ -286,7 +286,7 @@ static int smb_pam_passchange_conv(int num_msg,
if (num_msg <= 0)
return PAM_CONV_ERR;
 
-   if (pw_chat == NULL)
+   if ((pw_chat = make_pw_chat(lp_passwd_chat())) == NULL)
return PAM_CONV_ERR;
 
/*
diff --git a/source3/lib/smbrun.c b/source3/lib/smbrun.c
index 3199071..fdccd9e 100644
--- a/source3/lib/smbrun.c
+++ b/source3/lib/smbrun.c
@@ -183,11 +183,17 @@ static int smbrun_internal(const char *cmd, int *outfd, 
bool sanitize)
 #endif
 
{
-   const char *newcmd = sanitize ? escape_shell_string(cmd) : cmd;
-   if (!newcmd) {
-   exit(82);
+   char *newcmd = NULL;
+   if (sanitize) {
+   newcmd = escape_shell_string(cmd);
+   if (!newcmd)
+   exit(82);
}
-   execl("/bin/sh","sh","-c",newcmd,NULL);  
+
+   execl("/bin/sh","sh","-c",
+   newcmd ? (const char *)newcmd : cmd, NULL);
+
+   SAFE_FREE(newcmd);
}

/* not reached */
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index e7ca77f..faa91c3 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -90,7 +90,7 @@ static int smb_full_audit_get_shadow_copy_data(struct 
vfs_handle_struct *handle,
 static int smb_full_audit_statvfs(struct vfs_handle_struct *handle,
const char *path,
struct vfs_statvfs_struct *statbuf);
-
+static int smb_full_audit_fs_capabilities(struct vfs_handle_struct *handle);
 static SMB_STRUCT_DIR *smb_full_audit_opendir(vfs_handle_struct *handle,
  const char *fname, const char *mask, uint32 attr);
 static SMB_STRUCT_DIRENT *smb_full_audit_readdir(vfs_handle_struct *handle,
@@ -335,11 +335,13 @@ static int smb_full_audit_aio_cancel(struct 
vfs_handle_struct *handle, struct fi
 static int smb_full_audit_aio_error(struct vfs_handle_struct *handle, struct 
files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
 static int smb_full_audit_aio_fsync(struct vfs_handle_struct *handle, struct 
files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb);
 static int smb_full_audit_aio_suspend(struct vfs_handle_struct *handle, struct 
files_struct *fsp, const SMB_STRUCT_AIOCB * const aiocb[], int n, const struct 
timespec *ts);
+static bool smb_full_audit_aio_force(struct vfs_handle_struct *handle,
+struct files_struct *fsp);
 
 /* VFS operations */
 
 static vfs_op_tuple audit_op_tuples[] = {
-
+
/* Disk operations */
 
{SMB_VFS_OP(smb_full_audit_connect),SMB_VFS_OP_CONNECT,
@@ -356,6 +358,8 @@ static vfs_op_tuple audit_op_tuples[] = {
 SMB_VFS_LAYER_LOGGER},
{SMB_VFS_OP(smb_full_audit_statvfs),SMB_VFS_OP_STATVFS,
 SMB_VFS_LAYER_LOGGER},
+   {SMB_VFS_OP(smb_full_audit_fs_capabilities), SMB_VFS_OP_FS_CAPABILITIES,
+SMB_VFS_LAYER_LOGGER},
 
/* Directory operations */
 
@@ -520,7 +524,7 @@ static vfs_op_tuple audit_op_tuples[] = {
 SMB_VFS_LAYER_LOGGER},
{SMB_VFS_OP(smb_full_audit_sys_acl_free_qualifier), 
SMB_VFS_OP_SYS_ACL_

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-747-gfdd282a

2009-02-10 Thread Volker Lendecke
The branch, master has been updated
   via  fdd282afa3e80712790c5bbac84bf4f88644692a (commit)
   via  e07e964729571410871318e3682710a0692e176e (commit)
   via  1cbc58d3be87852052901d4a34ad92c9f584d956 (commit)
   via  7ecaced8869541afd8a17c525e9b8387a8b20749 (commit)
   via  e3569df15b28896f4f79733df28498da2c021efe (commit)
  from  ca23469a906bab690162184e8d3949897f7b5a67 (commit)

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


- Log -
commit fdd282afa3e80712790c5bbac84bf4f88644692a
Author: Volker Lendecke 
Date:   Sun Feb 8 14:24:22 2009 +0100

Remove an unused extern reference

commit e07e964729571410871318e3682710a0692e176e
Author: Volker Lendecke 
Date:   Sun Feb 8 14:20:17 2009 +0100

Convert api_NetUserGetGroups to use samr instead of pdb

commit 1cbc58d3be87852052901d4a34ad92c9f584d956
Author: Volker Lendecke 
Date:   Thu Feb 5 15:53:04 2009 +0100

Fix some nonempty blank lines

commit 7ecaced8869541afd8a17c525e9b8387a8b20749
Author: Volker Lendecke 
Date:   Sun Feb 1 20:47:59 2009 +0100

Do not use strlen if not necessary... :-)

commit e3569df15b28896f4f79733df28498da2c021efe
Author: Volker Lendecke 
Date:   Sun Feb 1 17:17:37 2009 +0100

If we receive a DOS error code, nt_errstr should display it

---

Summary of changes:
 source3/Makefile.in |4 +-
 source3/auth/auth_sam.c |   18 +++---
 source3/libsmb/cliconnect.c |6 +--
 source3/libsmb/nterr.c  |5 ++
 source3/smbd/chgpasswd.c|2 -
 source3/smbd/lanman.c   |  118 +--
 6 files changed, 86 insertions(+), 67 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 6e453c9..03463e9 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -423,7 +423,7 @@ LIBNBT_OBJ = ../libcli/nbt/nbtname.o \
 LIBNMB_OBJ = libsmb/unexpected.o libsmb/namecache.o libsmb/nmblib.o \
 libsmb/namequery.o libsmb/conncache.o libads/dns.o
 
-NTERR_OBJ = libsmb/nterr.o
+NTERR_OBJ = libsmb/nterr.o libsmb/smberr.o
 DOSERR_OBJ = ../libcli/util/doserr.o
 ERRORMAP_OBJ = libsmb/errormap.o
 DCE_RPC_ERR_OBJ = ../librpc/rpc/dcerpc_error.o
@@ -451,7 +451,7 @@ LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o 
libsmb/clifile.o \
 libsmb/clireadwrite.o libsmb/clilist.o libsmb/cliprint.o \
 libsmb/clitrans.o libsmb/clisecdesc.o libsmb/clidgram.o \
 libsmb/clistr.o libsmb/cliquota.o libsmb/clifsinfo.o 
libsmb/clidfs.o \
- libsmb/smberr.o libsmb/credentials.o libsmb/pwd_cache.o \
+ libsmb/credentials.o libsmb/pwd_cache.o \
 libsmb/clioplock.o libsmb/clirap2.o \
 libsmb/smb_seal.o libsmb/async_smb.o \
 $(LIBSAMBA_OBJ) \
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index 7fe76fb..f5d61e9 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -5,17 +5,17 @@
Copyright (C) Luke Kenneth Casson Leighton 1996-2000
Copyright (C) Andrew Bartlett  2001-2003
Copyright (C) Gerald Carter2003
-   
+
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 .
 */
@@ -69,7 +69,7 @@ static NTSTATUS sam_password_ok(const struct auth_context 
*auth_context,
  servers local time, as logon hours are just specified as a weekly
  bitmask.
 /
-   
   
+
 static bool logon_hours_ok(struct samu *sampass)
 {
/* In logon hours first bit is Sunday from 12AM to 1AM */
@@ -107,7 +107,7 @@ static bool logon_hours_ok(struct samu *sampass)
asct = "INVALID TIME";
}
}
-   
+
DEBUG(1, ("logon_hours_ok: Account for user %s not allowed to "
  "logon at this time (%s).\n",
  pdb_get_username(sampass), asct ));
@@ -133,7 +133,7 @@ static NTSTATUS sam_account_ok(TALLOC_CTX *mem_ctx,
uint32  acct_ctrl = pdb_get_acct_ctrl(sampass);
char *workstation_list;
time_t kickoff_time;
-   
+
   

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

2009-02-10 Thread Derrell Lipman
The branch, v3-3-test has been updated
   via  eeeceea8b92b8b814209f496a7ab953dcd0a8367 (commit)
  from  0acc962e3968253a3f64b5a92def177ced44994d (commit)

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


- Log -
commit eeeceea8b92b8b814209f496a7ab953dcd0a8367
Author: Derrell Lipman 
Date:   Tue Feb 10 15:03:32 2009 -0500

[Bug 6069] Add a fstatvfs function for libsmbclient

- Fill in the remainder of the data (or at least as much as we can get) for
  the fstatvfs return value.

Derrell

---

Summary of changes:
 examples/libsmbclient/testfstatvfs.c |   15 +++-
 source/include/includes.h|2 +
 source/include/proto.h   |   15 
 source/libsmb/clifsinfo.c|  145 ++
 source/libsmb/libsmb_stat.c  |   64 +++
 5 files changed, 240 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/examples/libsmbclient/testfstatvfs.c 
b/examples/libsmbclient/testfstatvfs.c
index fbb51f1..f8a6870 100644
--- a/examples/libsmbclient/testfstatvfs.c
+++ b/examples/libsmbclient/testfstatvfs.c
@@ -72,7 +72,20 @@ int main(int argc, char * argv[])
 }
 else
 {
-printf("Features: ");
+printf("\n");
+printf("Block Size: %lu\n", statvfsbuf.f_bsize);
+printf("Fragment Size: %lu\n", statvfsbuf.f_frsize);
+printf("Blocks: %llu\n", statvfsbuf.f_blocks);
+printf("Free Blocks: %llu\n", statvfsbuf.f_bfree);
+printf("Available Blocks: %llu\n", statvfsbuf.f_bavail);
+printf("Files : %llu\n", statvfsbuf.f_files);
+printf("Free Files: %llu\n", statvfsbuf.f_ffree);
+printf("Available Files: %llu\n", statvfsbuf.f_favail);
+printf("File System ID: %lu\n", statvfsbuf.f_fsid);
+printf("\n");
+
+printf("Flags: 0x%lx\n", statvfsbuf.f_flag);
+printf("Extended Features: ");
 
 if (statvfsbuf.f_flag & SMBC_VFS_FEATURE_NO_UNIXCIFS)
 {
diff --git a/source/include/includes.h b/source/include/includes.h
index d130171..65b4242 100644
--- a/source/include/includes.h
+++ b/source/include/includes.h
@@ -470,10 +470,12 @@ typedef int VOLATILE SIG_ATOMIC_T;
 #define SMB_BIG_UINT unsigned long long
 #define SMB_BIG_INT long long
 #define SBIG_UINT(p, ofs, v) (SIVAL(p,ofs,(v)&0x), 
SIVAL(p,(ofs)+4,(v)>>32))
+#define BIG_UINT(p, ofs) SMB_BIG_UINT) IVAL(p,(ofs)+4))<<32)|IVAL(p,ofs))
 #else
 #define SMB_BIG_UINT unsigned long
 #define SMB_BIG_INT long
 #define SBIG_UINT(p, ofs, v) (SIVAL(p,ofs,v),SIVAL(p,(ofs)+4,0))
+#define BIG_UINT(p, ofs) (IVAL(p,ofs))
 #endif
 
 #define SMB_BIG_UINT_BITS (sizeof(SMB_BIG_UINT)*8)
diff --git a/source/include/proto.h b/source/include/proto.h
index 226f7be..04ceb83 100644
--- a/source/include/proto.h
+++ b/source/include/proto.h
@@ -4333,6 +4333,21 @@ bool cli_set_unix_extensions_capabilities(struct 
cli_state *cli, uint16 major, u
 bool cli_get_fs_attr_info(struct cli_state *cli, uint32 *fs_attr);
 bool cli_get_fs_volume_info_old(struct cli_state *cli, fstring volume_name, 
uint32 *pserial_number);
 bool cli_get_fs_volume_info(struct cli_state *cli, fstring volume_name, uint32 
*pserial_number, time_t *pdate);
+bool cli_get_fs_full_size_info(struct cli_state *cli,
+   SMB_BIG_UINT *total_allocation_units,
+   SMB_BIG_UINT *caller_allocation_units,
+   SMB_BIG_UINT *actual_allocation_units,
+   SMB_BIG_UINT *sectors_per_allocation_unit,
+   SMB_BIG_UINT *bytes_per_sector);
+bool cli_get_posix_fs_info(struct cli_state *cli,
+   uint32 *optimal_transfer_size,
+   uint32 *block_size,
+   SMB_BIG_UINT *total_blocks,
+   SMB_BIG_UINT *blocks_available,
+   SMB_BIG_UINT *user_blocks_available,
+   SMB_BIG_UINT *total_file_nodes,
+   SMB_BIG_UINT *free_file_nodes,
+   SMB_BIG_UINT *fs_identifier);
 NTSTATUS cli_raw_ntlm_smb_encryption_start(struct cli_state *cli, 
const char *user,
const char *pass,
diff --git a/source/libsmb/clifsinfo.c b/source/libsmb/clifsinfo.c
index 5e73b61..dd56f30 100644
--- a/source/libsmb/clifsinfo.c
+++ b/source/libsmb/clifsinfo.c
@@ -303,6 +303,151 @@ cleanup:
return ret;
 }
 
+bool cli_get_fs_full_size_info(struct cli_state *cli,
+   SMB_BIG_UINT *total_allocation_units,
+   SMB_BIG_UINT *caller_allocation_units,
+   SMB_BIG_U

Re: [SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-741-g77e3272

2009-02-10 Thread Tim Prouty


On Feb 10, 2009, at 9:30 AM, Volker Lendecke wrote:


The branch, master has been updated
  via  77e3272092d58f852955327e7c335ce5ee15f52f (commit)
  via  bbb665501a3235cfb63143d2a1945360252ba493 (commit)
  via  f6e9f1e7ea7ac0fddf312f7fcd7a1478bde1c07f (commit)
  via  47cb572d401218d43f5e681fd8820517659b48c4 (commit)
 from  c3baf1529ddd0191e839096ea2e68e3a3457c2d5 (commit)

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


- Log  
-

commit 77e3272092d58f852955327e7c335ce5ee15f52f
Author: Volker Lendecke 
Date:   Tue Feb 10 18:09:12 2009 +0100

   Fix an uninitialized variable. Tim, please check!


Thank you for catching this!  Looks great!

-Tim


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-742-gca23469

2009-02-10 Thread Michael Adam
The branch, master has been updated
   via  ca23469a906bab690162184e8d3949897f7b5a67 (commit)
  from  77e3272092d58f852955327e7c335ce5ee15f52f (commit)

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


- Log -
commit ca23469a906bab690162184e8d3949897f7b5a67
Author: Michael Adam 
Date:   Tue Feb 10 18:54:16 2009 +0100

packaging: add script fill-templates

This is a standalone-wrapper for update-pkginfo, which is
usually called from create-tarball. It basically repeats
some functionality of create-tarball.

Michael

---

Summary of changes:
 packaging/bin/fill-templates |   46 ++
 1 files changed, 46 insertions(+), 0 deletions(-)
 create mode 100755 packaging/bin/fill-templates


Changeset truncated at 500 lines:

diff --git a/packaging/bin/fill-templates b/packaging/bin/fill-templates
new file mode 100755
index 000..941
--- /dev/null
+++ b/packaging/bin/fill-templates
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+# Script to fill the packaging templates with the version
+# information that is created by mkversion in advance.
+#
+# This is a standalone wrapper for update-pkginfo, which
+# is ususally called from release-scripts/create-tarball.
+# This allows for testing some aspects of packaging without
+# the need to go through all of create-tarball.
+#
+# Copyright (C) Michael Adam 2009
+#
+# License: GPL
+
+DIRNAME=$(dirname $0)
+TOPDIR=${DIRNAME}/../../
+SRCDIR=${TOPDIR}/source
+VERSION_H=${SRCDIR}/include/version.h
+
+pushd ${SRCDIR}
+./script/mkversion.sh
+popd
+
+if [ ! -f ${VERSION_H} ] ; then
+   echo "Error creating version.h"
+   exit 1
+fi
+
+VERSION=`grep SAMBA_VERSION_OFFICIAL_STRING ${VERSION_H} | awk '{print $3}'`
+
+vendor_version=`grep SAMBA_VERSION_VENDOR_SUFFIX ${VERSION_H} | awk '{print 
$3}'`
+if test "x${vendor_version}" != "x" ; then
+   VERSION="${VERSION}-${vendor_version}"
+fi
+
+vendor_patch=`grep SAMBA_VERSION_VENDOR_PATCH ${VERSION_H} | awk '{print $3}'`
+if test "x${vendor_patch}" != "x" ; then
+   VERSION="${VERSION}-${vendor_patch}"
+fi
+
+VERSION=`echo ${VERSION} | sed 's/\"//g'`
+
+echo "VERSION: ${VERSION}"
+
+${TOPDIR}/packaging/bin/update-pkginfo "${VERSION}" 1 ""
+


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-741-g77e3272

2009-02-10 Thread Volker Lendecke
The branch, master has been updated
   via  77e3272092d58f852955327e7c335ce5ee15f52f (commit)
   via  bbb665501a3235cfb63143d2a1945360252ba493 (commit)
   via  f6e9f1e7ea7ac0fddf312f7fcd7a1478bde1c07f (commit)
   via  47cb572d401218d43f5e681fd8820517659b48c4 (commit)
  from  c3baf1529ddd0191e839096ea2e68e3a3457c2d5 (commit)

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


- Log -
commit 77e3272092d58f852955327e7c335ce5ee15f52f
Author: Volker Lendecke 
Date:   Tue Feb 10 18:09:12 2009 +0100

Fix an uninitialized variable. Tim, please check!

commit bbb665501a3235cfb63143d2a1945360252ba493
Author: Volker Lendecke 
Date:   Tue Feb 10 15:28:56 2009 +0100

Add queueing to np_write

commit f6e9f1e7ea7ac0fddf312f7fcd7a1478bde1c07f
Author: Volker Lendecke 
Date:   Mon Feb 9 08:10:09 2009 +0100

Add queueing to np_read_state, simulate message-type named pipes.

The problem with msg-type pipes is that we have to return short reads when a
message ends before the read request. When reading from the unix domain 
socket,
the message limits are lost. So we would happily return more than a message,
which confuses for example the s4 rpc client horribly. I'd expect other np 
rpc
clients also to blow up over this.

The real solution is to properly implement a two-byte length field per 
message
on the unix domain socket, but this requires more changes there. And as we
right now only serve DCE/RPC over the named pipes, this implements a hack 
that
looks into the fragment headers to figure out hdr.frag_len.

commit 47cb572d401218d43f5e681fd8820517659b48c4
Author: Volker Lendecke 
Date:   Tue Feb 10 17:29:02 2009 +0100

Add read_pkt_send/recv

---

Summary of changes:
 source3/include/proto.h   |9 ++
 source3/lib/util.c|   99 +
 source3/locking/brlock.c  |2 +-
 source3/rpc_server/srv_pipe_hnd.c |  172 +---
 4 files changed, 247 insertions(+), 35 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index c2391c7..fd6ccce 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1242,6 +1242,15 @@ bool is_valid_policy_hnd(const POLICY_HND *hnd);
 bool policy_hnd_equal(const struct policy_handle *hnd1,
  const struct policy_handle *hnd2);
 const char *strip_hostname(const char *s);
+struct async_req *read_pkt_send(TALLOC_CTX *mem_ctx,
+   struct event_context *ev,
+   int fd, size_t initial,
+   ssize_t (*more)(uint8_t *buf, size_t buflen,
+   void *priv),
+   void *priv);
+ssize_t read_pkt_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
+ uint8_t **pbuf, int *perr);
+
 
 /* The following definitions come from lib/util_file.c  */
 
diff --git a/source3/lib/util.c b/source3/lib/util.c
index df01c03..68d3322 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -3234,3 +3234,102 @@ const char *strip_hostname(const char *s)
 
return s;
 }
+
+struct read_pkt_state {
+   struct event_context *ev;
+   int fd;
+   uint8_t *buf;
+   ssize_t (*more)(uint8_t *buf, size_t buflen, void *priv);
+   void *priv;
+};
+
+static void read_pkt_done(struct async_req *subreq);
+
+struct async_req *read_pkt_send(TALLOC_CTX *mem_ctx,
+   struct event_context *ev,
+   int fd, size_t initial,
+   ssize_t (*more)(uint8_t *buf, size_t buflen,
+   void *priv),
+   void *priv)
+{
+   struct async_req *result, *subreq;
+   struct read_pkt_state *state;
+
+   if (!async_req_setup(mem_ctx, &result, &state,
+struct read_pkt_state)) {
+   return NULL;
+   }
+   state->ev = ev;
+   state->fd = fd;
+   state->more = more;
+
+   state->buf = talloc_array(state, uint8_t, initial);
+   if (state->buf == NULL) {
+   goto fail;
+   }
+   subreq = recvall_send(state, ev, fd, state->buf, initial, 0);
+   if (subreq == NULL) {
+   goto fail;
+   }
+   subreq->async.fn = read_pkt_done;
+   subreq->async.priv = result;
+   return result;
+ fail:
+   TALLOC_FREE(result);
+   return NULL;
+}
+
+static void read_pkt_done(struct async_req *subreq)
+{
+   struct async_req *req = talloc_get_type_abort(
+   subreq->async.priv, struct async_req);
+   struct read_pkt_state *state = talloc_get_type_abort(
+   req->private_data, struct read_pkt_state);
+   si

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-737-gc3baf15

2009-02-10 Thread Stefan Metzmacher
The branch, master has been updated
   via  c3baf1529ddd0191e839096ea2e68e3a3457c2d5 (commit)
   via  0d9531e2d3c94c85d607d4b246473d3ce8c3b927 (commit)
   via  cfb9cbdf686073957c16a6780448b3458990498d (commit)
   via  da12481df61b959b5d8b5114e1c0c88cb3baa405 (commit)
  from  f0e75ff36390549d811557c3763d19a7f656b0d4 (commit)

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


- Log -
commit c3baf1529ddd0191e839096ea2e68e3a3457c2d5
Author: Stefan Metzmacher 
Date:   Tue Feb 10 18:00:48 2009 +0100

selftest/Samba4: pass down the kdc address down to provision_raw_*()

metze

commit 0d9531e2d3c94c85d607d4b246473d3ce8c3b927
Author: Stefan Metzmacher 
Date:   Tue Feb 10 17:55:54 2009 +0100

selftest/Samba4: split out ldap specific stuff from provision_raw_*()

metze

commit cfb9cbdf686073957c16a6780448b3458990498d
Author: Stefan Metzmacher 
Date:   Tue Feb 10 17:01:51 2009 +0100

selftest/Samba4: split out share configurations of provision_raw*()

metze

commit da12481df61b959b5d8b5114e1c0c88cb3baa405
Author: Stefan Metzmacher 
Date:   Wed Feb 4 11:18:32 2009 +0100

selftest/Samba4: split provision() into provision_raw_prepare() and 
provision_raw_run()

This functions will be reused soon for a Samba34.pm used by
a 'make selftest34'

metze

---

Summary of changes:
 selftest/target/Samba4.pm |  503 ++--
 1 files changed, 297 insertions(+), 206 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index da1aabd..7264ddb 100644
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -506,191 +506,205 @@ EOF
close(ADMINCERTFILE);
 }
 
-sub provision($$)
+#
+# provision_raw_prepare() is also used by Samba34.pm!
+#
+sub provision_raw_prepare($$$)
 {
-   my ($self, $prefix, $server_role, $netbiosname, $netbiosalias, 
$swiface, $password) = @_;
-
-   my $server_loglevel = 1;
-   my $username = "administrator";
-   my $domain = "SAMBADOMAIN";
-   my $realm = "SAMBA.EXAMPLE.COM";
-   my $dnsname = "samba.example.com";
-   my $basedn = "dc=samba,dc=example,dc=com";
-   my $unix_name = ($ENV{USER} or $ENV{LOGNAME} or `whoami`);
-   chomp $unix_name;
-   my $unix_uid = $>;
-   my $unix_gids_str = $);
-   my @unix_gids = split(" ", $unix_gids_str);
+   my ($self, $prefix, $server_role, $netbiosname, $netbiosalias, 
$swiface, $password, $kdc_ipv4) = @_;
+   my $ctx;
+
-d $prefix or mkdir($prefix, 0777) or die("Unable to create $prefix");
my $prefix_abs = abs_path($prefix);
-   my $tmpdir = "$prefix_abs/tmp";
-   my $etcdir = "$prefix_abs/etc";
-   my $piddir = "$prefix_abs/pid";
-   my $conffile = "$etcdir/smb.conf";
-   my $krb5_config = "$etcdir/krb5.conf";
-   my $privatedir = "$prefix_abs/private";
-   my $ncalrpcdir = "$prefix_abs/ncalrpc";
-   my $lockdir = "$prefix_abs/lockdir";
-   my $winbindd_socket_dir = "$prefix_abs/winbindd_socket";
-   my $winbindd_privileged_socket_dir = 
"$prefix_abs/winbindd_privileged_socket";
-   my $ntp_signd_socket_dir = "$prefix_abs/ntp_signd_socket";
-   my $nsswrap_passwd = "$etcdir/passwd";
-   my $nsswrap_group = "$etcdir/group";
 
-   my $configuration = "--configfile=$conffile";
-   my $ldapdir = "$privatedir/ldap";
+   die ("prefix=''") if $prefix_abs eq "";
+   die ("prefix='/'") if $prefix_abs eq "/";
+
+   (system("rm -rf $prefix_abs/*") == 0) or die("Unable to clean up");
+
+   $ctx->{prefix} = $prefix;
+   $ctx->{prefix_abs} = $prefix_abs;
+   $ctx->{server_role} = $server_role;
+   $ctx->{netbiosname} = $netbiosname;
+   $ctx->{netbiosalias} = $netbiosalias;
+   $ctx->{swiface} = $swiface;
+   $ctx->{password} = $password;
+   $ctx->{kdc_ipv4} = $kdc_ipv4;
 
-   my $tlsdir = "$privatedir/tls";
+   $ctx->{server_loglevel} = 1;
+   $ctx->{username} = "administrator";
+   $ctx->{domain} = "SAMBADOMAIN";
+   $ctx->{realm} = "SAMBA.EXAMPLE.COM";
+   $ctx->{dnsname} = "samba.example.com";
+   $ctx->{basedn} = "dc=samba,dc=example,dc=com";
 
-   my $ifaceipv4 = "127.0.0.$swiface";
-   my $interfaces = "$ifaceipv4/8";
+   my $unix_name = ($ENV{USER} or $ENV{LOGNAME} or `whoami`);
+   chomp $unix_name;
+   $ctx->{unix_name} = $unix_name;
+   $ctx->{unix_uid} = $>;
+   $ctx->{unix_gids_str} = $);
+   @{$ctx->{unix_gids}} = split(" ", $ctx->{unix_gids_str});
+
+   $ctx->{etcdir} = "$prefix_abs/etc";
+   $ctx->{piddir} = "$prefix_abs/pid";
+   $ctx->{smb_conf} = "$ctx->{etcdir}/smb.conf";
+   $ctx->{krb5_conf} = "$ctx->{etcdir}/krb5.conf";
+   $ctx->{privatedir} = "$prefix_abs/private";
+ 

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

2009-02-10 Thread Derrell Lipman
The branch, v3-3-test has been updated
   via  0acc962e3968253a3f64b5a92def177ced44994d (commit)
  from  97f1514ce95800f1296b1979f1b34dcc5d56a376 (commit)

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


- Log -
commit 0acc962e3968253a3f64b5a92def177ced44994d
Author: Derrell Lipman 
Date:   Tue Feb 10 10:28:32 2009 -0500

[Bug 6069] Add a fstatvfs function for libsmbclient

- Reverse the sense of the flags. Since the fstatvfs() function on 
POSIX-like
  systems would almost certainly indicate case sensitivity (for example),
  leave the bit turned off if the result is the POSIX-like result just as if
  issued on a typical local file system on a POSIX system.

Derrell

---

Summary of changes:
 examples/libsmbclient/testfstatvfs.c |   30 +++---
 source/include/libsmbclient.h|   12 ++--
 source/libsmb/libsmb_stat.c  |   25 +
 3 files changed, 42 insertions(+), 25 deletions(-)


Changeset truncated at 500 lines:

diff --git a/examples/libsmbclient/testfstatvfs.c 
b/examples/libsmbclient/testfstatvfs.c
index 9db70cf..fbb51f1 100644
--- a/examples/libsmbclient/testfstatvfs.c
+++ b/examples/libsmbclient/testfstatvfs.c
@@ -70,27 +70,35 @@ int main(int argc, char * argv[])
 {
 perror("fstatvfs");
 }
-else if (statvfsbuf.f_flag == 0)
-{
-printf("No capabilities found\n");
-}
 else
 {
-printf("Capabilities: ");
+printf("Features: ");
 
-if (statvfsbuf.f_flag & SMBC_VFS_CAP_UNIXCIFS)
+if (statvfsbuf.f_flag & SMBC_VFS_FEATURE_NO_UNIXCIFS)
+{
+printf("NO_UNIXCIFS ");
+}
+else
 {
-printf("UNIXCIFS ");
+printf("unixcifs ");
 }
 
-if (statvfsbuf.f_flag & SMBC_VFS_CAP_CASE_SENSITIVE)
+if (statvfsbuf.f_flag & SMBC_VFS_FEATURE_CASE_INSENSITIVE)
 {
-printf("CASE_SENSITIVE ");
+printf("CASE_INSENSITIVE ");
+}
+else
+{
+printf("case_sensitive ");
 }
 
-if (statvfsbuf.f_flag & SMBC_VFS_CAP_DFS)
+if (statvfsbuf.f_flag & SMBC_VFS_FEATURE_NO_DFS)
+{
+printf("NO_DFS ");
+}
+else
 {
-printf("DFS ");
+printf("dfs ");
 }
 
 printf("\n");
diff --git a/source/include/libsmbclient.h b/source/include/libsmbclient.h
index 575bef6..ec7e742 100644
--- a/source/include/libsmbclient.h
+++ b/source/include/libsmbclient.h
@@ -179,16 +179,16 @@ typedef enum smbc_smb_encrypt_level
  * smbc_statvfs(). These may be OR-ed together to reflect a full set of
  * available capabilities.
  */
-typedef enum smbc_vfs_capability
+typedef enum smbc_vfs_feature
 {
 /* Defined by POSIX or in Linux include files (low-order bits) */
-SMBC_VFS_CAP_RDONLY = (1 << 0),
+SMBC_VFS_FEATURE_RDONLY = (1 << 0),
 
 /* Specific to libsmbclient (high-order bits) */
-SMBC_VFS_CAP_DFS= (1 << 29),
-SMBC_VFS_CAP_CASE_SENSITIVE = (1 << 30),
-SMBC_VFS_CAP_UNIXCIFS   = (1 << 31)
-} smbc_vfs_capability;
+SMBC_VFS_FEATURE_NO_DFS   = (1 << 29),
+SMBC_VFS_FEATURE_CASE_INSENSITIVE = (1 << 30),
+SMBC_VFS_FEATURE_NO_UNIXCIFS  = (1 << 31)
+} smbc_vfs_feature;
 
 typedef int smbc_bool;
 
diff --git a/source/libsmb/libsmb_stat.c b/source/libsmb/libsmb_stat.c
index 71dc1d1..e5eac59 100644
--- a/source/libsmb/libsmb_stat.c
+++ b/source/libsmb/libsmb_stat.c
@@ -316,9 +316,18 @@ SMBC_fstatvfs_ctx(SMBCCTX *context,
 /* Initialize all fields (at least until we actually use them) */
 memset(st, 0, sizeof(*st));
 
+/*
+ * The state of each flag is such that the same bits are unset as
+ * would typically be unset on a local file system on a POSIX OS. Thus
+ * the bit is on, for example, only for case-insensitive file systems
+ * since most POSIX file systems are case sensitive and fstatvfs()
+ * would typically return zero in these bits on such a local file
+ * system.
+ */
+
 /* See if the server has UNIX CIFS support */
-if (SERVER_HAS_UNIX_CIFS(cli)) {
-st->f_flag |= SMBC_VFS_CAP_UNIXCIFS;
+if (! SERVER_HAS_UNIX_CIFS(cli)) {
+st->f_flag |= SMBC_VFS_FEATURE_NO_UNIXCIFS;
 }
 
 /* See if the share is case sensitive */
@@ -328,18 +337,18 @@ SMBC_fstatvfs_ctx(SMBCCTX *context,
  * the share. We have no choice but to use the
  * user-specified case sensitivity setting.
  *

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-733-gf0e75ff

2009-02-10 Thread Stefan Metzmacher
The branch, master has been updated
   via  f0e75ff36390549d811557c3763d19a7f656b0d4 (commit)
   via  76a2d068f5fe6e29ac2506e0d38859a2db8892c4 (commit)
   via  bb88b038467284d2ef8bdd7236bc07492b6e22ce (commit)
   via  3c1feb82c87fe97b75ad671cd491d02432f1a839 (commit)
   via  b5e2e725117241fe9b5f346768b6a21adb5d6ec8 (commit)
   via  4248a8bf99671c33169262c88af92e9577fdfd50 (commit)
  from  cab2de7bb0bfede9fe88b212c0eba7ebf162c04a (commit)

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


- Log -
commit f0e75ff36390549d811557c3763d19a7f656b0d4
Author: Stefan Metzmacher 
Date:   Wed Feb 4 15:17:14 2009 +0100

selftest: s/SMBD/SAMBA/ in Samba.pm

metze

commit 76a2d068f5fe6e29ac2506e0d38859a2db8892c4
Author: Stefan Metzmacher 
Date:   Wed Feb 4 15:16:42 2009 +0100

selftest: allow "skip" as max runtime for smbd, nmbd and winbindd

metze

commit bb88b038467284d2ef8bdd7236bc07492b6e22ce
Author: Stefan Metzmacher 
Date:   Wed Feb 4 11:26:46 2009 +0100

selftest: Samba3 protect against removing /*

metze

commit 3c1feb82c87fe97b75ad671cd491d02432f1a839
Author: Stefan Metzmacher 
Date:   Wed Feb 4 11:21:29 2009 +0100

selftest: add target::Template

metze

commit b5e2e725117241fe9b5f346768b6a21adb5d6ec8
Author: Stefan Metzmacher 
Date:   Wed Feb 4 11:20:39 2009 +0100

merged-build: pass PYTHON and PERL down to make test4

metze

commit 4248a8bf99671c33169262c88af92e9577fdfd50
Author: Stefan Metzmacher 
Date:   Wed Feb 4 11:20:14 2009 +0100

selftest: add my copyright

metze

---

Summary of changes:
 selftest/selftest.pl|2 +
 selftest/target/Samba3.pm   |   35 -
 selftest/target/Samba4.pm   |   36 +++---
 selftest/target/Template.pm |   52 +++
 source3/samba4.mk   |3 +-
 5 files changed, 108 insertions(+), 20 deletions(-)
 create mode 100644 selftest/target/Template.pm


Changeset truncated at 500 lines:

diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index 0be2e78..ef4c385 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -1,6 +1,7 @@
 #!/usr/bin/perl
 # Bootstrap Samba and run a number of tests against it.
 # Copyright (C) 2005-2008 Jelmer Vernooij 
+# Copyright (C) 2007-2009 Stefan Metzmacher 
 # Published under the GNU GPL, v3 or later.
 
 =pod
@@ -287,6 +288,7 @@ sub ShowHelp()
 {
print "Samba test runner
 Copyright (C) Jelmer Vernooij 
+Copyright (C) Stefan Metzmacher 
 
 Usage: $Script [OPTIONS] TESTNAME-REGEX
 
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 49984f1..e1bea16 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -187,7 +187,7 @@ sub stop_sig_term($$) {
 
 sub stop_sig_kill($$) {
my ($self, $pid) = @_;
-   kill("ALRM", $pid) or warn("Unable to kill $pid: $!");
+   kill("KILL", $pid) or warn("Unable to kill $pid: $!");
 }
 
 sub write_pid($$$)
@@ -226,6 +226,16 @@ sub check_or_start() {
$ENV{NSS_WRAPPER_PASSWD} = $env_vars->{NSS_WRAPPER_PASSWD};
$ENV{NSS_WRAPPER_GROUP} = $env_vars->{NSS_WRAPPER_GROUP};
 
+   if ($nmbd_maxtime eq "skip") {
+   $SIG{USR1} = $SIG{ALRM} = $SIG{INT} = $SIG{QUIT} = 
$SIG{TERM} = sub {
+   my $signame = shift;
+   print("Skip nmbd received signal $signame");
+   exit 0;
+   };
+   sleep(99);
+   exit 0;
+   }
+
my @optargs = ("-d0");
if (defined($ENV{NMBD_OPTIONS})) {
@optargs = split(/ /, $ENV{NMBD_OPTIONS});
@@ -257,6 +267,16 @@ sub check_or_start() {
$ENV{NSS_WRAPPER_PASSWD} = $env_vars->{NSS_WRAPPER_PASSWD};
$ENV{NSS_WRAPPER_GROUP} = $env_vars->{NSS_WRAPPER_GROUP};
 
+   if ($winbindd_maxtime eq "skip") {
+   $SIG{USR1} = $SIG{ALRM} = $SIG{INT} = $SIG{QUIT} = 
$SIG{TERM} = sub {
+   my $signame = shift;
+   print("Skip winbindd received signal $signame");
+   exit 0;
+   };
+   sleep(99);
+   exit 0;
+   }
+
my @optargs = ("-d0");
if (defined($ENV{WINBINDD_OPTIONS})) {
@optargs = split(/ /, $ENV{WINBINDD_OPTIONS});
@@ -288,6 +308,16 @@ sub check_or_start() {
$ENV{NSS_WRAPPER_PASSWD} = $env_vars->{NSS_WRAPPER_PASSWD};
$ENV{NSS_WRAPPER_GROUP} = $env_vars->{NSS_WRAPPER_GROUP};
 
+   if ($smbd_maxtime eq "skip") {
+ 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-727-gcab2de7

2009-02-10 Thread Günther Deschner
The branch, master has been updated
   via  cab2de7bb0bfede9fe88b212c0eba7ebf162c04a (commit)
   via  96f05fcd1ca690aa676fc3e38f9b3aa3b4076f04 (commit)
   via  3d4221a9cbe178fc96e0e72b6f3b331fc0700752 (commit)
   via  b4bda6da5ae63223207f08caec8fedfd8a654ee2 (commit)
   via  0fc13e7e2cb95f4e8a94b6fc91c72ee59b2963d6 (commit)
   via  e4b5e67566da767b423c8412601f46d3f95ff34c (commit)
   via  2ede56f3c023ad1a8b7d3d8947b93fa5bedb21a1 (commit)
   via  0a34c140cc096c222fb697c746d0045990ed3080 (commit)
  from  46200a7cd4c1e6919e5ab99f1080dff013ed8867 (commit)

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


- Log -
commit cab2de7bb0bfede9fe88b212c0eba7ebf162c04a
Author: Günther Deschner 
Date:   Tue Feb 10 01:58:46 2009 +0100

s3-spoolss: remove old spoolss_OpenPrinter.

Guenther

commit 96f05fcd1ca690aa676fc3e38f9b3aa3b4076f04
Author: Günther Deschner 
Date:   Tue Feb 10 01:48:18 2009 +0100

s3-spoolss: use pidl for _spoolss_OpenPrinter.

Guenther

commit 3d4221a9cbe178fc96e0e72b6f3b331fc0700752
Author: Günther Deschner 
Date:   Tue Feb 10 01:53:32 2009 +0100

s3-spoolss: remove old spoolss_OpenPrinterEx.

Guenther

commit b4bda6da5ae63223207f08caec8fedfd8a654ee2
Author: Günther Deschner 
Date:   Tue Feb 10 01:43:25 2009 +0100

s3-spoolss: use pidl for _spoolss_OpenPrinterEx.

Guenther

commit 0fc13e7e2cb95f4e8a94b6fc91c72ee59b2963d6
Author: Günther Deschner 
Date:   Tue Feb 10 00:21:53 2009 +0100

s3-spoolss: remove old spoolss_SetJob.

Guenther

commit e4b5e67566da767b423c8412601f46d3f95ff34c
Author: Günther Deschner 
Date:   Tue Feb 10 00:21:26 2009 +0100

s3-spoolss: use pidl for _spoolss_SetJob.

Guenther

commit 2ede56f3c023ad1a8b7d3d8947b93fa5bedb21a1
Author: Günther Deschner 
Date:   Mon Feb 9 23:31:35 2009 +0100

s3-spoolss: remove old spoolss_StartDocPrinter.

Guenther

commit 0a34c140cc096c222fb697c746d0045990ed3080
Author: Günther Deschner 
Date:   Mon Feb 9 23:28:34 2009 +0100

s3-spoolss: use pidl for _spoolss_StartDocPrinter.

Guenther

---

Summary of changes:
 source3/include/proto.h |   34 ---
 source3/include/rpc_spoolss.h   |   83 ---
 source3/rpc_client/cli_spoolss.c|   86 ---
 source3/rpc_parse/parse_spoolss.c   |  450 ---
 source3/rpc_server/srv_spoolss.c|   89 +---
 source3/rpc_server/srv_spoolss_nt.c |  321 +++---
 6 files changed, 85 insertions(+), 978 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index db277ff..c2391c7 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5433,9 +5433,6 @@ WERROR rpccli_spoolss_openprinter_ex(struct 
rpc_pipe_client *cli,
 const char *printername,
 uint32_t access_desired,
 struct policy_handle *handle);
-WERROR rpccli_spoolss_open_printer_ex(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx,
-   const char *printername, const char *datatype, 
uint32 access_required,
-   const char *station, const char *username, 
POLICY_HND *pol);
 WERROR rpccli_spoolss_enum_printers(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx,
 char *name, uint32 flags, uint32 level,
 uint32 *num_printers, PRINTER_INFO_CTR *ctr);
@@ -5475,16 +5472,9 @@ WERROR rpccli_spoolss_enumforms(struct rpc_pipe_client 
*cli, TALLOC_CTX *mem_ctx
 WERROR rpccli_spoolss_enumjobs(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx,
POLICY_HND *hnd, uint32 level, uint32 firstjob, 
uint32 num_jobs, uint32 *returned, JOB_INFO_CTR 
*ctr);
-WERROR rpccli_spoolss_setjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd, uint32 jobid, uint32 level, 
- uint32 command);
 WERROR rpccli_spoolss_getjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
  POLICY_HND *hnd, uint32 jobid, uint32 level,
  JOB_INFO_CTR *ctr);
-WERROR rpccli_spoolss_startdocprinter(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx,
-  POLICY_HND *hnd, char *docname, 
-  char *outputfile, char *datatype, 
-  uint32 *jobid);
 WERROR rpccli_spoolss_getprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx,
  POLICY_HND *hnd, const char *valuename, 
  REGISTRY_VALUE *value);
@@ -5806,12 +5796,6 @@ bool smb_io_notify_info_data_strings(co

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-719-g46200a7

2009-02-10 Thread Günther Deschner
The branch, master has been updated
   via  46200a7cd4c1e6919e5ab99f1080dff013ed8867 (commit)
  from  ee469585eb11e9964d0f490fde94ee00e55879fa (commit)

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


- Log -
commit 46200a7cd4c1e6919e5ab99f1080dff013ed8867
Author: Günther Deschner 
Date:   Tue Feb 10 01:46:32 2009 +0100

s3-spoolss: add temporary convert_devicemode_new function.

Guenther

---

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


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index a39770a..1312b2e 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -1549,6 +1549,81 @@ WERROR _spoolss_open_printer(pipes_struct *p, 
SPOOL_Q_OPEN_PRINTER *q_u, SPOOL_R
 }
 
 /
+ FIXME: temporary convert_devicemode_new function
+ /
+
+static bool convert_devicemode_new(const char *printername,
+  struct spoolss_DeviceMode *devmode,
+  NT_DEVICEMODE **pp_nt_devmode)
+{
+   NT_DEVICEMODE *nt_devmode = *pp_nt_devmode;
+
+   /*
+* Ensure nt_devmode is a valid pointer
+* as we will be overwriting it.
+*/
+
+   if (nt_devmode == NULL) {
+   DEBUG(5, ("convert_devicemode_new: allocating a generic 
devmode\n"));
+   if ((nt_devmode = construct_nt_devicemode(printername)) == NULL)
+   return false;
+   }
+
+   rpcstr_push(nt_devmode->devicename, devmode->devicename, 31, 0);
+   rpcstr_push(nt_devmode->formname, devmode->formname, 31, 0);
+
+   nt_devmode->specversion = devmode->specversion;
+   nt_devmode->driverversion   = devmode->driverversion;
+   nt_devmode->size= devmode->size;
+   nt_devmode->fields  = devmode->fields;
+   nt_devmode->orientation = devmode->orientation;
+   nt_devmode->papersize   = devmode->papersize;
+   nt_devmode->paperlength = devmode->paperlength;
+   nt_devmode->paperwidth  = devmode->paperwidth;
+   nt_devmode->scale   = devmode->scale;
+   nt_devmode->copies  = devmode->copies;
+   nt_devmode->defaultsource   = devmode->defaultsource;
+   nt_devmode->printquality= devmode->printquality;
+   nt_devmode->color   = devmode->color;
+   nt_devmode->duplex  = devmode->duplex;
+   nt_devmode->yresolution = devmode->yresolution;
+   nt_devmode->ttoption= devmode->ttoption;
+   nt_devmode->collate = devmode->collate;
+
+   nt_devmode->logpixels   = devmode->logpixels;
+   nt_devmode->bitsperpel  = devmode->bitsperpel;
+   nt_devmode->pelswidth   = devmode->pelswidth;
+   nt_devmode->pelsheight  = devmode->pelsheight;
+   nt_devmode->displayflags= devmode->displayflags;
+   nt_devmode->displayfrequency= devmode->displayfrequency;
+   nt_devmode->icmmethod   = devmode->icmmethod;
+   nt_devmode->icmintent   = devmode->icmintent;
+   nt_devmode->mediatype   = devmode->mediatype;
+   nt_devmode->dithertype  = devmode->dithertype;
+   nt_devmode->reserved1   = devmode->reserved1;
+   nt_devmode->reserved2   = devmode->reserved2;
+   nt_devmode->panningwidth= devmode->panningwidth;
+   nt_devmode->panningheight   = devmode->panningheight;
+
+   /*
+* Only change private and driverextra if the incoming devmode
+* has a new one. JRA.
+*/
+
+   if ((devmode->__driverextra_length != 0) && 
(devmode->driverextra_data.data != NULL)) {
+   SAFE_FREE(nt_devmode->nt_dev_private);
+   nt_devmode->driverextra = devmode->__driverextra_length;
+   if((nt_devmode->nt_dev_private=SMB_MALLOC_ARRAY(uint8, 
nt_devmode->driverextra)) == NULL)
+   return false;
+   memcpy(nt_devmode->nt_dev_private, 
devmode->driverextra_data.data, nt_devmode->driverextra);
+   }
+
+   *pp_nt_devmode = nt_devmode;
+
+   return true;
+}
+
+/
  /
 
 WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX 
*q_u, SPOOL_R_OPEN_PRINTER_EX *r_u)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-718-gee46958

2009-02-10 Thread Günther Deschner
The branch, master has been updated
   via  ee469585eb11e9964d0f490fde94ee00e55879fa (commit)
  from  9d05e91ec062e6c745a1b51c99b9d4c3df0961f1 (commit)

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


- Log -
commit ee469585eb11e9964d0f490fde94ee00e55879fa
Author: Günther Deschner 
Date:   Tue Feb 10 00:08:11 2009 +0100

s3-spoolss: use SPOOLSS_JOB_CONTROL bits defined in IDL.

Guenther

---

Summary of changes:
 source3/include/rpc_spoolss.h   |6 --
 source3/rpc_server/srv_spoolss_nt.c |   10 +-
 2 files changed, 5 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h
index d0fac59..63bc5ee 100644
--- a/source3/include/rpc_spoolss.h
+++ b/source3/include/rpc_spoolss.h
@@ -1022,12 +1022,6 @@ typedef struct spool_r_enumports
 }
 SPOOL_R_ENUMPORTS;
 
-#define JOB_CONTROL_PAUSE  1
-#define JOB_CONTROL_RESUME 2
-#define JOB_CONTROL_CANCEL 3
-#define JOB_CONTROL_RESTART4
-#define JOB_CONTROL_DELETE 5
-
 typedef struct job_info_info
 {
union
diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index a0b689c..a39770a 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -6903,19 +6903,19 @@ WERROR _spoolss_setjob(pipes_struct *p, SPOOL_Q_SETJOB 
*q_u, SPOOL_R_SETJOB *r_u
}
 
switch (command) {
-   case JOB_CONTROL_CANCEL:
-   case JOB_CONTROL_DELETE:
+   case SPOOLSS_JOB_CONTROL_CANCEL:
+   case SPOOLSS_JOB_CONTROL_DELETE:
if (print_job_delete(p->server_info, snum, jobid, &errcode)) {
errcode = WERR_OK;
}
break;
-   case JOB_CONTROL_PAUSE:
+   case SPOOLSS_JOB_CONTROL_PAUSE:
if (print_job_pause(p->server_info, snum, jobid, &errcode)) {
errcode = WERR_OK;
}
break;
-   case JOB_CONTROL_RESTART:
-   case JOB_CONTROL_RESUME:
+   case SPOOLSS_JOB_CONTROL_RESTART:
+   case SPOOLSS_JOB_CONTROL_RESUME:
if (print_job_resume(p->server_info, snum, jobid, &errcode)) {
errcode = WERR_OK;
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-717-g9d05e91

2009-02-10 Thread Günther Deschner
The branch, master has been updated
   via  9d05e91ec062e6c745a1b51c99b9d4c3df0961f1 (commit)
   via  b19b6aea1258de18eec6832199f2b736a930b095 (commit)
  from  25fc58afcd6051cd387a7114afadab2a85b98cfb (commit)

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


- Log -
commit 9d05e91ec062e6c745a1b51c99b9d4c3df0961f1
Author: Günther Deschner 
Date:   Mon Feb 9 18:49:34 2009 +0100

s3-rpcclient: use rpccli_spoolss_openprinter_ex helper.

Guenther

commit b19b6aea1258de18eec6832199f2b736a930b095
Author: Günther Deschner 
Date:   Mon Feb 9 17:56:20 2009 +0100

s3-rpcclient: add rpccli_spoolss_openprinter_ex() convenience wrapper.

Guenther

---

Summary of changes:
 source3/include/proto.h  |5 +
 source3/libads/ldap_printer.c|   10 +-
 source3/rpc_client/cli_spoolss.c |   49 ++
 source3/rpcclient/cmd_spoolss.c  |  184 ++
 source3/utils/net_rpc_printer.c  |7 +-
 5 files changed, 150 insertions(+), 105 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 849bed3..db277ff 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5428,6 +5428,11 @@ NTSTATUS rpccli_try_samr_connects(struct rpc_pipe_client 
*cli,
 
 /* The following definitions come from rpc_client/cli_spoolss.c  */
 
+WERROR rpccli_spoolss_openprinter_ex(struct rpc_pipe_client *cli,
+TALLOC_CTX *mem_ctx,
+const char *printername,
+uint32_t access_desired,
+struct policy_handle *handle);
 WERROR rpccli_spoolss_open_printer_ex(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx,
const char *printername, const char *datatype, 
uint32 access_required,
const char *station, const char *username, 
POLICY_HND *pol);
diff --git a/source3/libads/ldap_printer.c b/source3/libads/ldap_printer.c
index 1bcb86e..a61df3c 100644
--- a/source3/libads/ldap_printer.c
+++ b/source3/libads/ldap_printer.c
@@ -319,11 +319,11 @@ WERROR get_remote_printer_publishing_data(struct 
rpc_pipe_client *cli,
DEBUG(3, ("Insufficient memory\n"));
return WERR_NOMEM;
}
-   
-   result = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername, 
-"", MAXIMUM_ALLOWED_ACCESS, 
-cli->srv_name_slash, 
cli->auth->user_name,
-&pol);
+
+   result = rpccli_spoolss_openprinter_ex(cli, mem_ctx,
+  printername,
+  SEC_FLAG_MAXIMUM_ALLOWED,
+  &pol);
if (!W_ERROR_IS_OK(result)) {
DEBUG(3, ("Unable to open printer %s, error is %s.\n",
  printername, win_errstr(result)));
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c
index 1ad8b5d..780043a 100644
--- a/source3/rpc_client/cli_spoolss.c
+++ b/source3/rpc_client/cli_spoolss.c
@@ -25,6 +25,55 @@
 #include "includes.h"
 #include "rpc_client.h"
 
+/**
+ convencience wrapper around rpccli_spoolss_OpenPrinterEx
+**/
+
+WERROR rpccli_spoolss_openprinter_ex(struct rpc_pipe_client *cli,
+TALLOC_CTX *mem_ctx,
+const char *printername,
+uint32_t access_desired,
+struct policy_handle *handle)
+{
+   NTSTATUS status;
+   WERROR werror;
+   struct spoolss_DevmodeContainer devmode_ctr;
+   union spoolss_UserLevel userlevel;
+   struct spoolss_UserLevel1 level1;
+
+   ZERO_STRUCT(devmode_ctr);
+
+   level1.size = 28;
+   level1.client   = cli->srv_name_slash;
+   level1.user = cli->auth->user_name;
+   level1.build= 1381;
+   level1.major= 2;
+   level1.minor= 0;
+   level1.processor = 0;
+
+   userlevel.level1 = &level1;
+
+   status = rpccli_spoolss_OpenPrinterEx(cli, mem_ctx,
+ printername,
+ NULL,
+ devmode_ctr,
+ access_desired,
+ 1, /* level */
+ userlevel,
+ handle,
+

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

2009-02-10 Thread Günther Deschner
The branch, v3-2-test has been updated
   via  b698559694d3f1799dec290433f75fbb73aceb32 (commit)
  from  197b4c42bbf53347f4953e39099192693d709a7d (commit)

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


- Log -
commit b698559694d3f1799dec290433f75fbb73aceb32
Author: Günther Deschner 
Date:   Tue Feb 10 10:59:34 2009 +0100

s3-spoolss: fix memleak in get_remote_printer_publishing_data().

Guenther
(cherry picked from commit 97f1514ce95800f1296b1979f1b34dcc5d56a376)

---

Summary of changes:
 source/libads/ldap_printer.c |   10 --
 1 files changed, 8 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libads/ldap_printer.c b/source/libads/ldap_printer.c
index 05fbc07..235fc04 100644
--- a/source/libads/ldap_printer.c
+++ b/source/libads/ldap_printer.c
@@ -301,11 +301,14 @@ WERROR get_remote_printer_publishing_data(struct 
rpc_pipe_client *cli,
if (!W_ERROR_IS_OK(result)) {
DEBUG(3, ("Unable to open printer %s, error is %s.\n",
  printername, dos_errstr(result)));
+   SAFE_FREE(printername);
return result;
}

-   if ( !(dsdriver_ctr = TALLOC_ZERO_P( mem_ctx, REGVAL_CTR )) ) 
+   if ( !(dsdriver_ctr = TALLOC_ZERO_P( mem_ctx, REGVAL_CTR )) ) {
+   SAFE_FREE(printername);
return WERR_NOMEM;
+   }
 
result = rpccli_spoolss_enumprinterdataex(cli, mem_ctx, &pol, 
SPOOL_DSDRIVER_KEY, dsdriver_ctr);
 
@@ -321,8 +324,10 @@ WERROR get_remote_printer_publishing_data(struct 
rpc_pipe_client *cli,
}
}

-   if ( !(dsspooler_ctr = TALLOC_ZERO_P( mem_ctx, REGVAL_CTR )) )
+   if ( !(dsspooler_ctr = TALLOC_ZERO_P( mem_ctx, REGVAL_CTR )) ) {
+   SAFE_FREE(printername);
return WERR_NOMEM;
+   }
 
result = rpccli_spoolss_enumprinterdataex(cli, mem_ctx, &pol, 
SPOOL_DSSPOOLER_KEY, dsspooler_ctr);
 
@@ -343,6 +348,7 @@ WERROR get_remote_printer_publishing_data(struct 
rpc_pipe_client *cli,
TALLOC_FREE( dsspooler_ctr );
 
rpccli_spoolss_close_printer(cli, mem_ctx, &pol);
+   SAFE_FREE(printername);
 
return result;
 }


-- 
Samba Shared Repository


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

2009-02-10 Thread Günther Deschner
The branch, v3-3-test has been updated
   via  97f1514ce95800f1296b1979f1b34dcc5d56a376 (commit)
  from  df15e8f84d108f8e9df1408155b0f9ccc44da3fe (commit)

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


- Log -
commit 97f1514ce95800f1296b1979f1b34dcc5d56a376
Author: Günther Deschner 
Date:   Tue Feb 10 10:59:34 2009 +0100

s3-spoolss: fix memleak in get_remote_printer_publishing_data().

Guenther

---

Summary of changes:
 source/libads/ldap_printer.c |   10 --
 1 files changed, 8 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libads/ldap_printer.c b/source/libads/ldap_printer.c
index eb6e3d3..3ff8846 100644
--- a/source/libads/ldap_printer.c
+++ b/source/libads/ldap_printer.c
@@ -328,11 +328,14 @@ WERROR get_remote_printer_publishing_data(struct 
rpc_pipe_client *cli,
if (!W_ERROR_IS_OK(result)) {
DEBUG(3, ("Unable to open printer %s, error is %s.\n",
  printername, dos_errstr(result)));
+   SAFE_FREE(printername);
return result;
}

-   if ( !(dsdriver_ctr = TALLOC_ZERO_P( mem_ctx, REGVAL_CTR )) ) 
+   if ( !(dsdriver_ctr = TALLOC_ZERO_P( mem_ctx, REGVAL_CTR )) ) {
+   SAFE_FREE(printername);
return WERR_NOMEM;
+   }
 
result = rpccli_spoolss_enumprinterdataex(cli, mem_ctx, &pol, 
SPOOL_DSDRIVER_KEY, dsdriver_ctr);
 
@@ -348,8 +351,10 @@ WERROR get_remote_printer_publishing_data(struct 
rpc_pipe_client *cli,
}
}

-   if ( !(dsspooler_ctr = TALLOC_ZERO_P( mem_ctx, REGVAL_CTR )) )
+   if ( !(dsspooler_ctr = TALLOC_ZERO_P( mem_ctx, REGVAL_CTR )) ) {
+   SAFE_FREE(printername);
return WERR_NOMEM;
+   }
 
result = rpccli_spoolss_enumprinterdataex(cli, mem_ctx, &pol, 
SPOOL_DSSPOOLER_KEY, dsspooler_ctr);
 
@@ -370,6 +375,7 @@ WERROR get_remote_printer_publishing_data(struct 
rpc_pipe_client *cli,
TALLOC_FREE( dsspooler_ctr );
 
rpccli_spoolss_close_printer(cli, mem_ctx, &pol);
+   SAFE_FREE(printername);
 
return result;
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-715-g25fc58a

2009-02-10 Thread Günther Deschner
The branch, master has been updated
   via  25fc58afcd6051cd387a7114afadab2a85b98cfb (commit)
  from  11f60a62a1d7633e9a8ec62da18ed9ababa694df (commit)

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


- Log -
commit 25fc58afcd6051cd387a7114afadab2a85b98cfb
Author: Günther Deschner 
Date:   Tue Feb 10 10:45:55 2009 +0100

s3-spoolss: fix memleak in get_remote_printer_publishing_data().

Guenther

---

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


Changeset truncated at 500 lines:

diff --git a/source3/libads/ldap_printer.c b/source3/libads/ldap_printer.c
index c9c43f0..1bcb86e 100644
--- a/source3/libads/ldap_printer.c
+++ b/source3/libads/ldap_printer.c
@@ -327,11 +327,14 @@ WERROR get_remote_printer_publishing_data(struct 
rpc_pipe_client *cli,
if (!W_ERROR_IS_OK(result)) {
DEBUG(3, ("Unable to open printer %s, error is %s.\n",
  printername, win_errstr(result)));
+   SAFE_FREE(printername);
return result;
}

-   if ( !(dsdriver_ctr = TALLOC_ZERO_P( mem_ctx, REGVAL_CTR )) ) 
+   if ( !(dsdriver_ctr = TALLOC_ZERO_P( mem_ctx, REGVAL_CTR )) )  {
+   SAFE_FREE(printername);
return WERR_NOMEM;
+   }
 
result = rpccli_spoolss_enumprinterdataex(cli, mem_ctx, &pol, 
SPOOL_DSDRIVER_KEY, dsdriver_ctr);
 
@@ -347,8 +350,10 @@ WERROR get_remote_printer_publishing_data(struct 
rpc_pipe_client *cli,
}
}

-   if ( !(dsspooler_ctr = TALLOC_ZERO_P( mem_ctx, REGVAL_CTR )) )
+   if ( !(dsspooler_ctr = TALLOC_ZERO_P( mem_ctx, REGVAL_CTR )) ) {
+   SAFE_FREE(printername);
return WERR_NOMEM;
+   }
 
result = rpccli_spoolss_enumprinterdataex(cli, mem_ctx, &pol, 
SPOOL_DSSPOOLER_KEY, dsspooler_ctr);
 
@@ -369,6 +374,7 @@ WERROR get_remote_printer_publishing_data(struct 
rpc_pipe_client *cli,
TALLOC_FREE( dsspooler_ctr );
 
rpccli_spoolss_ClosePrinter(cli, mem_ctx, &pol, NULL);
+   SAFE_FREE(printername);
 
return result;
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-714-g11f60a6

2009-02-10 Thread Steven Danneman
The branch, master has been updated
   via  11f60a62a1d7633e9a8ec62da18ed9ababa694df (commit)
   via  6272f4c2f453c509b8a3893d4c2ac5fc356b348d (commit)
   via  25d345eb39c69b2b42a966846ae893b068de40a4 (commit)
   via  af0e199b31ea4132e369508d72888757887b3327 (commit)
  from  9a7491e83177ba32e30f29e1b84b8b8be9888953 (commit)

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


- Log -
commit 11f60a62a1d7633e9a8ec62da18ed9ababa694df
Author: Steven Danneman 
Date:   Mon Jan 26 20:14:32 2009 -0800

s3: OneFS bulk directory enumeration support

OneFS provides the bulk directory enumeration syscall readdirplus().  This
syscall has the same semantics as the NFSv3 READDIRPLUS command, returning
a batch of directory entries with prefetched stat information via one
syscall.

This commit wraps the readdirplus() call in the existing POSIX
readdir/seekdir VFS interface.  By default a batch of 128 directory entries
are optimistically read from the kernel into a global cache, and fed to
iterative calls of VFS_OP_READDIR.

The global buffers could be avoided in the future by hanging connection
specific buffers off the conn struct.

Added new parameter "onefs:use readdirplus" which toggles usage of this
code on or off.

commit 6272f4c2f453c509b8a3893d4c2ac5fc356b348d
Author: Steven Danneman 
Date:   Mon Feb 2 21:37:51 2009 -0800

s3: Added SMB_VFS_INIT_SEARCH_OP to initialize data at the beginning of SMB 
search requests.

By default this VFS call is a NOOP, but the onefs vfs module takes advantage
of it to initialize direntry search caches at the beginning of each
TRANS2_FIND_FIRST, TRANS2_FIND_NEXT, SMBffirst, SMBsearch, and SMBunique

commit 25d345eb39c69b2b42a966846ae893b068de40a4
Author: Steven Danneman 
Date:   Thu Jan 22 20:18:56 2009 -0800

Pass stat buffer down through all levels of VFS_READDIR wrappers

* VFS_OP_READDIR can now provide stat information, take advantage of it
  if it's available
* is_visible_file(): optimistically expect the provided stat buffer is
  already valid
* dptr_ReadDirName(): refactor code for easier readability, functionality
  is the same

commit af0e199b31ea4132e369508d72888757887b3327
Author: Steven Danneman 
Date:   Thu Jan 22 20:14:38 2009 -0800

Add an optional SMB_STRUCT_SMB parameter to VFS_OP_READDIR

* this allows VFS implementations that prefetch stat information on
  readdir to return it through one VFS call
* backwards compatibility is maintained by passing in NULL
* if the system readdir doesn't return stat info, the stat struct is
  set to invalid

---

Summary of changes:
 source3/Makefile.in |2 +-
 source3/include/proto.h |6 +-
 source3/include/vfs.h   |   15 +-
 source3/include/vfs_macros.h|   11 +-
 source3/modules/onefs.h |   46 ++-
 source3/modules/onefs_dir.c |  636 +++
 source3/modules/onefs_streams.c |2 +-
 source3/modules/vfs_cap.c   |2 +-
 source3/modules/vfs_catia.c |5 +-
 source3/modules/vfs_default.c   |   16 +-
 source3/modules/vfs_full_audit.c|   21 +-
 source3/modules/vfs_onefs.c |   24 ++-
 source3/modules/vfs_shadow_copy.c   |4 +-
 source3/modules/vfs_shadow_copy2.c  |2 +-
 source3/modules/vfs_streams_depot.c |2 +-
 source3/smbd/dir.c  |  180 ++-
 source3/smbd/filename.c |2 +-
 source3/smbd/msdfs.c|4 +-
 source3/smbd/reply.c|   24 +-
 source3/smbd/trans2.c   |   12 +-
 source3/smbd/vfs.c  |4 +-
 source3/torture/cmd_vfs.c   |   35 ++-
 22 files changed, 912 insertions(+), 143 deletions(-)
 create mode 100644 source3/modules/onefs_dir.c


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 2049953..6e453c9 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -664,7 +664,7 @@ VFS_ACL_XATTR_OBJ = modules/vfs_acl_xattr.o
 VFS_ACL_TDB_OBJ = modules/vfs_acl_tdb.o
 VFS_SMB_TRAFFIC_ANALYZER_OBJ = modules/vfs_smb_traffic_analyzer.o
 VFS_ONEFS_OBJ = modules/vfs_onefs.o modules/onefs_acl.o modules/onefs_system.o 
\
-   modules/onefs_open.o modules/onefs_streams.o
+   modules/onefs_open.o modules/onefs_streams.o modules/onefs_dir.c
 PERFCOUNT_ONEFS_OBJ = modules/perfcount_onefs.o
 
 PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 1566a01..849bed3 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6495,6 +6495,7 @@ const char *dptr_ReadDirName(TALLOC_CTX *ctx,
SMB_STRUCT_STAT *pst);
 bool dptr_Se