gensec: move gensec_util.c to the top level
authorAndrew Bartlett <abartlet@samba.org>
Sat, 31 Dec 2011 11:24:44 +0000 (22:24 +1100)
committerStefan Metzmacher <metze@samba.org>
Wed, 11 Jan 2012 08:02:41 +0000 (09:02 +0100)
To do this some defines need to move to common_auth.h

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
auth/common_auth.h
auth/gensec/gensec.h
auth/gensec/gensec_util.c [moved from source4/auth/gensec/gensec_util.c with 95% similarity]
auth/gensec/wscript_build
source3/Makefile.in
source4/auth/auth.h
source4/auth/gensec/wscript_build

index ce3444ce7a0923e33d0f14e76dde46ac16513db2..40f7da4fe7341b0fcd7f2d2de77c68b69398dc1c 100644 (file)
@@ -33,6 +33,11 @@ enum auth_password_state {
        AUTH_PASSWORD_RESPONSE = 3
 };
 
+#define AUTH_SESSION_INFO_DEFAULT_GROUPS     0x01 /* Add the user to the default world and network groups */
+#define AUTH_SESSION_INFO_AUTHENTICATED      0x02 /* Add the user to the 'authenticated users' group */
+#define AUTH_SESSION_INFO_SIMPLE_PRIVILEGES  0x04 /* Use a trivial map between users and privilages, rather than a DB */
+#define AUTH_SESSION_INFO_UNIX_TOKEN         0x08 /* The returned token must have the unix_token and unix_info elements provided */
+
 struct auth_usersupplied_info
 {
        const char *workstation_name;
index be330e97faf4e086f387d233e7545b4d59368475..a1ae634bf881519999920e313b7987ceaa08547f 100644 (file)
@@ -313,4 +313,18 @@ bool gensec_setting_bool(struct gensec_settings *settings, const char *mechanism
 
 NTSTATUS gensec_set_target_principal(struct gensec_security *gensec_security, const char *principal);
 
+NTSTATUS gensec_generate_session_info(TALLOC_CTX *mem_ctx,
+                                     struct gensec_security *gensec_security,
+                                     struct auth_user_info_dc *user_info_dc,
+                                     struct auth_session_info **session_info);
+
+NTSTATUS gensec_generate_session_info_pac(TALLOC_CTX *mem_ctx,
+                                         struct gensec_security *gensec_security,
+                                         struct smb_krb5_context *smb_krb5_context,
+                                         DATA_BLOB *pac_blob,
+                                         const char *principal_string,
+                                         const struct tsocket_address *remote_address,
+                                         struct auth_session_info **session_info);
+
+
 #endif /* __GENSEC_H__ */
similarity index 95%
rename from source4/auth/gensec/gensec_util.c
rename to auth/gensec/gensec_util.c
index 9c5db48378bf76508c9800b29bf28c49a94c3d4f..44da345438a66129034da024ba45c7814a214d45 100644 (file)
 
 #include "includes.h"
 #include "auth/gensec/gensec.h"
-#include "auth/gensec/gensec_proto.h"
-#include "auth/auth.h"
-#include "auth/credentials/credentials.h"
-#include "auth/system_session_proto.h"
+#include "auth/common_auth.h"
 
 NTSTATUS gensec_generate_session_info(TALLOC_CTX *mem_ctx,
                                      struct gensec_security *gensec_security,
index e3e9372c3dfb81a62424928f071241a5649b0f27..03d97e6cc96e51d86b41689b60c06497b2e81f20 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 bld.SAMBA_LIBRARY('gensec',
-       source='gensec.c gensec_start.c',
+       source='gensec.c gensec_start.c gensec_util.c',
        pc_files='gensec.pc',
        autoproto='gensec_toplevel_proto.h',
        public_deps='tevent-util samba-util errors LIBPACKET auth_system_session samba-modules gensec_util',
index 532cd79d88fd2d4d355205ffc54efa5c0791c8b6..a6324b017166b8bccff7917c83af8dc56a6eac15 100644 (file)
@@ -557,6 +557,7 @@ LIBSMB_OBJ0 = \
               libsmb/ntlmssp_wrap.o \
               ../auth/gensec/gensec.o \
               ../auth/gensec/gensec_start.o \
+              ../auth/gensec/gensec_util.o \
               ../auth/credentials/credentials.o \
               ../auth/credentials/credentials_samba3.o \
               ../auth/ntlmssp/ntlmssp.o \
index 06857fad2eefeba7c867f3c2dbfc5128752910cd..a7fc413ecca62000c2a72e582bc5bf004eb4dfe2 100644 (file)
@@ -45,11 +45,6 @@ struct loadparm_context;
 /* version 0 - till samba4 is stable - metze */
 #define AUTH4_INTERFACE_VERSION 0
 
-#define AUTH_SESSION_INFO_DEFAULT_GROUPS     0x01 /* Add the user to the default world and network groups */
-#define AUTH_SESSION_INFO_AUTHENTICATED      0x02 /* Add the user to the 'authenticated users' group */
-#define AUTH_SESSION_INFO_SIMPLE_PRIVILEGES  0x04 /* Use a trivial map between users and privilages, rather than a DB */
-#define AUTH_SESSION_INFO_UNIX_TOKEN         0x08 /* The returned token must have the unix_token and unix_info elements provided */
-
 struct auth_method_context;
 struct auth_check_password_request;
 struct auth4_context;
index e298954536d6f57f0017fe8b94fd88499d9b688c..2eb49e6abcbbd0d34ec0d02dcc15d5a53f973b04 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 bld.SAMBA_SUBSYSTEM('gensec_util',
-                    source='socket.c gensec_tstream.c gensec_util.c',
+                    source='socket.c gensec_tstream.c',
                     deps='tevent-util tevent samba-util LIBTSOCKET',
                     autoproto='gensec_proto.h')