summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'librpc')
-rw-r--r--librpc/idl/auth.idl18
-rw-r--r--librpc/ndr/ndr_auth.c44
-rw-r--r--librpc/ndr/ndr_auth.h32
-rw-r--r--librpc/wscript_build2
4 files changed, 94 insertions, 2 deletions
diff --git a/librpc/idl/auth.idl b/librpc/idl/auth.idl
index 7b4556a6d7..904becac61 100644
--- a/librpc/idl/auth.idl
+++ b/librpc/idl/auth.idl
@@ -1,10 +1,20 @@
#include "idl_types.h"
/*
- security IDL structures
+ Authentication IDL structures
+
+ These are NOT public network structures, but it is helpful to define
+ these things in IDL. They may change without ABI breakage or
+ warning.
+
*/
import "misc.idl", "security.idl", "lsa.idl", "krb5pac.idl";
+[
+ pyhelper("librpc/ndr/py_auth.c"),
+ helper("../librpc/ndr/ndr_auth.h"),
+ helpstring("internal Samba authentication structures")
+]
interface auth
{
@@ -79,7 +89,13 @@ interface auth
security_unix_token *unix_token;
auth_user_info *info;
auth_user_info_unix *unix_info;
+ [value(NULL), ignore] auth_user_info_torture *torture;
DATA_BLOB session_key;
+ [value(NULL), ignore] cli_credentials *credentials;
+ } auth_session_info;
+
+ typedef [public] struct {
+ auth_session_info *session_info;
DATA_BLOB exported_gssapi_credentials;
} auth_session_info_transport;
}
diff --git a/librpc/ndr/ndr_auth.c b/librpc/ndr/ndr_auth.c
new file mode 100644
index 0000000000..5252d80052
--- /dev/null
+++ b/librpc/ndr/ndr_auth.c
@@ -0,0 +1,44 @@
+/*
+ Unix SMB/CIFS implementation.
+
+ Helper routines for marshalling the internal 'auth.idl'
+
+ Copyright (C) Andrew Bartlett 2011
+
+ 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/>.
+*/
+
+#include "includes.h"
+#include "librpc/ndr/ndr_auth.h"
+#include "librpc/ndr/libndr.h"
+
+_PUBLIC_ void ndr_print_cli_credentials(struct ndr_print *ndr, const char *name, struct cli_credentials *v)
+{
+ ndr->print(ndr, "%-25s: NULL", name);
+}
+
+/*
+ cli_credentials does not have a network representation, just pull/push a NULL pointer
+*/
+_PUBLIC_ enum ndr_err_code ndr_pull_cli_credentials(struct ndr_pull *ndr, int ndr_flags, struct cli_credentials *v)
+{
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_cli_credentials(struct ndr_push *ndr, int ndr_flags, struct cli_credentials *v)
+{
+ return ndr_push_pointer(ndr, ndr_flags, NULL);
+}
+
+
diff --git a/librpc/ndr/ndr_auth.h b/librpc/ndr/ndr_auth.h
new file mode 100644
index 0000000000..57f653551f
--- /dev/null
+++ b/librpc/ndr/ndr_auth.h
@@ -0,0 +1,32 @@
+/*
+ Unix SMB/CIFS implementation.
+
+ Helper routines for marshalling the internal 'auth.idl'
+
+ Copyright (C) Andrew Bartlett 2011
+
+ 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/>.
+*/
+
+/*
+ cli_credentials does not have a network representation, just pull/push a NULL pointer
+*/
+
+#include "librpc/gen_ndr/ndr_auth.h"
+
+struct cli_credentials;
+_PUBLIC_ enum ndr_err_code ndr_pull_cli_credentials(struct ndr_pull *ndr, int ndr_flags, struct cli_credentials *v);
+_PUBLIC_ enum ndr_err_code ndr_push_cli_credentials(struct ndr_push *ndr, int ndr_flags, struct cli_credentials *v);
+
+_PUBLIC_ void ndr_print_cli_credentials(struct ndr_print *ndr, const char *name, struct cli_credentials *v);
diff --git a/librpc/wscript_build b/librpc/wscript_build
index ce78cb6767..b71a3ae5d9 100644
--- a/librpc/wscript_build
+++ b/librpc/wscript_build
@@ -9,7 +9,7 @@ bld.SAMBA_SUBSYSTEM('NDR_AUDIOSRV',
)
bld.SAMBA_SUBSYSTEM('NDR_AUTH',
- source='gen_ndr/ndr_auth.c',
+ source='gen_ndr/ndr_auth.c ndr/ndr_auth.c',
public_headers='gen_ndr/auth.h',
header_path='gen_ndr',
public_deps='ndr NDR_SECURITY ndr-krb5pac'