[SCM] Samba Shared Repository - branch master updated -
release-4-0-0alpha7-1579-g7403dd3
Günther Deschner
gd at samba.org
Tue May 12 23:57:29 GMT 2009
The branch, master has been updated
via 7403dd39d608e07f107530819277738ebd20a320 (commit)
via a4f558da79e5746124b79583ca608b394e635ad3 (commit)
via b716e57bef3b42c4be24b5d41c05dbc0665f5191 (commit)
via c07f4a1299700cf6d530aee390972d3324ba0566 (commit)
via 6154b031f4521fad4b5c460643da59dd918b240a (commit)
from aa71ab6d1d4ee6ef4f868b3b8c1b9b6df8cfcb04 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 7403dd39d608e07f107530819277738ebd20a320
Author: Günther Deschner <gd at samba.org>
Date: Tue May 12 14:12:31 2009 +0200
s3-spoolss: move SPL_ARCH_X defines to IDL.
Guenther
commit a4f558da79e5746124b79583ca608b394e635ad3
Author: Günther Deschner <gd at samba.org>
Date: Tue May 12 14:11:03 2009 +0200
spoolss: add SPOOLSS_ARCHITECTURE_ALL to IDL.
Guenther
commit b716e57bef3b42c4be24b5d41c05dbc0665f5191
Author: Günther Deschner <gd at samba.org>
Date: Wed May 13 01:38:06 2009 +0200
s3-build: re-run make samba3-idl.
Guenther
commit c07f4a1299700cf6d530aee390972d3324ba0566
Author: Günther Deschner <gd at samba.org>
Date: Wed May 13 01:37:30 2009 +0200
initshutdown: add shutdown reason codes.
Guenther
commit 6154b031f4521fad4b5c460643da59dd918b240a
Author: Günther Deschner <gd at samba.org>
Date: Tue May 12 22:46:36 2009 +0200
s3-netdomjoin-gui: prepare to call out for NetRenameMachineInDomain() to rename computers
in domains.
Guenther
-----------------------------------------------------------------------
Summary of changes:
librpc/gen_ndr/initshutdown.h | 92 ++++++++++++++++++++
librpc/gen_ndr/spoolss.h | 8 ++
librpc/idl/initshutdown.idl | 46 ++++++++++
librpc/idl/spoolss.idl | 10 ++
.../examples/netdomjoin-gui/netdomjoin-gui.c | 49 ++++++++++-
source3/printing/nt_printing.c | 8 --
6 files changed, 204 insertions(+), 9 deletions(-)
Changeset truncated at 500 lines:
diff --git a/librpc/gen_ndr/initshutdown.h b/librpc/gen_ndr/initshutdown.h
index 913eb8f..d9b89ad 100644
--- a/librpc/gen_ndr/initshutdown.h
+++ b/librpc/gen_ndr/initshutdown.h
@@ -8,6 +8,98 @@
#ifndef _HEADER_initshutdown
#define _HEADER_initshutdown
+enum initshutdown_ReasonMajor
+#ifndef USE_UINT_ENUMS
+ {
+ SHTDN_REASON_MAJOR_OTHER=0x00000000,
+ SHTDN_REASON_MAJOR_HARDWARE=0x00010000,
+ SHTDN_REASON_MAJOR_OPERATINGSYSTEM=0x00020000,
+ SHTDN_REASON_MAJOR_SOFTWARE=0x00030000,
+ SHTDN_REASON_MAJOR_APPLICATION=0x00040000,
+ SHTDN_REASON_MAJOR_SYSTEM=0x00050000,
+ SHTDN_REASON_MAJOR_POWER=0x00060000,
+ SHTDN_REASON_MAJOR_LEGACY_API=0x00070000
+}
+#else
+ { __donnot_use_enum_initshutdown_ReasonMajor=0x7FFFFFFF}
+#define SHTDN_REASON_MAJOR_OTHER ( 0x00000000 )
+#define SHTDN_REASON_MAJOR_HARDWARE ( 0x00010000 )
+#define SHTDN_REASON_MAJOR_OPERATINGSYSTEM ( 0x00020000 )
+#define SHTDN_REASON_MAJOR_SOFTWARE ( 0x00030000 )
+#define SHTDN_REASON_MAJOR_APPLICATION ( 0x00040000 )
+#define SHTDN_REASON_MAJOR_SYSTEM ( 0x00050000 )
+#define SHTDN_REASON_MAJOR_POWER ( 0x00060000 )
+#define SHTDN_REASON_MAJOR_LEGACY_API ( 0x00070000 )
+#endif
+;
+
+enum initshutdown_ReasonMinor
+#ifndef USE_UINT_ENUMS
+ {
+ SHTDN_REASON_MINOR_OTHER=0x00000000,
+ SHTDN_REASON_MINOR_MAINTENANCE=0x00000001,
+ SHTDN_REASON_MINOR_INSTALLATION=0x00000002,
+ SHTDN_REASON_MINOR_UPGRADE=0x00000003,
+ SHTDN_REASON_MINOR_RECONFIG=0x00000004,
+ SHTDN_REASON_MINOR_HUNG=0x00000005,
+ SHTDN_REASON_MINOR_UNSTABLE=0x00000006,
+ SHTDN_REASON_MINOR_DISK=0x00000007,
+ SHTDN_REASON_MINOR_PROCESSOR=0x00000008,
+ SHTDN_REASON_MINOR_NETWORKCARD=0x00000009,
+ SHTDN_REASON_MINOR_POWER_SUPPLY=0x0000000a,
+ SHTDN_REASON_MINOR_CORDUNPLUGGED=0x0000000b,
+ SHTDN_REASON_MINOR_ENVIRONMENT=0x0000000c,
+ SHTDN_REASON_MINOR_HARDWARE_DRIVER=0x0000000d,
+ SHTDN_REASON_MINOR_OTHERDRIVER=0x0000000e,
+ SHTDN_REASON_MINOR_BLUESCREEN=0x0000000f,
+ SHTDN_REASON_MINOR_SERVICEPACK=0x00000010,
+ SHTDN_REASON_MINOR_HOTFIX=0x00000011,
+ SHTDN_REASON_MINOR_SECURITYFIX=0x00000012,
+ SHTDN_REASON_MINOR_SECURITY=0x00000013,
+ SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY=0x00000014,
+ SHTDN_REASON_MINOR_WMI=0x00000015,
+ SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL=0x00000016,
+ SHTDN_REASON_MINOR_HOTFIX_UNINSTALL=0x00000017,
+ SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL=0x00000018,
+ SHTDN_REASON_MINOR_MMC=0x00000019,
+ SHTDN_REASON_MINOR_TERMSRV=0x00000020
+}
+#else
+ { __donnot_use_enum_initshutdown_ReasonMinor=0x7FFFFFFF}
+#define SHTDN_REASON_MINOR_OTHER ( 0x00000000 )
+#define SHTDN_REASON_MINOR_MAINTENANCE ( 0x00000001 )
+#define SHTDN_REASON_MINOR_INSTALLATION ( 0x00000002 )
+#define SHTDN_REASON_MINOR_UPGRADE ( 0x00000003 )
+#define SHTDN_REASON_MINOR_RECONFIG ( 0x00000004 )
+#define SHTDN_REASON_MINOR_HUNG ( 0x00000005 )
+#define SHTDN_REASON_MINOR_UNSTABLE ( 0x00000006 )
+#define SHTDN_REASON_MINOR_DISK ( 0x00000007 )
+#define SHTDN_REASON_MINOR_PROCESSOR ( 0x00000008 )
+#define SHTDN_REASON_MINOR_NETWORKCARD ( 0x00000009 )
+#define SHTDN_REASON_MINOR_POWER_SUPPLY ( 0x0000000a )
+#define SHTDN_REASON_MINOR_CORDUNPLUGGED ( 0x0000000b )
+#define SHTDN_REASON_MINOR_ENVIRONMENT ( 0x0000000c )
+#define SHTDN_REASON_MINOR_HARDWARE_DRIVER ( 0x0000000d )
+#define SHTDN_REASON_MINOR_OTHERDRIVER ( 0x0000000e )
+#define SHTDN_REASON_MINOR_BLUESCREEN ( 0x0000000f )
+#define SHTDN_REASON_MINOR_SERVICEPACK ( 0x00000010 )
+#define SHTDN_REASON_MINOR_HOTFIX ( 0x00000011 )
+#define SHTDN_REASON_MINOR_SECURITYFIX ( 0x00000012 )
+#define SHTDN_REASON_MINOR_SECURITY ( 0x00000013 )
+#define SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY ( 0x00000014 )
+#define SHTDN_REASON_MINOR_WMI ( 0x00000015 )
+#define SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL ( 0x00000016 )
+#define SHTDN_REASON_MINOR_HOTFIX_UNINSTALL ( 0x00000017 )
+#define SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL ( 0x00000018 )
+#define SHTDN_REASON_MINOR_MMC ( 0x00000019 )
+#define SHTDN_REASON_MINOR_TERMSRV ( 0x00000020 )
+#endif
+;
+
+/* bitmap initshutdown_ReasonFlags */
+#define SHTDN_REASON_FLAG_USER_DEFINED ( 0x40000000 )
+#define SHTDN_REASON_FLAG_PLANNED ( 0x80000000 )
+
struct initshutdown_Init {
struct {
diff --git a/librpc/gen_ndr/spoolss.h b/librpc/gen_ndr/spoolss.h
index abd8300..a9f7aaf 100644
--- a/librpc/gen_ndr/spoolss.h
+++ b/librpc/gen_ndr/spoolss.h
@@ -13,6 +13,14 @@
#define PRINTER_STATUS_OK ( 0x00000000 )
#define JOB_STATUS_QUEUED ( 0x0000 )
#define PRINTER_ENUM_ICONMASK ( (PRINTER_ENUM_ICON1|PRINTER_ENUM_ICON2|PRINTER_ENUM_ICON3|PRINTER_ENUM_ICON4|PRINTER_ENUM_ICON5|PRINTER_ENUM_ICON6|PRINTER_ENUM_ICON7|PRINTER_ENUM_ICON8) )
+#define SPL_ARCH_WIN40 ( "WIN40" )
+#define SPL_ARCH_W32X86 ( "W32X86" )
+#define SPL_ARCH_W32MIPS ( "W32MIPS" )
+#define SPL_ARCH_W32ALPHA ( "W32ALPHA" )
+#define SPL_ARCH_W32PPC ( "W32PPC" )
+#define SPL_ARCH_IA64 ( "IA64" )
+#define SPL_ARCH_X64 ( "x64" )
+#define SPOOLSS_ARCHITECTURE_ALL ( "all" )
#define SPOOLSS_ARCHITECTURE_NT_X86 ( "Windows NT x86" )
#define SPOOLSS_DEFAULT_SERVER_PATH ( "C:\\WINDOWS\\system32\\spool" )
#define SPL_LOCAL_PORT ( "Local Port" )
diff --git a/librpc/idl/initshutdown.idl b/librpc/idl/initshutdown.idl
index 02b2501..13a1362 100644
--- a/librpc/idl/initshutdown.idl
+++ b/librpc/idl/initshutdown.idl
@@ -14,6 +14,52 @@ import "lsa.idl";
helpstring("Init shutdown service")
] interface initshutdown
{
+ typedef [v1_enum] enum {
+ SHTDN_REASON_MAJOR_OTHER = 0x00000000,
+ SHTDN_REASON_MAJOR_HARDWARE = 0x00010000,
+ SHTDN_REASON_MAJOR_OPERATINGSYSTEM = 0x00020000,
+ SHTDN_REASON_MAJOR_SOFTWARE = 0x00030000,
+ SHTDN_REASON_MAJOR_APPLICATION = 0x00040000,
+ SHTDN_REASON_MAJOR_SYSTEM = 0x00050000,
+ SHTDN_REASON_MAJOR_POWER = 0x00060000,
+ SHTDN_REASON_MAJOR_LEGACY_API = 0x00070000
+ } initshutdown_ReasonMajor;
+
+ typedef [v1_enum] enum {
+ SHTDN_REASON_MINOR_OTHER = 0x00000000,
+ SHTDN_REASON_MINOR_MAINTENANCE = 0x00000001,
+ SHTDN_REASON_MINOR_INSTALLATION = 0x00000002,
+ SHTDN_REASON_MINOR_UPGRADE = 0x00000003,
+ SHTDN_REASON_MINOR_RECONFIG = 0x00000004,
+ SHTDN_REASON_MINOR_HUNG = 0x00000005,
+ SHTDN_REASON_MINOR_UNSTABLE = 0x00000006,
+ SHTDN_REASON_MINOR_DISK = 0x00000007,
+ SHTDN_REASON_MINOR_PROCESSOR = 0x00000008,
+ SHTDN_REASON_MINOR_NETWORKCARD = 0x00000009,
+ SHTDN_REASON_MINOR_POWER_SUPPLY = 0x0000000a,
+ SHTDN_REASON_MINOR_CORDUNPLUGGED = 0x0000000b,
+ SHTDN_REASON_MINOR_ENVIRONMENT = 0x0000000c,
+ SHTDN_REASON_MINOR_HARDWARE_DRIVER = 0x0000000d,
+ SHTDN_REASON_MINOR_OTHERDRIVER = 0x0000000e,
+ SHTDN_REASON_MINOR_BLUESCREEN = 0x0000000f,
+ SHTDN_REASON_MINOR_SERVICEPACK = 0x00000010,
+ SHTDN_REASON_MINOR_HOTFIX = 0x00000011,
+ SHTDN_REASON_MINOR_SECURITYFIX = 0x00000012,
+ SHTDN_REASON_MINOR_SECURITY = 0x00000013,
+ SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY = 0x00000014,
+ SHTDN_REASON_MINOR_WMI = 0x00000015,
+ SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL= 0x00000016,
+ SHTDN_REASON_MINOR_HOTFIX_UNINSTALL = 0x00000017,
+ SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL= 0x00000018,
+ SHTDN_REASON_MINOR_MMC = 0x00000019,
+ SHTDN_REASON_MINOR_TERMSRV = 0x00000020
+ } initshutdown_ReasonMinor;
+
+ typedef [bitmap32bit] bitmap {
+ SHTDN_REASON_FLAG_USER_DEFINED = 0x40000000,
+ SHTDN_REASON_FLAG_PLANNED = 0x80000000
+ } initshutdown_ReasonFlags;
+
WERROR initshutdown_Init(
[in,unique] uint16 *hostname,
/*
diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl
index 5b9f551..f306462 100644
--- a/librpc/idl/spoolss.idl
+++ b/librpc/idl/spoolss.idl
@@ -1283,6 +1283,16 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x1a */
+
+ const string SPL_ARCH_WIN40 = "WIN40";
+ const string SPL_ARCH_W32X86 = "W32X86";
+ const string SPL_ARCH_W32MIPS = "W32MIPS";
+ const string SPL_ARCH_W32ALPHA = "W32ALPHA";
+ const string SPL_ARCH_W32PPC = "W32PPC";
+ const string SPL_ARCH_IA64 = "IA64";
+ const string SPL_ARCH_X64 = "x64";
+
+ const string SPOOLSS_ARCHITECTURE_ALL = "all";
const string SPOOLSS_ARCHITECTURE_NT_X86 = "Windows NT x86";
const string SPOOLSS_DEFAULT_SERVER_PATH = "C:\\WINDOWS\\system32\\spool";
diff --git a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
index 7652b45..66e9572 100644
--- a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
+++ b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
@@ -81,6 +81,12 @@ typedef struct join_state {
uid_t uid;
} join_state;
+static void callback_creds_prompt(GtkWidget *widget,
+ gpointer data,
+ const char *label_string,
+ gpointer cont_fn);
+
+
static void debug(const char *format, ...)
{
va_list args;
@@ -459,9 +465,50 @@ static void callback_do_hostname_change(GtkWidget *widget,
struct join_state *state = (struct join_state *)data;
switch (state->name_type_initial) {
- case NetSetupDomainName:
+ case NetSetupDomainName: {
+#if 0
+ NET_API_STATUS status;
+ const char *newname;
+ char *p = NULL;
+
+ newname = strdup(gtk_label_get_text(GTK_LABEL(state->label_full_computer_name)));
+ if (!newname) {
+ return;
+ }
+
+ p = strchr(newname, '.');
+ if (p) {
+ *p = NULL;
+ }
+
+ if (!state->account || !state->password) {
+ debug("callback_do_hostname_change: no creds yet\n");
+ callback_creds_prompt(NULL, state,
+ "Enter the name and password of an account with permission to change a computer name in a the domain.",
+ callback_do_storeauth_and_continue);
+ }
+
+ if (!state->account || !state->password) {
+ debug("callback_do_hostname_change: still no creds???\n");
+ return;
+ }
+
+ status = NetRenameMachineInDomain(state->target_hostname,
+ newname,
+ state->account,
+ state->password,
+ NETSETUP_ACCT_CREATE);
+ SAFE_FREE(newname);
+ /* we renamed the machine in the domain */
+ if (status == 0) {
+ return;
+ }
+ str = libnetapi_get_error_string(state->ctx, status);
+#else
str = "To be implemented: call NetRenameMachineInDomain\n";
+#endif
break;
+ }
case NetSetupWorkgroupName:
str = "To be implemented: call SetComputerNameEx\n";
break;
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index b6e7032..17e3d40 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -210,14 +210,6 @@ struct table_node {
int version;
};
-#define SPL_ARCH_WIN40 "WIN40"
-#define SPL_ARCH_W32X86 "W32X86"
-#define SPL_ARCH_W32MIPS "W32MIPS"
-#define SPL_ARCH_W32ALPHA "W32ALPHA"
-#define SPL_ARCH_W32PPC "W32PPC"
-#define SPL_ARCH_IA64 "IA64"
-#define SPL_ARCH_X64 "x64"
-
static const struct table_node archi_table[]= {
{"Windows 4.0", SPL_ARCH_WIN40, 0 },
--
Samba Shared Repository
More information about the samba-cvs
mailing list