lib: Add samlogon_cache.h
authorVolker Lendecke <vl@samba.org>
Tue, 29 Nov 2016 15:41:27 +0000 (15:41 +0000)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 2 Dec 2016 08:36:08 +0000 (09:36 +0100)
Move prototypes into its own header file

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/auth/auth_domain.c
source3/include/proto.h
source3/libsmb/samlogon_cache.c
source3/libsmb/samlogon_cache.h [new file with mode: 0644]
source3/winbindd/winbindd.c
source3/winbindd/winbindd_ads.c
source3/winbindd/winbindd_cache.c
source3/winbindd/winbindd_creds.c
source3/winbindd/winbindd_msrpc.c
source3/winbindd/winbindd_pam.c
source3/winbindd/winbindd_util.c

index 1a8cd91985e65e82e2034e6405bd535db81c710b..d663923cfae03af8fb9118212ecdfe8cc4c4bc20 100644 (file)
@@ -28,6 +28,7 @@
 #include "passdb.h"
 #include "libsmb/libsmb.h"
 #include "libcli/auth/netlogon_creds_cli.h"
+#include "libsmb/samlogon_cache.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_AUTH
index c3460a979ff2196f145a6e6d9472f444f0611a12..53a2d6aa3832148514d8559a36284ac90453b59e 100644 (file)
@@ -839,14 +839,6 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam
                                const char *old_passwd, const char *new_passwd,
                                char **err_str);
 
-/* The following definitions come from libsmb/samlogon_cache.c  */
-
-bool netsamlogon_cache_init(void);
-void netsamlogon_clear_cached_user(const struct dom_sid *user_sid);
-bool netsamlogon_cache_store(const char *username, struct netr_SamInfo3 *info3);
-struct netr_SamInfo3 *netsamlogon_cache_get(TALLOC_CTX *mem_ctx, const struct dom_sid *user_sid);
-bool netsamlogon_cache_have(const struct dom_sid *user_sid);
-
 /* The following definitions come from libsmb/smberr.c  */
 
 const char *smb_dos_err_name(uint8_t e_class, uint16_t num);
index fdcdf130c092df0ac7c7cace0131b397f2df109e..de2156d1a50703a0f3ece79d0578a70e53a1d7d9 100644 (file)
@@ -22,6 +22,7 @@
 */
 
 #include "includes.h"
+#include "samlogon_cache.h"
 #include "system/filesys.h"
 #include "librpc/gen_ndr/ndr_krb5pac.h"
 #include "../libcli/security/security.h"
diff --git a/source3/libsmb/samlogon_cache.h b/source3/libsmb/samlogon_cache.h
new file mode 100644 (file)
index 0000000..0a2fd14
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * Net_sam_logon info3 helpers
+ * Copyright (C) Alexander Bokovoy              2002.
+ * Copyright (C) Andrew Bartlett                2002.
+ * Copyright (C) Gerald Carter                 2003.
+ * Copyright (C) Tim Potter                    2003.
+ * Copyright (C) Guenther Deschner             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
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __LIBSMB_SAMLOGON_CACHE_H__
+#define __LIBSMB_SAMLOGON_CACHE_H__
+
+#include "replace.h"
+#include <talloc.h>
+
+struct dom_sid;
+struct netr_SamInfo3;
+
+bool netsamlogon_cache_init(void);
+void netsamlogon_clear_cached_user(const struct dom_sid *user_sid);
+bool netsamlogon_cache_store(const char *username,
+                            struct netr_SamInfo3 *info3);
+struct netr_SamInfo3 *netsamlogon_cache_get(TALLOC_CTX *mem_ctx,
+                                           const struct dom_sid *user_sid);
+bool netsamlogon_cache_have(const struct dom_sid *user_sid);
+
+#endif
index f79dc478a77c0e8bc2d29e2070883c4a5c705650..778ee808d0cc7c7ccd5fc0a9cc25cf296388ac47 100644 (file)
@@ -43,6 +43,7 @@
 #include "source4/lib/messaging/messaging.h"
 #include "lib/param/param.h"
 #include "lib/async_req/async_sock.h"
+#include "libsmb/samlogon_cache.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND
index dc92a4acc4b44890f1213ac7b31c772a6cb3ecea..fdb6806040eb9d952c02f59f9f7827386e46602b 100644 (file)
@@ -30,6 +30,7 @@
 #include "../libcli/ldap/ldap_ndr.h"
 #include "../libcli/security/security.h"
 #include "../libds/common/flag_mapping.h"
+#include "libsmb/samlogon_cache.h"
 #include "passdb.h"
 
 #ifdef HAVE_ADS
index 4a9782abc42278528bfa304d1aeb6c33a2f7b008..05b356f2292c4fdec6b486b5270b9aa88ef9ce24 100644 (file)
@@ -34,6 +34,7 @@
 #include "../libcli/security/security.h"
 #include "passdb/machine_sid.h"
 #include "util_tdb.h"
+#include "libsmb/samlogon_cache.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND
index 37176415488cde0892ac4769ca1d6668cc04bee4..15cca554d45e64d7fbf0b3600927e1e452b31511 100644 (file)
@@ -23,6 +23,7 @@
 #include "winbindd.h"
 #include "../libcli/auth/libcli_auth.h"
 #include "../libcli/security/security.h"
+#include "libsmb/samlogon_cache.h"
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND
 
index 41217475862121069366b207c7f7733b805ebb8b..dff27b49f636936d2ba7c6c0e4d346ec79b4d172 100644 (file)
@@ -31,6 +31,7 @@
 #include "rpc_client/cli_samr.h"
 #include "rpc_client/cli_lsarpc.h"
 #include "../libcli/security/security.h"
+#include "libsmb/samlogon_cache.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND
index 9433ad17b2b5e7ea3d5167a7d9c4b3138db17536..741a42f86bde01f0bf324c5730cdd73d3799c0d7 100644 (file)
@@ -42,6 +42,7 @@
 #include "auth/gensec/gensec.h"
 #include "librpc/crypto/gse_krb5.h"
 #include "lib/afs/afs_funcs.h"
+#include "libsmb/samlogon_cache.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND
index 217c049874264601573a7788786821f32dfcd7f9..aabaa6ac259fa1a153500d2484471c514208f2b2 100644 (file)
@@ -30,6 +30,7 @@
 #include "source4/lib/messaging/messaging.h"
 #include "librpc/gen_ndr/ndr_lsa.h"
 #include "auth/credentials/credentials.h"
+#include "libsmb/samlogon_cache.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND