s4:s3compat We can't use s3compat_get_conn() any more
authorAndrew Bartlett <abartlet@samba.org>
Thu, 13 May 2010 01:29:10 +0000 (11:29 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 3 Jun 2010 01:14:05 +0000 (11:14 +1000)
We have to use functions that don't assume a connection, as winbindd
does not have one.

Andrew Bartlett

source4/s3compat/machine_sid.c

index a02e7687602ec875041ffc5b176a32613da4fd62..0835725b51991d7d722be6c150e8932f1e9abbf9 100644 (file)
@@ -27,6 +27,7 @@
 #include "smbd/service.h"
 #include "libcli/security/dom_sid.h"
 #include "dsdb/samdb/samdb.h"
+#include "s3compat_globals.h"
 
 /* NOTE! the global_sam_sid is the SID of our local SAM. This is only
    equal to the domain SID when we are a DC, otherwise its our
@@ -40,8 +41,9 @@
 _PUBLIC_ const struct dom_sid *get_global_sam_sid(void)
 {
 
-       struct stream_connection *samba3_conn = s3compat_get_conn();
-       struct ldb_context *samdb = samdb_connect(samba3_conn, samba3_conn->event.ctx, samba3_conn->lp_ctx, system_session(samba3_conn->lp_ctx));
+       struct ldb_context *samdb = samdb_connect(NULL, s3compat_get_tevent_ctx(), 
+                                                 s3compat_get_lp_ctx(), 
+                                                 system_session(s3compat_get_lp_ctx()));
 
        return samdb_domain_sid(samdb);
 }