Rev 5382: merge from upstream in
http://samba.sernet.de/ma/bzr/SAMBA_3_0-registry.bzr/
Michael Adam
ma at sernet.de
Wed Jun 20 08:49:47 GMT 2007
At http://samba.sernet.de/ma/bzr/SAMBA_3_0-registry.bzr/
------------------------------------------------------------
revno: 5382
revision-id: ma at sernet.de-20070620084939-3tnfwiq5o8uicrf4
parent: ma at sernet.de-20070619095401-4h1nq927seojlqmt
parent: jra at samba.org-20070620013143-3sumaujvv7mri3po
committer: Michael Adam <ma at sernet.de>
branch nick: SAMBA_3_0-registry.bzr
timestamp: Wed 2007-06-20 10:49:39 +0200
message:
merge from upstream
modified:
REVISION REVISION-20060530022625-68239662668b41c3
source/lib/errmap_unix.c errmap_unix.c-20070529202201-h7olgulww7h3tzz1-1
source/param/loadparm.c loadparm.c-20060530022627-1efa1edb3eb0e897
source/utils/net_conf.c net_conf.c-20070409110216-64p0zt0mes4j6yoe-1
------------------------------------------------------------
revno: 5275.1.899
merged: jra at samba.org-20070620013143-3sumaujvv7mri3po
parent: obnox at samba.org-20070619214619-l3rwrt1urx2ktvv1
committer: jra at samba.org
branch nick: SAMBA_3_0.bzr
timestamp: Tue 2007-06-19 20:31:43 -0500
message:
jra at samba.org (r23550) 2007-06-19 20:26:18 -0500 (Tue, 19 Jun 2007)
Add more UNIX error -> NT status mappings.
Jeremy.
------------------------------------------------------------
revno: 5275.1.898
merged: obnox at samba.org-20070619214619-l3rwrt1urx2ktvv1
parent: obnox at samba.org-20070619211557-a944onvd0qjxw15i
committer: obnox at samba.org
branch nick: SAMBA_3_0.bzr
timestamp: Tue 2007-06-19 16:46:19 -0500
message:
obnox at samba.org (r23549) 2007-06-19 16:40:27 -0500 (Tue, 19 Jun 2007)
Make "net conf setparm" always use registry data type "sz".
This simplifies the usage of this command from
"net conf setparm <section> <param> <type> <value>"
to
"net conf setparm <section> <param> <value>".
Micheal
------------------------------------------------------------
revno: 5275.1.897
merged: obnox at samba.org-20070619211557-a944onvd0qjxw15i
parent: obnox at samba.org-20070619211553-keb4z21va0bmvk9n
committer: obnox at samba.org
branch nick: SAMBA_3_0.bzr
timestamp: Tue 2007-06-19 16:15:57 -0500
message:
obnox at samba.org (r23548) 2007-06-19 16:08:46 -0500 (Tue, 19 Jun 2007)
Fix comments.
Michael
------------------------------------------------------------
revno: 5275.1.896
merged: obnox at samba.org-20070619211553-keb4z21va0bmvk9n
parent: obnox at samba.org-20070619111604-ze82g2i347tpwt7m
committer: obnox at samba.org
branch nick: SAMBA_3_0.bzr
timestamp: Tue 2007-06-19 16:15:53 -0500
message:
obnox at samba.org (r23547) 2007-06-19 16:06:31 -0500 (Tue, 19 Jun 2007)
Ignore parameter "include" in regsitry globals.
Michael
------------------------------------------------------------
revno: 5275.1.895
merged: obnox at samba.org-20070619111604-ze82g2i347tpwt7m
parent: jpeach at samba.org-20070618161516-tu4uk4na2br24sq0
committer: obnox at samba.org
branch nick: SAMBA_3_0.bzr
timestamp: Tue 2007-06-19 06:16:04 -0500
message:
obnox at samba.org (r23543) 2007-06-19 06:11:01 -0500 (Tue, 19 Jun 2007)
Adjust comments.
=== modified file 'REVISION'
--- a/REVISION 2007-06-18 16:15:16 +0000
+++ b/REVISION 2007-06-20 01:31:43 +0000
@@ -2,9 +2,9 @@
URL: file:///home/drizzt/jerry/src/svn/samba/branches/SAMBA_3_0
Repository Root: file:///home/drizzt/jerry/src/svn/samba
Repository UUID: 0c0555d6-39d7-0310-84fc-f1cc0bd64818
-Revision: 23541
+Revision: 23550
Node Kind: directory
-Last Changed Author: jpeach
-Last Changed Rev: 23541
-Last Changed Date: 2007-06-18 11:10:00 -0500 (Mon, 18 Jun 2007)
+Last Changed Author: jra
+Last Changed Rev: 23550
+Last Changed Date: 2007-06-19 20:26:18 -0500 (Tue, 19 Jun 2007)
=== modified file 'source/lib/errmap_unix.c'
--- a/source/lib/errmap_unix.c 2007-05-29 20:22:03 +0000
+++ b/source/lib/errmap_unix.c 2007-06-20 01:31:43 +0000
@@ -63,9 +63,34 @@
{ ENOBUFS, ERRDOS, ERRnomem, NT_STATUS_INSUFFICIENT_RESOURCES },
#endif
{ EAGAIN, ERRDOS, 111, NT_STATUS_NETWORK_BUSY },
+#ifdef EADDRINUSE
+ { EADDRINUSE, ERRDOS, 52, NT_STATUS_ADDRESS_ALREADY_ASSOCIATED},
+#endif
+#ifdef ENETUNREACH
+ { ENETUNREACH, ERRHRD, ERRgeneral, NT_STATUS_NETWORK_UNREACHABLE},
+#endif
+#ifdef EHOSTUNREACH
+ { EHOSTUNREACH, ERRHRD, ERRgeneral, NT_STATUS_HOST_UNREACHABLE},
+#endif
+#ifdef ECONNREFUSED
+ { ECONNREFUSED, ERRHRD, ERRgeneral, NT_STATUS_CONNECTION_REFUSED},
+#endif
+#ifdef ETIMEDOUT
+ { ETIMEDOUT, ERRHRD, 121, NT_STATUS_IO_TIMEOUT},
+#endif
+#ifdef ECONNABORTED
+ { ECONNABORTED, ERRHRD, ERRgeneral, NT_STATUS_CONNECTION_ABORTED},
+#endif
+#ifdef ENODEV
+ { ENODEV, ERRDOS, 55, NT_STATUS_DEVICE_DOES_NOT_EXIST},
+#endif
+#ifdef EPIPE
+ { EPIPE, ERRDOS, 109, NT_STATUS_PIPE_BROKEN},
+#endif
#ifdef EWOULDBLOCK
{ EWOULDBLOCK, ERRDOS, 111, NT_STATUS_NETWORK_BUSY },
#endif
+
{ 0, 0, 0, NT_STATUS_OK }
};
=== modified file 'source/param/loadparm.c'
--- a/source/param/loadparm.c 2007-06-19 09:54:01 +0000
+++ b/source/param/loadparm.c 2007-06-20 08:49:39 +0000
@@ -3136,7 +3136,7 @@
KEY_SMBCONF, GLOBAL_NAME);
normalize_dbkey(keystr);
- DEBUG(10, ("process_registry_shares: fetching key '%s'\n",
+ DEBUG(10, ("process_registry_globals: fetching key '%s'\n",
keystr));
data = tdb_fetch_bystring(reg_tdb->tdb, keystr);
@@ -3150,7 +3150,7 @@
/* unpack number of values */
len = tdb_unpack(buf, buflen, "d", &num_values);
- DEBUG(10, ("process_registry_shares: got %d values from tdb\n",
+ DEBUG(10, ("process_registry_globals: got %d values from tdb\n",
num_values));
/* unpack the values */
@@ -3163,7 +3163,12 @@
&type,
&size,
&data_p);
- DEBUG(10, ("process_registry_shares: got value '%s'\n",
+ if (strcmp(valname,"include")) {
+ DEBUG(10, ("process_registry_globals: Ignoring "
+ "parameter 'include' in registry.\n"));
+ continue;
+ }
+ DEBUG(10, ("process_registry_globals: got value '%s'\n",
valname));
if (size && data_p) {
err = registry_pull_value(reg_tdb,
=== modified file 'source/utils/net_conf.c'
--- a/source/utils/net_conf.c 2007-06-19 09:54:01 +0000
+++ b/source/utils/net_conf.c 2007-06-20 08:49:39 +0000
@@ -20,19 +20,9 @@
*/
/*
- * This currently only an interface to the configuration
- * stored inside the samba registry. In the future there
- * might be support for other configuration backends as well.
- */
-
-/*
- * TODO:
- *
- * - check uid 0 for write operations
- * - check for valid parameter names and types (loadparm...) ???
- * - check for correctness of shares (service_ok) ?
- * - refactor to use _internal functions for pieces of code
- *
+ * This is an interface to the configuration stored inside the
+ * samba registry. In the future there might be support for other
+ * configuration backends as well.
*/
#include "includes.h"
@@ -92,8 +82,7 @@
static int net_conf_setparm_usage(int argc, const char **argv)
{
- d_printf("USAGE: net conf setparm <section> <param> <type> <value>\n"
- "\t(Supported types are 'dword' and 'sz' by now.)\n");
+ d_printf("USAGE: net conf setparm <section> <param> <value>\n");
return -1;
}
@@ -928,20 +917,18 @@
struct registry_key *key = NULL;
char *service = NULL;
char *param = NULL;
- char *type = NULL;
const char *value_str = NULL;
TALLOC_CTX *ctx;
ctx = talloc_init("setparm");
- if (argc != 4) {
+ if (argc != 3) {
net_conf_setparm_usage(argc, argv);
goto done;
}
service = strdup_lower(argv[0]);
param = strdup_lower(argv[1]);
- type = strdup_lower(argv[2]);
- value_str = argv[3];
+ value_str = argv[2];
if (!smbconf_key_exists(ctx, service)) {
werr = reg_createkey_internal(ctx, service, &key);
@@ -953,7 +940,7 @@
goto done;
}
- werr = reg_setvalue_internal(key, param, type, value_str);
+ werr = reg_setvalue_internal(key, param, "sz", value_str);
if (!W_ERROR_IS_OK(werr)) {
d_fprintf(stderr, "Error setting value '%s': %s\n",
param, dos_errstr(werr));
More information about the samba-cvs
mailing list