samba-cvs.cvs
[Top] [All Lists]

[SCM] Samba Shared Repository - branch master updated - ba0facd688d2b0d8

Subject: [SCM] Samba Shared Repository - branch master updated - ba0facd688d2b0d864364031a373abea73e9154f
From: Stefan Metzmacher
Date: Sat, 6 Dec 2008 07:28:18 -0600 CST
The branch, master has been updated
       via  ba0facd688d2b0d864364031a373abea73e9154f (commit)
      from  f9172a2af558262a6993059114813daf24c9e173 (commit)

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


- Log -----------------------------------------------------------------
commit ba0facd688d2b0d864364031a373abea73e9154f
Author: Stefan Metzmacher <metze@xxxxxxxxx>
Date:   Fri Dec 5 16:53:44 2008 +0100

    s4:winbind: move setting up the primary_sid into a new function 
wbsrv_setup_domains()
    
    metze

-----------------------------------------------------------------------

Summary of changes:
 source4/winbind/config.mk                          |    1 +
 source4/winbind/wb_server.c                        |   10 ++----
 .../registry/wine.c => winbind/wb_setup_domains.c} |   37 +++++++++-----------
 3 files changed, 21 insertions(+), 27 deletions(-)
 copy source4/{lib/registry/wine.c => winbind/wb_setup_domains.c} (56%)


Changeset truncated at 500 lines:

diff --git a/source4/winbind/config.mk b/source4/winbind/config.mk
index f719f00..865ff90 100644
--- a/source4/winbind/config.mk
+++ b/source4/winbind/config.mk
@@ -20,6 +20,7 @@ PRIVATE_DEPENDENCIES = \
 
 WINBIND_OBJ_FILES = $(addprefix $(winbindsrcdir)/, \
                wb_server.o \
+               wb_setup_domains.o \
                wb_irpc.o \
                wb_samba3_protocol.o \
                wb_samba3_cmd.o \
diff --git a/source4/winbind/wb_server.c b/source4/winbind/wb_server.c
index b830959..9ffcd46 100644
--- a/source4/winbind/wb_server.c
+++ b/source4/winbind/wb_server.c
@@ -147,13 +147,9 @@ static void winbind_task_init(struct task_server *task)
        if (!service) goto nomem;
        service->task   = task;
 
-       service->primary_sid = secrets_get_domain_sid(service,
-                                                     task->event_ctx,
-                                                     task->lp_ctx,
-                                                     
lp_workgroup(task->lp_ctx));
-       if (service->primary_sid == NULL) {
-               task_server_terminate(
-                       task, nt_errstr(NT_STATUS_CANT_ACCESS_DOMAIN_INFO));
+       status = wbsrv_setup_domains(service);
+       if (!NT_STATUS_IS_OK(status)) {
+               task_server_terminate(task, nt_errstr(status));
                return;
        }
 
diff --git a/source4/lib/registry/wine.c b/source4/winbind/wb_setup_domains.c
similarity index 56%
copy from source4/lib/registry/wine.c
copy to source4/winbind/wb_setup_domains.c
index 77d2ce6..92b91c1 100644
--- a/source4/lib/registry/wine.c
+++ b/source4/winbind/wb_setup_domains.c
@@ -1,7 +1,7 @@
 /*
    Unix SMB/CIFS implementation.
-   Registry interface
-   Copyright (C) Jelmer Vernooij                                         2007.
+
+   Copyright (C) Stefan Metzmacher 2008
 
    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
@@ -18,28 +18,25 @@
 */
 
 #include "includes.h"
-#include "lib/registry/common/registry.h"
-#include "windows/registry.h"
+#include "winbind/wb_server.h"
+#include "smbd/service_task.h"
+#include "auth/credentials/credentials.h"
+#include "param/secrets.h"
+#include "param/param.h"
 
-static WERROR wine_open_reg (struct registry_hive *h, struct registry_key 
**key)
+NTSTATUS wbsrv_setup_domains(struct wbsrv_service *service)
 {
-       /* FIXME: Open h->location and mmap it */
-}
+       const struct dom_sid *primary_sid;
 
-static REG_OPS reg_backend_wine = {
-       .name = "wine",
-       .open_hive = wine_open_reg,
+       primary_sid = secrets_get_domain_sid(service,
+                                            service->task->event_ctx,
+                                            service->task->lp_ctx,
+                                            
lp_workgroup(service->task->lp_ctx));
+       if (!primary_sid) {
+               return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
+       }
 
-};
+       service->primary_sid = primary_sid;
 
-NTSTATUS registry_wine_init(void)
-{
-       register_backend("registry", &reg_backend_wine);
        return NT_STATUS_OK;
 }
-
-WERROR reg_open_wine(struct registry_key **ctx)
-{
-       /* FIXME: Open ~/.wine/system.reg, etc */
-       return WERR_NOT_SUPPORTED;
-}


-- 
Samba Shared Repository

<Prev in Thread] Current Thread [Next in Thread>
  • [SCM] Samba Shared Repository - branch master updated - ba0facd688d2b0d864364031a373abea73e9154f, Stefan Metzmacher <=