[SCM] Samba Shared Repository - branch v4-0-stable updated

Karolin Seeger kseeger at samba.org
Tue Aug 20 01:09:27 MDT 2013


The branch, v4-0-stable has been updated
       via  c0bc3a3 VERSION: Disable git snapshots for the 4.0.9 release.
       via  b752b34 WHATSNEW: Prepare release notes for Samba 4.0.9.
       via  1a61c56 s3-libads: Print a message if no realm has been specified.
       via  dea6282 s3-libads: Fail create_local_private_krb5_conf_for_domain() if parameters missing.
       via  9439729 Ensure gpfs kernel leases are wrapped in a become_root()/unbecome_root() pair.
       via  f17721e Wrap setting leases in become_root()/unbecome_root() to ensure correct delivery of signals.
       via  c3a6b78 Add torture tests to raw.eas to check sending Windows invalid names in the middle of an EA list.
       via  fee1915 Reply with correct trans2 message on a setpathinfo with a bad EA name.
       via  050c42d Ensure we do pathname processing before SD and EA processing in NTTRANS_CREATE.
       via  515f122 Ensure we can't create a file using NTTRANS with an invalid EA list.
       via  6a5fed3 Ensure we can't create a file using TRANS2_OPEN with an invalid EA list.
       via  64e27e2 Add error map of STATUS_INVALID_EA_NAME -> ERRDOS, ERRbadfile
       via  76996fe Add the ability to send an NTSTATUS result back with a trans2 reply so we can return a parameter block with an error code.
       via  2f76ebd Ensure we can't create a file using SMB2_CREATE with an invalid EA list.
       via  f89d994 Ensure we never return an EA name to a Windows client it can't handle.
       via  8f40e36 Ensure set_ea cannot set invalid Windows EA names.
       via  1f902e4 Add ea_list_has_invalid_name() function.
       via  c358417 Fix bug 9678 - Windows 8 Roaming profiles fail
       via  2d6b4f0 security.idl: add new security_secinfo bits
       via  f5bd128 VERSION: Bump version number up to 4.0.9.
       via  3b7e719 Merge tag 'samba-4.0.8' into v4-0-test
       via  221cffa s4-lib/socket: Allocate a the larger sockaddr_un and not just a sockaddr_in in unixdom_get_my_addr()
       via  85db68b s4-lib/socket: Allocate a the larger sockaddr_un and not just a sockaddr_in in unixdom_get_peer_addr()
       via  93d4207 s4:server: avoid calling into nss_winbind from within 'samba'
       via  45349be s4:rpc_server: make sure we don't terminate a connection with pending requests (bug #9820)
       via  a1a7349 s4-winbindd: Do not terminate a connection that is still pending (bug #9820)
       via  c257e3b service_stream: Log if the connection termination is deferred or not (bug #9820)
       via  a629507 s4-winbind: Add special case for BUILTIN domain
       via  7ded0ce pam_winbind: update documentation for "DIR" krb5ccname pragma.
       via  7ce7020 s3-winbindd: support the DIR pragma for raw kerberos user pam authentication.
       via  98393f9 wbinfo: allow to define a custom krb5ccname for kerberized pam auth.
       via  64dce3c s3-netlogon: enumerate UPN suffixes from PASSDB when available
       via  38d13bb PASSDB: add support to set and enumerate UPN suffixes associated with our forest
       via  5dee63c s3-waf: filter out ldapsam internal init functions
       via  6d3aa05 wafsamba: fix samba_abi for default catch-all case
       via  b2c597f s3-winbind: Do not delete an existing valid credential cache.
       via  ed120ed lib/param: sync debug related options with source3/param
       via  ba584a5 lib/ldb-samba: only debug LDB_DEBUG_TRACE at level 10
       via  42cb71b lib/ldb-samba: make use of DBGC_LDB
       via  89644f4 lib/util: add 'ldb' debug class
       via  580740d debug: Add debugclass for DNS server
       via  a56ccfb dsdb-ridalloc: Fix RID pools - RID numbers increase too quickly
       via  afab702 smbd: Fix a 100% loop at shutdown time
       via  f31f55b s3-smbstatus: display [u|g]id of -1 as "-1" in connection list
       via  c286950 s3-lib: hide incomplete smbXsrv_tcon_global records
       via  d15f6a8 s3-lib: fix segf while reading incomplete session info (bug #10003)
       via  0b80e93 vfs_streams_xattr: Do not attempt to write empty attribute twice
       via  f695430 Initialize the file descriptor in the files_struct before trying to close it. Otherwise, if one of the SETXATTR calls had failed, the close() call will return EBADF.
       via  9f7cbc7 s3:smbd:smb2: fix setting of scavenge timeout when reconnecting durable handles
       via  e309d2e s3:smbd: call scavenger_schedule_disconnected() from close normal file for durable handles
       via  f688ed3 s3:smbd: add a scavenger process for disconnected durable handles
       via  888694d s3:locking: add function share_mode_cleanup_disconnected()
       via  4e423bc s3:locking: improve debug output of parse_share_modes()
       via  73f7c56 s3:locking: no need to make a file_id passed by value a constant
       via  1446ff4 s3:locking:brlock: add function brl_cleanup_disconnected()
       via  66eedcd s3:locking:brlock: explain the lockdb_clean semantic better in brl_reconnect_disconnected()
       via  b25d4ae s3:locking:brlock: let validate_lock_entries keep entries for disconnected servers in traverses
       via  383e20d s3:locking:brlock: improve the comment for the brl self cleaning code
       via  ff5e657 s3:locking:brlock: use serverids_exist to validate_lock_entries
       via  9fa4365 s3:smbXsrv_open: add function smbXsrv_open_cleanup()
       via  db0325f s3:smbXsrv_open: factor out smbXsrv_open_global_parse_record
       via  17106d7 s3:smbXsrv_open: add smbXsrv_open_global_traverse()
       via  e5c3875 lib: Add prctl_set_comment to utils.
       via  5eccfbf s3:smbd:smb2: fix segfault (access after free) in durable disconnect code
       via  af17545 s3:smbd: add debugging to close code (regarding disconnect of a durable)
       via  6a8cd1c s3:smbd: use smbXsrv_open_close() instead of smbXsrv_open_update()
       via  5c8e5ba VERSION: Bump version number up to 4.0.8...
      from  dbf87d3 WHATSNEW: Add release notes for Samba 4.0.8.

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


- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 VERSION                                            |    2 +-
 WHATSNEW.txt                                       |  114 ++++-
 buildtools/wafsamba/samba_abi.py                   |    4 +-
 docs-xml/manpages/pam_winbind.conf.5.xml           |   39 ++-
 examples/pam_winbind/pam_winbind.conf              |    3 +-
 file_server/file_server.c                          |    9 +
 lib/ldb-samba/ldb_wrap.c                           |    4 +-
 lib/param/loadparm.c                               |   18 +-
 lib/util/debug.c                                   |    3 +
 lib/util/debug.h                                   |    5 +-
 .../lib/version_test.c => lib/util/util_process.c  |   18 +-
 lib/{smbconf/smbconf_txt.h => util/util_process.h} |   26 +-
 lib/util/wscript_build                             |    3 +-
 libcli/util/errormap.c                             |    1 +
 librpc/idl/security.idl                            |    3 +
 nsswitch/wbinfo.c                                  |    6 +-
 selftest/knownfail                                 |    1 +
 source3/Makefile.in                                |    3 +-
 source3/include/passdb.h                           |   18 +-
 source3/include/proto.h                            |    2 +
 source3/lib/conn_tdb.c                             |   22 +-
 source3/lib/filename_util.c                        |   34 ++
 source3/lib/sessionid_tdb.c                        |   15 +-
 source3/libads/kerberos.c                          |   10 +
 source3/librpc/idl/messaging.idl                   |    1 +
 source3/locking/brlock.c                           |  152 +++++-
 source3/locking/proto.h                            |   10 +-
 source3/locking/share_mode_lock.c                  |  119 ++++-
 source3/modules/vfs_gpfs.c                         |    6 +
 source3/modules/vfs_streams_xattr.c                |   43 +--
 source3/passdb/ABI/pdb-0.sigs                      |    2 +
 source3/passdb/pdb_interface.c                     |   36 ++
 source3/rpc_server/netlogon/srv_netlog_nt.c        |  106 ++++-
 source3/smbd/blocking.c                            |    2 +-
 source3/smbd/close.c                               |   36 ++-
 source3/smbd/globals.h                             |    7 +
 source3/smbd/nttrans.c                             |   95 ++--
 source3/smbd/oplock_linux.c                        |   33 +-
 source3/smbd/proto.h                               |    1 +
 source3/smbd/scavenger.c                           |  531 ++++++++++++++++++++
 .../echo_server.h => source3/smbd/scavenger.h      |   20 +-
 source3/smbd/server.c                              |    5 +
 source3/smbd/smb2_create.c                         |   14 +-
 source3/smbd/smbXsrv_open.c                        |  173 +++++++
 source3/smbd/trans2.c                              |   86 +++-
 source3/utils/status.c                             |   24 +-
 source3/winbindd/winbindd_pam.c                    |   31 ++
 source3/wscript_build                              |    2 +
 source4/dsdb/samdb/ldb_modules/ridalloc.c          |    3 +-
 source4/lib/socket/socket_unix.c                   |    8 +-
 source4/rpc_server/dcerpc_server.c                 |   55 ++-
 source4/rpc_server/dcerpc_server.h                 |    8 +-
 source4/smbd/server.c                              |    7 +
 source4/smbd/service_stream.c                      |    6 +-
 source4/torture/raw/eas.c                          |  114 +++++
 source4/winbind/wb_dom_info.c                      |    5 +-
 source4/winbind/wb_init_domain.c                   |   38 +-
 source4/winbind/wb_samba3_protocol.c               |    5 +
 source4/winbind/wb_server.c                        |   51 ++-
 source4/winbind/wb_server.h                        |   10 +-
 source4/winbind/wb_sid2domain.c                    |   14 +
 61 files changed, 1983 insertions(+), 239 deletions(-)
 copy source3/lib/version_test.c => lib/util/util_process.c (68%)
 copy lib/{smbconf/smbconf_txt.h => util/util_process.h} (62%)
 create mode 100644 source3/smbd/scavenger.c
 copy source4/echo_server/echo_server.h => source3/smbd/scavenger.h (69%)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 68f3383..be37c35 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 ########################################################
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=0
-SAMBA_VERSION_RELEASE=8
+SAMBA_VERSION_RELEASE=9
 
 ########################################################
 # If a official release has a serious bug              #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 503aff0..8847406 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,114 @@
                    =============================
+                   Release Notes for Samba 4.0.9
+                          August 20, 2013
+                   =============================
+
+
+This is is the latest stable release of Samba 4.0.
+
+Major enhancements in Samba 4.0.9 include:
+
+o  Fix crash of Winbind after "ls -l /usr/local/samba/var/locks/sysvol"
+   (bug #9820).
+o  Fix segmentation fault while reading incomplete session info (bug #10003).
+o  smbd: Fix a 100% loop at shutdown time (bug #10013).
+
+
+Changes since 4.0.8:
+--------------------
+
+o   Michael Adam <obnox at samba.org>
+    * BUG 9930: smbd: Cleanup disonnected durable handles.
+
+
+o   Jeremy Allison <jra at samba.org>
+    * BUG 9992: Fix Windows error 0x800700FE when copying files with xattr names
+      containing ":".
+    * BUG 10064: Linux kernel oplock breaks can miss signals.
+
+
+o   Andrew Bartlett <abartlet at samba.org>
+    * BUG 9820: Fix crash of Winbind after "ls -l
+      /usr/local/samba/var/locks/sysvol".
+    * BUG 10014: Fix excessive RID allocation.
+
+
+o   Björn Baumbach <bb at sernet.de>
+    * BUG 10003: s3-lib: Fix segmentation fault while reading incomplete
+      session info.
+
+
+o   Gregor Beck <gbeck at sernet.de>
+    * BUG 9678: Windows 8 Roaming profiles fail.
+    * BUG 9930: smbd: Cleanup disonnected durable handles.
+
+
+o   Kai Blin <kai at samba.org>
+    * BUG 10015: Add debugclass for DNS server.
+
+
+o   Alexander Bokovoy <ab at samba.org>
+    * BUG 9779: Add UPN enumeration to passdb internal API.
+
+
+o   Günther Deschner <gd at samba.org>
+    * BUG 10043: Allow to change the default location for Kerberos credential
+      caches.
+    * BUG 10073: net ads join: Fix segmentation fault in
+      create_local_private_krb5_conf_for_domain.
+
+
+o   Volker Lendecke <vl at samba.org>
+    * BUG 10013: smbd: Fix a 100% loop at shutdown time.
+
+
+o   Stefan Metzmacher <metze at samba.org>
+    * BUG 9820: Fix crash of Winbind after "ls -l
+      /usr/local/samba/var/locks/sysvol".
+    * BUG 10003: s3-lib: Fix segmentation fault while reading incomplete
+      session info.
+    * BUG 10015: Fix/improve debug options.
+
+
+o   Christof Schmitt <christof.schmitt at us.ibm.com>
+    * BUG 9970: vfs_streams_xattr: Do not attempt to write empty attribute
+      twice.
+
+
+o   Andreas Schneider <asn at samba.org>
+    * BUG 9994: s3-winbind: Do not delete an existing valid credential cache.
+    * BUG 10073: net ads join: Fix segmentation fault in
+      create_local_private_krb5_conf_for_domain.
+
+
+o   Ralph Wuerthner <ralphw at de.ibm.com>
+    * BUG 10064: Linux kernel oplock breaks can miss signals.
+
+
+######################################################################
+Reporting bugs & Development Discussion
+#######################################
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored.  All bug reports should
+be filed under the Samba 4.0 product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+======================================================================
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+======================================================================
+
+
+Release notes for older releases follow:
+----------------------------------------
+
+                   =============================
                    Release Notes for Samba 4.0.8
                           August 05, 2013
                    =============================
@@ -51,8 +161,8 @@ database (https://bugzilla.samba.org/).
 ======================================================================
 
 
-Release notes for older releases follow:
-----------------------------------------
+----------------------------------------------------------------------
+
 
                    =============================
                    Release Notes for Samba 4.0.7
diff --git a/buildtools/wafsamba/samba_abi.py b/buildtools/wafsamba/samba_abi.py
index 488dab8..76acd00 100644
--- a/buildtools/wafsamba/samba_abi.py
+++ b/buildtools/wafsamba/samba_abi.py
@@ -50,13 +50,15 @@ def parse_sigs(sigs, abi_match):
         sa = s.split(':')
         if abi_match:
             matched = False
+            negative = False
             for p in abi_match:
                 if p[0] == '!' and fnmatch.fnmatch(sa[0], p[1:]):
+                    negative = True
                     break
                 elif fnmatch.fnmatch(sa[0], p):
                     matched = True
                     break
-            if not matched:
+            if (not matched) and negative:
                 continue
         Logs.debug("%s -> %s" % (sa[1], normalise_signature(sa[1])))
         ret[sa[0]] = normalise_signature(sa[1])
diff --git a/docs-xml/manpages/pam_winbind.conf.5.xml b/docs-xml/manpages/pam_winbind.conf.5.xml
index 7098ff4..be7f684 100644
--- a/docs-xml/manpages/pam_winbind.conf.5.xml
+++ b/docs-xml/manpages/pam_winbind.conf.5.xml
@@ -106,16 +106,35 @@
 		<term>krb5_ccache_type = [type]</term>
 		<listitem><para>
 
-		When pam_winbind is configured to try kerberos authentication
-		by enabling the <parameter>krb5_auth</parameter> option, it can
-		store the retrieved Ticket Granting Ticket (TGT) in a
-		credential cache. The type of credential cache can be set with
-		this option. Currently the only supported value is:
-		<parameter>FILE</parameter>. In that case a credential cache in
-		the form of /tmp/krb5cc_UID will be created, where UID is
-		replaced with the numeric user id.  Leave empty to just do
-		kerberos authentication without having a ticket cache after the
-		logon has succeeded. This setting is empty by default.
+		When pam_winbind is configured to try kerberos authentication by
+		enabling the <parameter>krb5_auth</parameter> option, it can
+		store the retrieved Ticket Granting Ticket (TGT) in a credential
+		cache. The type of credential cache can be controlled with this
+		option.  The supported values are: <parameter>FILE</parameter>
+		and <parameter>DIR</parameter> (when the DIR type is supported
+		by the system's Kerberos library). In case of FILE a credential
+		cache in the form of /tmp/krb5cc_UID will be created -  in case
+		of DIR it will be located under the /run/user/UID/krb5cc
+		directory.  UID is replaced with the numeric user id.</para>
+
+		<para>It is also possible to define custom filepaths and use the "%u"
+		pattern in order to substitue the numeric user id.
+		Examples:</para>
+
+		<variablelist>
+			<varlistentry>
+				<term>krb5_ccache_type = DIR:/run/user/%u/krb5cc</term>
+					<listitem><para>This will create a credential cache file in the specified directory.</para></listitem>
+			</varlistentry>
+			<varlistentry>
+				<term>krb5_ccache_type = FILE:/tmp/krb5cc_%u</term>
+					<listitem><para>This will create a credential cache file.</para></listitem>
+			</varlistentry>
+		</variablelist>
+
+		<para> Leave empty to just do kerberos authentication without
+			having a ticket cache after the logon has succeeded.
+			This setting is empty by default.
 
 		</para></listitem>
 		</varlistentry>
diff --git a/examples/pam_winbind/pam_winbind.conf b/examples/pam_winbind/pam_winbind.conf
index dd0b112..87bc388 100644
--- a/examples/pam_winbind/pam_winbind.conf
+++ b/examples/pam_winbind/pam_winbind.conf
@@ -3,6 +3,7 @@
 #
 # /etc/security/pam_winbind.conf
 #
+# For more details see man pam_winbind.conf(5)
 
 [global]
 
@@ -19,7 +20,7 @@
 # authenticate using kerberos
 ;krb5_auth = no
 
-# when using kerberos, request a "FILE" krb5 credential cache type
+# when using kerberos, request a "FILE" or "DIR" krb5 credential cache type
 # (leave empty to just do krb5 authentication but not have a ticket
 # afterwards)
 ;krb5_ccache_type =
diff --git a/file_server/file_server.c b/file_server/file_server.c
index 430782c..43618f5 100644
--- a/file_server/file_server.c
+++ b/file_server/file_server.c
@@ -28,6 +28,7 @@
 #include "source4/smbd/process_model.h"
 #include "file_server/file_server.h"
 #include "dynconfig.h"
+#include "nsswitch/winbind_client.h"
 
 /*
   called if smbd exits
@@ -64,6 +65,8 @@ static void s3fs_task_init(struct task_server *task)
 	smbd_path = talloc_asprintf(task, "%s/smbd", dyn_SBINDIR);
 	smbd_cmd[0] = smbd_path;
 
+	/* the child should be able to call through nss_winbind */
+	(void)winbind_on();
 	/* start it as a child process */
 	subreq = samba_runcmd_send(task, task->event_ctx, timeval_zero(), 1, 0,
 				smbd_cmd,
@@ -71,6 +74,12 @@ static void s3fs_task_init(struct task_server *task)
 				"--foreground",
 				debug_get_output_is_stdout()?"--log-stdout":NULL,
 				NULL);
+	/* the parent should not be able to call through nss_winbind */
+	if (!winbind_off()) {
+		DEBUG(0,("Failed to re-disable recursive winbindd calls after forking smbd\n"));
+		task_server_terminate(task, "Failed to re-disable recursive winbindd calls", true);
+		return;
+	}
 	if (subreq == NULL) {
 		DEBUG(0, ("Failed to start smbd as child daemon\n"));
 		task_server_terminate(task, "Failed to startup s3fs smb task", true);
diff --git a/lib/ldb-samba/ldb_wrap.c b/lib/ldb-samba/ldb_wrap.c
index 028bd6f..65956ef 100644
--- a/lib/ldb-samba/ldb_wrap.c
+++ b/lib/ldb-samba/ldb_wrap.c
@@ -37,6 +37,8 @@
 #include "../lib/util/dlinklist.h"
 #include <tdb.h>
 
+#define DBGC_CLASS DBGC_LDB
+
 /*
   this is used to catch debug messages from ldb
 */
@@ -58,7 +60,7 @@ static void ldb_wrap_debug(void *context, enum ldb_debug_level level,
 		samba_level = 2;
 		break;
 	case LDB_DEBUG_TRACE:
-		samba_level = 5;
+		samba_level = 10;
 		break;
 
 	};
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index b2e4218..aa4589d 100644
--- a/lib/param/loadparm.c
+++ b/lib/param/loadparm.c
@@ -2080,6 +2080,15 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
 
 	lpcfg_do_global_parameter(lp_ctx, "log level", "0");
 
+	lpcfg_do_global_parameter(lp_ctx, "syslog", "1");
+	lpcfg_do_global_parameter(lp_ctx, "syslog only", "No");
+	lpcfg_do_global_parameter(lp_ctx, "debug timestamp", "Yes");
+	lpcfg_do_global_parameter(lp_ctx, "debug prefix timestamp", "No");
+	lpcfg_do_global_parameter(lp_ctx, "debug hires timestamp", "Yes");
+	lpcfg_do_global_parameter(lp_ctx, "debug pid", "No");
+	lpcfg_do_global_parameter(lp_ctx, "debug uid", "No");
+	lpcfg_do_global_parameter(lp_ctx, "debug class", "No");
+
 	lpcfg_do_global_parameter(lp_ctx, "share backend", "classic");
 
 	lpcfg_do_global_parameter(lp_ctx, "server role", "auto");
@@ -2302,7 +2311,14 @@ static bool lpcfg_update(struct loadparm_context *lp_ctx)
 	ZERO_STRUCT(settings);
 	/* Add any more debug-related smb.conf parameters created in
 	 * future here */
-	settings.timestamp_logs = true;
+	settings.syslog = lp_ctx->globals->syslog;
+	settings.syslog_only = lp_ctx->globals->bSyslogOnly;
+	settings.timestamp_logs = lp_ctx->globals->bTimestampLogs;
+	settings.debug_prefix_timestamp = lp_ctx->globals->bDebugPrefixTimestamp;
+	settings.debug_hires_timestamp = lp_ctx->globals->bDebugHiresTimestamp;
+	settings.debug_pid = lp_ctx->globals->bDebugPid;
+	settings.debug_uid = lp_ctx->globals->bDebugUid;
+	settings.debug_class = lp_ctx->globals->bDebugClass;
 	debug_set_settings(&settings);
 
 	/* FIXME: This is a bit of a hack, but we can't use a global, since 
diff --git a/lib/util/debug.c b/lib/util/debug.c
index 7509f90..a46b275 100644
--- a/lib/util/debug.c
+++ b/lib/util/debug.c
@@ -176,6 +176,9 @@ static const char *default_classname_table[] = {
 	"msdfs",	     /* DBGC_MSDFS	  */
 	"dmapi",	     /* DBGC_DMAPI	  */
 	"registry",          /* DBGC_REGISTRY     */
+	"scavenger",         /* DBGC_SCAVENGER    */
+	"dns",               /* DBGC_DNS          */
+	"ldb",               /* DBGC_LDB          */
 	NULL
 };
 
diff --git a/lib/util/debug.h b/lib/util/debug.h
index 2566418..bd7056e 100644
--- a/lib/util/debug.h
+++ b/lib/util/debug.h
@@ -79,9 +79,12 @@ bool dbghdr( int level, const char *location, const char *func);
 #define DBGC_MSDFS		17
 #define DBGC_DMAPI		18
 #define DBGC_REGISTRY		19
+#define DBGC_SCAVENGER		20
+#define DBGC_DNS		21
+#define DBGC_LDB		22
 
 /* Always ensure this is updated when new fixed classes area added, to ensure the array in debug.c is the right size */
-#define DBGC_MAX_FIXED		19
+#define DBGC_MAX_FIXED		22
 
 /* So you can define DBGC_CLASS before including debug.h */
 #ifndef DBGC_CLASS
diff --git a/source3/lib/version_test.c b/lib/util/util_process.c
similarity index 68%
copy from source3/lib/version_test.c
copy to lib/util/util_process.c
index 880cfeb..6036e27 100644
--- a/source3/lib/version_test.c
+++ b/lib/util/util_process.c
@@ -1,7 +1,9 @@
 /*
  *  Unix SMB/CIFS implementation.
- *  version_test - test program for samba_version_strion()
- *  Copyright (C) Michael Adam 2009
+ *
+ *  Process utils.
+ *
+ *  Copyright (c) 2013      Andreas Schneider <asn at samba.org>
  *
  *  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
@@ -17,10 +19,16 @@
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "includes.h"
+#include "util_process.h"
+
+#ifdef HAVE_SYS_PRCTL_H
+#include <sys/prctl.h>
+#endif
 
-int main(void)
+int prctl_set_comment(const char *comment)
 {
-	printf("%s\n", samba_version_string());
+#if defined(HAVE_PRCTL) && defined(PR_SET_NAME)
+	return prctl(PR_SET_NAME, (unsigned long) comment, 0, 0, 0);
+#endif
 	return 0;
 }
diff --git a/lib/smbconf/smbconf_txt.h b/lib/util/util_process.h
similarity index 62%
copy from lib/smbconf/smbconf_txt.h
copy to lib/util/util_process.h
index 72d6207..6e1ef07 100644
--- a/lib/smbconf/smbconf_txt.h
+++ b/lib/util/util_process.h
@@ -1,7 +1,9 @@
 /*
  *  Unix SMB/CIFS implementation.
- *  libsmbconf - Samba configuration library
- *  Copyright (C) Michael Adam 2009
+ *
+ *  Process utils.
+ *
+ *  Copyright (c) 2013      Andreas Schneider <asn at samba.org>
  *
  *  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
@@ -17,17 +19,17 @@
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef __LIBSMBCONF_TXT_H__
-#define __LIBSMBCONF_TXT_H__
-
-struct smbconf_ctx;
+#ifndef _SAMBA_UTIL_PROCESS_H
+#define _SAMBA_UTIL_PROCESS_H
 
 /**
- * initialization functions for the text/file backend modules
+ * @brief Set the process comment name.
+ *
+ * @param[in]  comment  The comment to set which shouldn't be longer than 16
+ *                      16 characters (including \0).
+ *
+ * @return              -1 on error, 0 on success.
  */
+int prctl_set_comment(const char *comment);
 
-sbcErr smbconf_init_txt(TALLOC_CTX *mem_ctx,
-			struct smbconf_ctx **conf_ctx,
-			const char *path);
-
-#endif /*  _LIBSMBCONF_TXT_H_  */
+#endif
diff --git a/lib/util/wscript_build b/lib/util/wscript_build
index ddaf90f..27c9ec7 100755
--- a/lib/util/wscript_build
+++ b/lib/util/wscript_build
@@ -7,7 +7,8 @@ bld.SAMBA_LIBRARY('samba-util',
                     signal.c system.c params.c util.c util_id.c util_net.c
                     util_strlist.c util_paths.c idtree.c debug.c fault.c base64.c
                     util_str.c util_str_common.c substitute.c ms_fnmatch.c
-                    server_id.c dprintf.c parmlist.c bitmap.c pidfile.c''',
+                    server_id.c dprintf.c parmlist.c bitmap.c pidfile.c
+                    util_process.c''',
                   deps='DYNCONFIG',
                   public_deps='talloc execinfo uid_wrapper pthread LIBCRYPTO charset util_setid',
                   public_headers='debug.h attr.h byteorder.h data_blob.h memory.h safe_string.h time.h talloc_stack.h xfile.h dlinklist.h samba_util.h string_wrappers.h',
diff --git a/libcli/util/errormap.c b/libcli/util/errormap.c
index 714e62c..3870619 100644
--- a/libcli/util/errormap.c
+++ b/libcli/util/errormap.c
@@ -54,6 +54,7 @@ static const struct {
  */
 	{ERRDOS,	ERRmoredata,	STATUS_BUFFER_OVERFLOW},
 	{ERRDOS,	ERRnofiles,	STATUS_NO_MORE_FILES},
+	{ERRDOS,	ERRbadfile,	STATUS_INVALID_EA_NAME},
 	{ERRDOS,	ERRnofiles,	NT_STATUS_NO_MORE_ENTRIES},
 	{ERRDOS,	ERRgeneral,	NT_STATUS_UNSUCCESSFUL},
 	{ERRDOS,	ERRbadfunc,	NT_STATUS_NOT_IMPLEMENTED},
diff --git a/librpc/idl/security.idl b/librpc/idl/security.idl
index 33085c4..4f0e900 100644
--- a/librpc/idl/security.idl
+++ b/librpc/idl/security.idl
@@ -600,6 +600,9 @@ interface security
 		SECINFO_DACL                 = 0x00000004,
 		SECINFO_SACL                 = 0x00000008,
 		SECINFO_LABEL                = 0x00000010,
+		SECINFO_ATTRIBUTE	     = 0x00000020,
+		SECINFO_SCOPE                = 0x00000040,
+		SECINFO_BACKUP		     = 0x00010000,
 		SECINFO_UNPROTECTED_SACL     = 0x10000000,
 		SECINFO_UNPROTECTED_DACL     = 0x20000000,
 		SECINFO_PROTECTED_SACL	     = 0x40000000,
diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index 762382c..abe4844 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -2071,6 +2071,7 @@ int main(int argc, char **argv, char **envp)
 	bool use_lanman = false;
 	char *logoff_user = getenv("USER");
 	int logoff_uid = geteuid();
+	const char *opt_krb5ccname = "FILE";
 
 	struct poptOption long_options[] = {
 		POPT_AUTOHELP
@@ -2152,6 +2153,7 @@ int main(int argc, char **argv, char **envp)
 		{ "krb5auth", 'K', POPT_ARG_STRING, &string_arg, 'K', "authenticate user using Kerberos", "user%password" },
 			/* destroys wbinfo --help output */


-- 
Samba Shared Repository


More information about the samba-cvs mailing list