summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-07-15 12:45:17 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-07-20 09:17:10 +1000
commitf16d8f4eb86ecc4741c25e5ed87b2ea4c6717a31 (patch)
treebd839288be389cbfe84852e0a114b3ee77589462
parentd7d8a5ed94a2b572b6818008a858f8c6b529dd03 (diff)
downloadsamba-f16d8f4eb86ecc4741c25e5ed87b2ea4c6717a31.tar.gz
samba-f16d8f4eb86ecc4741c25e5ed87b2ea4c6717a31.tar.bz2
samba-f16d8f4eb86ecc4741c25e5ed87b2ea4c6717a31.zip
s3-auth Use struct auth3_session_info outside the auth subsystem
This seperation between the structure used inside the auth modules and in the wider codebase allows for a gradual migration from struct auth_serversupplied_info -> struct auth_session_info (from auth.idl) The idea here is that we keep a clear seperation between the structure before and after the local groups, local user lookup and the session key modifications have been processed, as the lack of this seperation has caused issues in the past. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
-rw-r--r--source3/auth/auth_ntlmssp.c2
-rw-r--r--source3/auth/auth_util.c37
-rw-r--r--source3/auth/proto.h16
-rw-r--r--source3/auth/user_krb5.c2
-rw-r--r--source3/include/nt_printing.h20
-rw-r--r--source3/include/ntdomain.h2
-rw-r--r--source3/include/printing.h14
-rw-r--r--source3/include/smb.h6
-rw-r--r--source3/printing/nt_printing.c20
-rw-r--r--source3/printing/nt_printing_ads.c12
-rw-r--r--source3/printing/nt_printing_migrate_internal.c2
-rw-r--r--source3/printing/printing.c18
-rw-r--r--source3/rpc_client/cli_winreg_int.c6
-rw-r--r--source3/rpc_client/cli_winreg_int.h6
-rw-r--r--source3/rpc_server/dcesrv_gssapi.c4
-rw-r--r--source3/rpc_server/dcesrv_gssapi.h2
-rw-r--r--source3/rpc_server/dcesrv_ntlmssp.c2
-rw-r--r--source3/rpc_server/dcesrv_ntlmssp.h2
-rw-r--r--source3/rpc_server/epmapper/srv_epmapper.c2
-rw-r--r--source3/rpc_server/netlogon/srv_netlog_nt.c4
-rw-r--r--source3/rpc_server/rpc_ncacn_np.c18
-rw-r--r--source3/rpc_server/rpc_ncacn_np.h8
-rw-r--r--source3/rpc_server/rpc_server.c4
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_nt.c44
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_util.c46
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_util.h48
-rw-r--r--source3/rpc_server/srv_pipe.c4
-rw-r--r--source3/rpc_server/srv_pipe_hnd.c2
-rw-r--r--source3/rpc_server/srv_pipe_hnd.h2
-rw-r--r--source3/rpc_server/svcctl/srv_svcctl_nt.c4
-rw-r--r--source3/services/svc_winreg_glue.c10
-rw-r--r--source3/services/svc_winreg_glue.h12
-rw-r--r--source3/smbd/globals.h2
-rw-r--r--source3/smbd/msdfs.c4
-rw-r--r--source3/smbd/password.c2
-rw-r--r--source3/smbd/proto.h12
-rw-r--r--source3/smbd/server_reload.c2
-rw-r--r--source3/smbd/service.c14
-rw-r--r--source3/smbd/sesssetup.c47
-rw-r--r--source3/smbd/uid.c14
-rw-r--r--source3/winbindd/winbindd_samr.c8
41 files changed, 263 insertions, 223 deletions
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c
index 2d1aef18f0..057f9d09e5 100644
--- a/source3/auth/auth_ntlmssp.c
+++ b/source3/auth/auth_ntlmssp.c
@@ -29,7 +29,7 @@
NTSTATUS auth_ntlmssp_steal_session_info(TALLOC_CTX *mem_ctx,
struct auth_ntlmssp_state *auth_ntlmssp_state,
- struct auth_serversupplied_info **session_info)
+ struct auth3_session_info **session_info)
{
NTSTATUS nt_status = create_local_token(mem_ctx,
auth_ntlmssp_state->server_info,
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index a8c737dd88..70df256042 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -458,13 +458,13 @@ static NTSTATUS log_nt_token(struct security_token *token)
NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
const struct auth_serversupplied_info *server_info,
DATA_BLOB *session_key,
- struct auth_serversupplied_info **session_info_out)
+ struct auth3_session_info **session_info_out)
{
struct security_token *t;
NTSTATUS status;
size_t i;
struct dom_sid tmp_sid;
- struct auth_serversupplied_info *session_info;
+ struct auth3_session_info *session_info;
struct wbcUnixId *ids;
/* Ensure we can't possible take a code path leading to a
@@ -473,7 +473,7 @@ NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
return NT_STATUS_LOGON_FAILURE;
}
- session_info = copy_serverinfo(mem_ctx, server_info);
+ session_info = copy_serverinfo_session_info(mem_ctx, server_info);
if (!session_info) {
return NT_STATUS_NO_MEMORY;
@@ -767,7 +767,7 @@ static NTSTATUS get_guest_info3(TALLOC_CTX *mem_ctx,
left as-is for now.
***************************************************************************/
-static NTSTATUS make_new_server_info_guest(struct auth_serversupplied_info **session_info)
+static NTSTATUS make_new_session_info_guest(struct auth3_session_info **session_info)
{
struct auth_serversupplied_info *server_info;
static const char zeros[16] = {0};
@@ -838,7 +838,7 @@ done:
***************************************************************************/
static NTSTATUS make_new_session_info_system(TALLOC_CTX *mem_ctx,
- struct auth_serversupplied_info **session_info)
+ struct auth3_session_info **session_info)
{
struct passwd *pwd;
NTSTATUS status;
@@ -872,7 +872,7 @@ static NTSTATUS make_new_session_info_system(TALLOC_CTX *mem_ctx,
}
/****************************************************************************
- Fake a auth_serversupplied_info just from a username (as a
+ Fake a auth3_session_info just from a username (as a
session_info structure, with create_local_token() already called on
it.
****************************************************************************/
@@ -880,7 +880,7 @@ static NTSTATUS make_new_session_info_system(TALLOC_CTX *mem_ctx,
NTSTATUS make_session_info_from_username(TALLOC_CTX *mem_ctx,
const char *username,
bool is_guest,
- struct auth_serversupplied_info **session_info)
+ struct auth3_session_info **session_info)
{
struct auth_serversupplied_info *result;
struct passwd *pwd;
@@ -1150,7 +1150,7 @@ struct auth3_session_info *copy_session_info(TALLOC_CTX *mem_ctx,
* SMB level session key with SystemLibraryDTC
*/
-bool session_info_set_session_key(struct auth_serversupplied_info *info,
+bool session_info_set_session_key(struct auth3_session_info *info,
DATA_BLOB session_key)
{
TALLOC_FREE(info->session_key.data);
@@ -1161,24 +1161,31 @@ bool session_info_set_session_key(struct auth_serversupplied_info *info,
return (info->session_key.data != NULL);
}
-static struct auth_serversupplied_info *guest_info = NULL;
+static struct auth3_session_info *guest_info = NULL;
bool init_guest_info(void)
{
if (guest_info != NULL)
return True;
- return NT_STATUS_IS_OK(make_new_server_info_guest(&guest_info));
+ return NT_STATUS_IS_OK(make_new_session_info_guest(&guest_info));
}
NTSTATUS make_server_info_guest(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info **server_info)
{
- *server_info = copy_serverinfo(mem_ctx, guest_info);
+ *server_info = copy_session_info_serverinfo(mem_ctx, guest_info);
return (*server_info != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;
}
-static struct auth_serversupplied_info *system_info = NULL;
+NTSTATUS make_session_info_guest(TALLOC_CTX *mem_ctx,
+ struct auth3_session_info **session_info)
+{
+ *session_info = copy_session_info(mem_ctx, guest_info);
+ return (*session_info != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;
+}
+
+static struct auth3_session_info *system_info = NULL;
NTSTATUS init_system_info(void)
{
@@ -1189,14 +1196,14 @@ NTSTATUS init_system_info(void)
}
NTSTATUS make_session_info_system(TALLOC_CTX *mem_ctx,
- struct auth_serversupplied_info **session_info)
+ struct auth3_session_info **session_info)
{
if (system_info == NULL) return NT_STATUS_UNSUCCESSFUL;
- *session_info = copy_serverinfo(mem_ctx, system_info);
+ *session_info = copy_session_info(mem_ctx, system_info);
return (*session_info != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;
}
-const struct auth_serversupplied_info *get_session_info_system(void)
+const struct auth3_session_info *get_session_info_system(void)
{
return system_info;
}
diff --git a/source3/auth/proto.h b/source3/auth/proto.h
index 8bc2c6e458..9f497a48e3 100644
--- a/source3/auth/proto.h
+++ b/source3/auth/proto.h
@@ -71,7 +71,7 @@ NTSTATUS auth_netlogond_init(void);
NTSTATUS auth_ntlmssp_steal_session_info(TALLOC_CTX *mem_ctx,
struct auth_ntlmssp_state *auth_ntlmssp_state,
- struct auth_serversupplied_info **session_info);
+ struct auth3_session_info **session_info);
NTSTATUS auth_ntlmssp_start(const struct tsocket_address *remote_address,
struct auth_ntlmssp_state **auth_ntlmssp_state);
@@ -150,7 +150,7 @@ NTSTATUS make_server_info_sam(struct auth_serversupplied_info **server_info,
NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
const struct auth_serversupplied_info *server_info,
DATA_BLOB *session_key,
- struct auth_serversupplied_info **session_info_out);
+ struct auth3_session_info **session_info_out);
NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username,
bool is_guest,
uid_t *uid, gid_t *gid,
@@ -165,20 +165,22 @@ NTSTATUS make_server_info_pw(struct auth_serversupplied_info **server_info,
NTSTATUS make_session_info_from_username(TALLOC_CTX *mem_ctx,
const char *username,
bool is_guest,
- struct auth_serversupplied_info **session_info);
+ struct auth3_session_info **session_info);
struct auth_serversupplied_info *copy_serverinfo(TALLOC_CTX *mem_ctx,
const struct auth_serversupplied_info *src);
struct auth3_session_info *copy_session_info(TALLOC_CTX *mem_ctx,
const struct auth3_session_info *src);
bool init_guest_info(void);
NTSTATUS init_system_info(void);
-bool session_info_set_session_key(struct auth_serversupplied_info *info,
+bool session_info_set_session_key(struct auth3_session_info *info,
DATA_BLOB session_key);
NTSTATUS make_server_info_guest(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info **server_info);
+NTSTATUS make_session_info_guest(TALLOC_CTX *mem_ctx,
+ struct auth3_session_info **server_info);
NTSTATUS make_session_info_system(TALLOC_CTX *mem_ctx,
- struct auth_serversupplied_info **session_info);
-const struct auth_serversupplied_info *get_session_info_system(void);
+ struct auth3_session_info **session_info);
+const struct auth3_session_info *get_session_info_system(void);
bool copy_current_user(struct current_user *dst, struct current_user *src);
struct passwd *smb_getpwnam( TALLOC_CTX *mem_ctx, const char *domuser,
char **p_save_username, bool create );
@@ -319,6 +321,6 @@ NTSTATUS make_session_info_krb5(TALLOC_CTX *mem_ctx,
struct PAC_LOGON_INFO *logon_info,
bool mapped_to_guest, bool username_was_mapped,
DATA_BLOB *session_key,
- struct auth_serversupplied_info **session_info);
+ struct auth3_session_info **session_info);
#endif /* _AUTH_PROTO_H_ */
diff --git a/source3/auth/user_krb5.c b/source3/auth/user_krb5.c
index db73c6dfc0..054cb39252 100644
--- a/source3/auth/user_krb5.c
+++ b/source3/auth/user_krb5.c
@@ -187,7 +187,7 @@ NTSTATUS make_session_info_krb5(TALLOC_CTX *mem_ctx,
struct PAC_LOGON_INFO *logon_info,
bool mapped_to_guest, bool username_was_mapped,
DATA_BLOB *session_key,
- struct auth_serversupplied_info **session_info)
+ struct auth3_session_info **session_info)
{
NTSTATUS status;
struct auth_serversupplied_info *server_info;
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h
index 4f8515983b..8bac857687 100644
--- a/source3/include/nt_printing.h
+++ b/source3/include/nt_printing.h
@@ -128,18 +128,18 @@ bool nt_printing_init(struct messaging_context *msg_ctx);
const char *get_short_archi(const char *long_archi);
-bool print_access_check(const struct auth_serversupplied_info *server_info,
+bool print_access_check(const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx, int snum,
int access_type);
WERROR nt_printer_publish(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *server_info,
+ const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx,
struct spoolss_PrinterInfo2 *pinfo2,
int action);
bool is_printer_published(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *server_info,
+ const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx,
const char *servername, char *printer, struct GUID *guid,
struct spoolss_PrinterInfo2 **info2);
@@ -147,33 +147,33 @@ bool is_printer_published(TALLOC_CTX *mem_ctx,
WERROR check_published_printers(struct messaging_context *msg_ctx);
bool printer_driver_in_use(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *server_info,
+ const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx,
const struct spoolss_DriverInfo8 *r);
bool printer_driver_files_in_use(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *server_info,
+ const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx,
struct spoolss_DriverInfo8 *r);
-bool delete_driver_files(const struct auth_serversupplied_info *server_info,
+bool delete_driver_files(const struct auth3_session_info *server_info,
const struct spoolss_DriverInfo8 *r);
-WERROR move_driver_to_download_area(struct auth_serversupplied_info *session_info,
+WERROR move_driver_to_download_area(struct auth3_session_info *session_info,
struct spoolss_AddDriverInfoCtr *r);
WERROR clean_up_driver_struct(TALLOC_CTX *mem_ctx,
- struct auth_serversupplied_info *session_info,
+ struct auth3_session_info *session_info,
struct spoolss_AddDriverInfoCtr *r);
void map_printer_permissions(struct security_descriptor *sd);
void map_job_permissions(struct security_descriptor *sd);
-bool print_time_access_check(const struct auth_serversupplied_info *server_info,
+bool print_time_access_check(const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx,
const char *servicename);
void nt_printer_remove(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *server_info,
+ const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx,
const char *printer);
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h
index 46579b7250..a71c9a2e4a 100644
--- a/source3/include/ntdomain.h
+++ b/source3/include/ntdomain.h
@@ -115,7 +115,7 @@ struct pipes_struct {
enum dcerpc_transport_t transport;
- struct auth_serversupplied_info *session_info;
+ struct auth3_session_info *session_info;
struct messaging_context *msg_ctx;
struct dcesrv_ep_entry_list *ep_entries;
diff --git a/source3/include/printing.h b/source3/include/printing.h
index 1bbb72c7be..8075241092 100644
--- a/source3/include/printing.h
+++ b/source3/include/printing.h
@@ -198,13 +198,13 @@ bool print_job_set_name(struct tevent_context *ev,
struct messaging_context *msg_ctx,
const char *sharename, uint32 jobid, const char *name);
bool print_job_get_name(TALLOC_CTX *mem_ctx, const char *sharename, uint32_t jobid, char **name);
-WERROR print_job_delete(const struct auth_serversupplied_info *server_info,
+WERROR print_job_delete(const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx,
int snum, uint32_t jobid);
-bool print_job_pause(const struct auth_serversupplied_info *server_info,
+bool print_job_pause(const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx,
int snum, uint32 jobid, WERROR *errcode);
-bool print_job_resume(const struct auth_serversupplied_info *server_info,
+bool print_job_resume(const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx,
int snum, uint32 jobid, WERROR *errcode);
ssize_t print_job_write(struct tevent_context *ev,
@@ -212,7 +212,7 @@ ssize_t print_job_write(struct tevent_context *ev,
int snum, uint32 jobid, const char *buf, size_t size);
int print_queue_length(struct messaging_context *msg_ctx, int snum,
print_status_struct *pstatus);
-WERROR print_job_start(const struct auth_serversupplied_info *server_info,
+WERROR print_job_start(const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx,
const char *clientmachine,
int snum, const char *docname, const char *filename,
@@ -224,11 +224,11 @@ NTSTATUS print_job_end(struct messaging_context *msg_ctx, int snum,
int print_queue_status(struct messaging_context *msg_ctx, int snum,
print_queue_struct **ppqueue,
print_status_struct *status);
-WERROR print_queue_pause(const struct auth_serversupplied_info *server_info,
+WERROR print_queue_pause(const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx, int snum);
-WERROR print_queue_resume(const struct auth_serversupplied_info *server_info,
+WERROR print_queue_resume(const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx, int snum);
-WERROR print_queue_purge(const struct auth_serversupplied_info *server_info,
+WERROR print_queue_purge(const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx, int snum);
uint16 pjobid_to_rap(const char* sharename, uint32 jobid);
bool rap_to_pjobid(uint16 rap_jobid, fstring sharename, uint32 *pjobid);
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 8ba878034f..3242c604d6 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -305,7 +305,7 @@ typedef struct files_struct {
#include "sysquotas.h"
struct vuid_cache_entry {
- struct auth_serversupplied_info *session_info;
+ struct auth3_session_info *session_info;
uint16_t vuid;
bool read_only;
};
@@ -403,7 +403,7 @@ typedef struct connection_struct {
* This represents the user information on this connection. Depending
* on the vuid using this tid, this might change per SMB request.
*/
- struct auth_serversupplied_info *session_info;
+ struct auth3_session_info *session_info;
/*
* If the "force group" parameter is set, this is the primary gid that
@@ -1447,7 +1447,7 @@ typedef struct user_struct {
TDB key string */
int homes_snum;
- struct auth_serversupplied_info *session_info;
+ struct auth3_session_info *session_info;
struct auth_ntlmssp_state *auth_ntlmssp_state;
} user_struct;
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index fd2ab2a197..dc3654c63f 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -574,7 +574,7 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
/****************************************************************************
Determine the correct cVersion associated with an architecture and driver
****************************************************************************/
-static uint32 get_correct_cversion(struct auth_serversupplied_info *session_info,
+static uint32 get_correct_cversion(struct auth3_session_info *session_info,
const char *architecture,
const char *driverpath_in,
WERROR *perr)
@@ -762,7 +762,7 @@ static uint32 get_correct_cversion(struct auth_serversupplied_info *session_info
} while (0);
static WERROR clean_up_driver_struct_level(TALLOC_CTX *mem_ctx,
- struct auth_serversupplied_info *session_info,
+ struct auth3_session_info *session_info,
const char *architecture,
const char **driver_path,
const char **data_file,
@@ -835,7 +835,7 @@ static WERROR clean_up_driver_struct_level(TALLOC_CTX *mem_ctx,
****************************************************************************/
WERROR clean_up_driver_struct(TALLOC_CTX *mem_ctx,
- struct auth_serversupplied_info *session_info,
+ struct auth3_session_info *session_info,
struct spoolss_AddDriverInfoCtr *r)
{
switch (r->level) {
@@ -954,7 +954,7 @@ static WERROR move_driver_file_to_download_area(TALLOC_CTX *mem_ctx,
return ret;
}
-WERROR move_driver_to_download_area(struct auth_serversupplied_info *session_info,
+WERROR move_driver_to_download_area(struct auth3_session_info *session_info,
struct spoolss_AddDriverInfoCtr *r)
{
struct spoolss_AddDriverInfo3 *driver;
@@ -1174,7 +1174,7 @@ WERROR move_driver_to_download_area(struct auth_serversupplied_info *session_inf
****************************************************************************/
bool printer_driver_in_use(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const struct spoolss_DriverInfo8 *r)
{
@@ -1413,7 +1413,7 @@ static bool trim_overlap_drv_files(TALLOC_CTX *mem_ctx,
****************************************************************************/
bool printer_driver_files_in_use(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
struct spoolss_DriverInfo8 *info)
{
@@ -1516,7 +1516,7 @@ static NTSTATUS driver_unlink_internals(connection_struct *conn,
this.
****************************************************************************/
-bool delete_driver_files(const struct auth_serversupplied_info *session_info,
+bool delete_driver_files(const struct auth3_session_info *session_info,
const struct spoolss_DriverInfo8 *r)
{
int i = 0;
@@ -1721,7 +1721,7 @@ void map_job_permissions(struct security_descriptor *sd)
3) "printer admins" (may result in numerous calls to winbind)
****************************************************************************/
-bool print_access_check(const struct auth_serversupplied_info *session_info,
+bool print_access_check(const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx, int snum,
int access_type)
{
@@ -1823,7 +1823,7 @@ bool print_access_check(const struct auth_serversupplied_info *session_info,
Check the time parameters allow a print operation.
*****************************************************************************/
-bool print_time_access_check(const struct auth_serversupplied_info *session_info,
+bool print_time_access_check(const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *servicename)
{
@@ -1861,7 +1861,7 @@ bool print_time_access_check(const struct auth_serversupplied_info *session_info
}
void nt_printer_remove(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *printer)
{
diff --git a/source3/printing/nt_printing_ads.c b/source3/printing/nt_printing_ads.c
index beb5240423..3323380cf9 100644
--- a/source3/printing/nt_printing_ads.c
+++ b/source3/printing/nt_printing_ads.c
@@ -39,7 +39,7 @@ static void store_printer_guid(struct messaging_context *msg_ctx,
const char *printer, struct GUID guid)
{
TALLOC_CTX *tmp_ctx;
- struct auth_serversupplied_info *session_info = NULL;
+ struct auth3_session_info *session_info = NULL;
const char *guid_str;
DATA_BLOB blob;
NTSTATUS status;
@@ -244,7 +244,7 @@ static WERROR nt_printer_unpublish_ads(ADS_STRUCT *ads,
***************************************************************************/
WERROR nt_printer_publish(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
struct spoolss_PrinterInfo2 *pinfo2,
int action)
@@ -326,7 +326,7 @@ WERROR check_published_printers(struct messaging_context *msg_ctx)
int snum;
int n_services = lp_numservices();
TALLOC_CTX *tmp_ctx = NULL;
- struct auth_serversupplied_info *session_info = NULL;
+ struct auth3_session_info *session_info = NULL;
struct spoolss_PrinterInfo2 *pinfo2;
NTSTATUS status;
WERROR result;
@@ -388,7 +388,7 @@ done:
}
bool is_printer_published(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *servername, char *printer, struct GUID *guid,
struct spoolss_PrinterInfo2 **info2)
@@ -469,7 +469,7 @@ done:
}
#else
WERROR nt_printer_publish(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
struct spoolss_PrinterInfo2 *pinfo2,
int action)
@@ -483,7 +483,7 @@ WERROR check_published_printers(struct messaging_context *msg_ctx)
}
bool is_printer_published(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *servername, char *printer, struct GUID *guid,
struct spoolss_PrinterInfo2 **info2)
diff --git a/source3/printing/nt_printing_migrate_internal.c b/source3/printing/nt_printing_migrate_internal.c
index 33002e00c1..9147247da2 100644
--- a/source3/printing/nt_printing_migrate_internal.c
+++ b/source3/printing/nt_printing_migrate_internal.c
@@ -190,7 +190,7 @@ bool nt_printing_tdb_migrate(struct messaging_context *msg_ctx)
bool drivers_exists = file_exist(drivers_path);
bool printers_exists = file_exist(printers_path);
bool forms_exists = file_exist(forms_path);
- struct auth_serversupplied_info *session_info;
+ struct auth3_session_info *session_info;
struct rpc_pipe_client *winreg_pipe = NULL;
TALLOC_CTX *tmp_ctx = talloc_stackframe();
NTSTATUS status;
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index c9edab686e..31d558c791 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -2243,7 +2243,7 @@ static bool print_job_delete1(struct tevent_context *ev,
Return true if the current user owns the print job.
****************************************************************************/
-static bool is_owner(const struct auth_serversupplied_info *server_info,
+static bool is_owner(const struct auth3_session_info *server_info,
const char *servicename,
uint32 jobid)
{
@@ -2259,7 +2259,7 @@ static bool is_owner(const struct auth_serversupplied_info *server_info,
Delete a print job.
****************************************************************************/
-WERROR print_job_delete(const struct auth_serversupplied_info *server_info,
+WERROR print_job_delete(const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx,
int snum, uint32_t jobid)
{
@@ -2327,7 +2327,7 @@ pause, or resume print job. User name: %s. Printer name: %s.",
Pause a job.
****************************************************************************/
-bool print_job_pause(const struct auth_serversupplied_info *server_info,
+bool print_job_pause(const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx,
int snum, uint32 jobid, WERROR *errcode)
{
@@ -2392,7 +2392,7 @@ pause, or resume print job. User name: %s. Printer name: %s.",
Resume a job.
****************************************************************************/
-bool print_job_resume(const struct auth_serversupplied_info *server_info,
+bool print_job_resume(const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx,
int snum, uint32 jobid, WERROR *errcode)
{
@@ -2660,7 +2660,7 @@ static bool add_to_jobs_added(struct tdb_print_db *pdb, uint32 jobid)
Do all checks needed to determine if we can start a job.
***************************************************************************/
-static WERROR print_job_checks(const struct auth_serversupplied_info *server_info,
+static WERROR print_job_checks(const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx,
int snum, int *njobs)
{
@@ -2786,7 +2786,7 @@ static WERROR print_job_spool_file(int snum, uint32_t jobid,
Start spooling a job - return the jobid.
***************************************************************************/
-WERROR print_job_start(const struct auth_serversupplied_info *server_info,
+WERROR print_job_start(const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx,
const char *clientmachine,
int snum, const char *docname, const char *filename,
@@ -3245,7 +3245,7 @@ int print_queue_status(struct messaging_context *msg_ctx, int snum,
Pause a queue.
****************************************************************************/
-WERROR print_queue_pause(const struct auth_serversupplied_info *server_info,
+WERROR print_queue_pause(const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx, int snum)
{
int ret;
@@ -3282,7 +3282,7 @@ WERROR print_queue_pause(const struct auth_serversupplied_info *server_info,
Resume a queue.
****************************************************************************/
-WERROR print_queue_resume(const struct auth_serversupplied_info *server_info,
+WERROR print_queue_resume(const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx, int snum)
{
int ret;
@@ -3319,7 +3319,7 @@ WERROR print_queue_resume(const struct auth_serversupplied_info *server_info,
Purge a queue - implemented by deleting all jobs that we can delete.
****************************************************************************/
-WERROR print_queue_purge(const struct auth_serversupplied_info *server_info,
+WERROR print_queue_purge(const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx, int snum)
{
print_queue_struct *queue;
diff --git a/source3/rpc_client/cli_winreg_int.c b/source3/rpc_client/cli_winreg_int.c
index edb622dcef..6216a60f7c 100644
--- a/source3/rpc_client/cli_winreg_int.c
+++ b/source3/rpc_client/cli_winreg_int.c
@@ -85,7 +85,7 @@ static WERROR _split_hive_key(TALLOC_CTX *mem_ctx,
}
static NTSTATUS _winreg_int_openkey(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
struct dcerpc_binding_handle **h,
uint32_t reg_type,
@@ -239,7 +239,7 @@ static NTSTATUS _winreg_int_openkey(TALLOC_CTX *mem_ctx,
}
NTSTATUS dcerpc_winreg_int_openkey(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *server_info,
+ const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx,
struct dcerpc_binding_handle **h,
const char *key,
@@ -296,7 +296,7 @@ NTSTATUS dcerpc_winreg_int_openkey(TALLOC_CTX *mem_ctx,
}
NTSTATUS dcerpc_winreg_int_hklm_openkey(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *server_info,
+ const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx,
struct dcerpc_binding_handle **h,
const char *key,
diff --git a/source3/rpc_client/cli_winreg_int.h b/source3/rpc_client/cli_winreg_int.h
index 6e9d07f95c..12d0b890fc 100644
--- a/source3/rpc_client/cli_winreg_int.h
+++ b/source3/rpc_client/cli_winreg_int.h
@@ -22,7 +22,7 @@
#ifndef CLI_WINREG_INT_H
#define CLI_WINREG_INT_H
-struct auth_serversupplied_info;
+struct auth3_session_info;
struct dcerpc_binding_handle;
/**
@@ -52,7 +52,7 @@ struct dcerpc_binding_handle;
* code if something gone wrong.
*/
NTSTATUS dcerpc_winreg_int_openkey(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *server_info,
+ const struct auth3_session_info *server_info,
struct messaging_context *msg_ctx,
struct dcerpc_binding_handle **h,
const char *key,
@@ -88,7 +88,7 @@ NTSTATUS dcerpc_winreg_int_openkey(TALLOC_CTX *mem_ctx,
* code if something gone wrong.
*/
NTSTATUS dcerpc_winreg_int_hklm_openkey(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
struct dcerpc_binding_handle **h,
const char *key,
diff --git a/source3/rpc_server/dcesrv_gssapi.c b/source3/rpc_server/dcesrv_gssapi.c
index bb1e91d870..df1361b958 100644
--- a/source3/rpc_server/dcesrv_gssapi.c
+++ b/source3/rpc_server/dcesrv_gssapi.c
@@ -105,7 +105,7 @@ NTSTATUS gssapi_server_check_flags(struct gse_context *gse_ctx)
NTSTATUS gssapi_server_get_user_info(struct gse_context *gse_ctx,
TALLOC_CTX *mem_ctx,
const struct tsocket_address *remote_address,
- struct auth_serversupplied_info **server_info)
+ struct auth3_session_info **session_info)
{
TALLOC_CTX *tmp_ctx;
DATA_BLOB pac_blob;
@@ -209,7 +209,7 @@ NTSTATUS gssapi_server_get_user_info(struct gse_context *gse_ctx,
status = make_session_info_krb5(mem_ctx,
ntuser, ntdomain, username, pw,
logon_info, is_guest, is_mapped, NULL /* No session key for now */,
- server_info);
+ session_info);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(1, ("Failed to map kerberos pac to server info (%s)\n",
nt_errstr(status)));
diff --git a/source3/rpc_server/dcesrv_gssapi.h b/source3/rpc_server/dcesrv_gssapi.h
index 9cd456f9c1..79244976cc 100644
--- a/source3/rpc_server/dcesrv_gssapi.h
+++ b/source3/rpc_server/dcesrv_gssapi.h
@@ -37,6 +37,6 @@ NTSTATUS gssapi_server_check_flags(struct gse_context *gse_ctx);
NTSTATUS gssapi_server_get_user_info(struct gse_context *gse_ctx,
TALLOC_CTX *mem_ctx,
const struct tsocket_address *remote_address,
- struct auth_serversupplied_info **session_info);
+ struct auth3_session_info **session_info);
#endif /* _DCESRV_GSSAPI_H_ */
diff --git a/source3/rpc_server/dcesrv_ntlmssp.c b/source3/rpc_server/dcesrv_ntlmssp.c
index 8c9484649a..46ab8feddf 100644
--- a/source3/rpc_server/dcesrv_ntlmssp.c
+++ b/source3/rpc_server/dcesrv_ntlmssp.c
@@ -116,7 +116,7 @@ NTSTATUS ntlmssp_server_check_flags(struct auth_ntlmssp_state *ctx,
NTSTATUS ntlmssp_server_get_user_info(struct auth_ntlmssp_state *ctx,
TALLOC_CTX *mem_ctx,
- struct auth_serversupplied_info **session_info)
+ struct auth3_session_info **session_info)
{
NTSTATUS status;
diff --git a/source3/rpc_server/dcesrv_ntlmssp.h b/source3/rpc_server/dcesrv_ntlmssp.h
index 0c830f3da4..bd36e01481 100644
--- a/source3/rpc_server/dcesrv_ntlmssp.h
+++ b/source3/rpc_server/dcesrv_ntlmssp.h
@@ -38,6 +38,6 @@ NTSTATUS ntlmssp_server_check_flags(struct auth_ntlmssp_state *ctx,
bool do_sign, bool do_seal);
NTSTATUS ntlmssp_server_get_user_info(struct auth_ntlmssp_state *ctx,
TALLOC_CTX *mem_ctx,
- struct auth_serversupplied_info **session_info);
+ struct auth3_session_info **session_info);
#endif /* _DCESRV_NTLMSSP_H_ */
diff --git a/source3/rpc_server/epmapper/srv_epmapper.c b/source3/rpc_server/epmapper/srv_epmapper.c
index 0d3ed115f8..8e049fcb24 100644
--- a/source3/rpc_server/epmapper/srv_epmapper.c
+++ b/source3/rpc_server/epmapper/srv_epmapper.c
@@ -232,7 +232,7 @@ static uint32_t build_ep_list(TALLOC_CTX *mem_ctx,
return total;
}
-static bool is_priviledged_pipe(struct auth_serversupplied_info *info) {
+static bool is_priviledged_pipe(struct auth3_session_info *info) {
/* If the user is not root, or has the system token, fail */
if ((info->utok.uid != sec_initial_uid()) &&
!security_token_is_system(info->security_token)) {
diff --git a/source3/rpc_server/netlogon/srv_netlog_nt.c b/source3/rpc_server/netlogon/srv_netlog_nt.c
index cabc7088ee..82f8331995 100644
--- a/source3/rpc_server/netlogon/srv_netlog_nt.c
+++ b/source3/rpc_server/netlogon/srv_netlog_nt.c
@@ -650,7 +650,7 @@ static NTSTATUS get_md4pw(struct samr_Password *md4pw, const char *mach_acct,
struct dom_sid *domain_sid;
uint32_t acct_ctrl;
union samr_UserInfo *info;
- struct auth_serversupplied_info *session_info;
+ struct auth3_session_info *session_info;
int rc;
#if 0
@@ -1100,7 +1100,7 @@ static NTSTATUS netr_creds_server_step_check(struct pipes_struct *p,
*************************************************************************/
static NTSTATUS netr_set_machine_account_password(TALLOC_CTX *mem_ctx,
- struct auth_serversupplied_info *session_info,
+ struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *account_name,
struct samr_Password *nt_hash)
diff --git a/source3/rpc_server/rpc_ncacn_np.c b/source3/rpc_server/rpc_ncacn_np.c
index 68d2ebc668..0fa8e83329 100644
--- a/source3/rpc_server/rpc_ncacn_np.c
+++ b/source3/rpc_server/rpc_ncacn_np.c
@@ -123,7 +123,7 @@ int close_internal_rpc_pipe_hnd(struct pipes_struct *p)
struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
const struct ndr_syntax_id *syntax,
const struct tsocket_address *remote_address,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx)
{
struct pipes_struct *p;
@@ -154,7 +154,7 @@ struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
return NULL;
}
- p->session_info = copy_serverinfo(p, session_info);
+ p->session_info = copy_session_info(p, session_info);
if (p->session_info == NULL) {
DEBUG(0, ("open_rpc_pipe_p: copy_serverinfo failed\n"));
close_policy_by_pipe(p);
@@ -456,7 +456,7 @@ static NTSTATUS rpcint_binding_handle_ex(TALLOC_CTX *mem_ctx,
const struct ndr_syntax_id *abstract_syntax,
const struct ndr_interface_table *ndr_table,
const struct tsocket_address *remote_address,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
struct dcerpc_binding_handle **binding_handle)
{
@@ -524,7 +524,7 @@ static NTSTATUS rpcint_binding_handle_ex(TALLOC_CTX *mem_ctx,
NTSTATUS rpcint_binding_handle(TALLOC_CTX *mem_ctx,
const struct ndr_interface_table *ndr_table,
const struct tsocket_address *remote_address,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
struct dcerpc_binding_handle **binding_handle)
{
@@ -559,7 +559,7 @@ NTSTATUS rpcint_binding_handle(TALLOC_CTX *mem_ctx,
*/
static NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx,
const struct ndr_syntax_id *abstract_syntax,
- const struct auth_serversupplied_info *serversupplied_info,
+ const struct auth3_session_info *session_info,
const struct tsocket_address *remote_address,
struct messaging_context *msg_ctx,
struct rpc_pipe_client **presult)
@@ -599,7 +599,7 @@ static NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx,
abstract_syntax,
NULL,
remote_address,
- serversupplied_info,
+ session_info,
msg_ctx,
&result->binding_handle);
if (!NT_STATUS_IS_OK(status)) {
@@ -620,7 +620,7 @@ struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx,
const char *pipe_name,
const struct tsocket_address *local_address,
const struct tsocket_address *remote_address,
- const struct auth_serversupplied_info *session_info)
+ const struct auth3_session_info *session_info)
{
struct np_proxy_state *result;
char *socket_np_dir;
@@ -760,7 +760,7 @@ struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx,
static NTSTATUS rpc_pipe_open_external(TALLOC_CTX *mem_ctx,
const char *pipe_name,
const struct ndr_syntax_id *abstract_syntax,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct rpc_pipe_client **_result)
{
struct tsocket_address *local, *remote;
@@ -886,7 +886,7 @@ done:
NTSTATUS rpc_pipe_open_interface(TALLOC_CTX *mem_ctx,
const struct ndr_syntax_id *syntax,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
const struct tsocket_address *remote_address,
struct messaging_context *msg_ctx,
struct rpc_pipe_client **cli_pipe)
diff --git a/source3/rpc_server/rpc_ncacn_np.h b/source3/rpc_server/rpc_ncacn_np.h
index 8d3a21e414..cab1ee091e 100644
--- a/source3/rpc_server/rpc_ncacn_np.h
+++ b/source3/rpc_server/rpc_ncacn_np.h
@@ -36,22 +36,22 @@ struct np_proxy_state {
struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
const struct ndr_syntax_id *syntax,
const struct tsocket_address *remote_address,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx);
struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx,
const char *pipe_name,
const struct tsocket_address *local_address,
const struct tsocket_address *remote_address,
- const struct auth_serversupplied_info *session_info);
+ const struct auth3_session_info *session_info);
NTSTATUS rpcint_binding_handle(TALLOC_CTX *mem_ctx,
const struct ndr_interface_table *ndr_table,
const struct tsocket_address *remote_address,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
struct dcerpc_binding_handle **binding_handle);
NTSTATUS rpc_pipe_open_interface(TALLOC_CTX *mem_ctx,
const struct ndr_syntax_id *syntax,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
const struct tsocket_address *remote_address,
struct messaging_context *msg_ctx,
struct rpc_pipe_client **cli_pipe);
diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c
index 418a44a277..7733b3819f 100644
--- a/source3/rpc_server/rpc_server.c
+++ b/source3/rpc_server/rpc_server.c
@@ -39,7 +39,7 @@ static NTSTATUS auth_anonymous_session_info(TALLOC_CTX *mem_ctx,
struct auth_session_info **session_info)
{
struct auth_session_info *i;
- struct auth_serversupplied_info *s;
+ struct auth3_session_info *s;
struct auth_user_info_dc *u;
union netr_Validation val;
NTSTATUS status;
@@ -49,7 +49,7 @@ static NTSTATUS auth_anonymous_session_info(TALLOC_CTX *mem_ctx,
return NT_STATUS_NO_MEMORY;
}
- status = make_server_info_guest(i, &s);
+ status = make_session_info_guest(i, &s);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index 0bf678780b..6d62bcb526 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -554,7 +554,7 @@ static void prune_printername_cache(void)
****************************************************************************/
static WERROR set_printer_hnd_name(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
struct printer_handle *Printer,
const char *handlename)
@@ -1536,7 +1536,7 @@ void do_drv_upgrade_printer(struct messaging_context *msg,
DATA_BLOB *data)
{
TALLOC_CTX *tmp_ctx;
- struct auth_serversupplied_info *session_info = NULL;
+ struct auth3_session_info *session_info = NULL;
struct spoolss_PrinterInfo2 *pinfo2;
NTSTATUS status;
WERROR result;
@@ -3887,7 +3887,7 @@ static void compose_devicemode_devicename(struct spoolss_DeviceMode *dm,
********************************************************************/
static WERROR construct_printer_info0(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
struct spoolss_PrinterInfo2 *info2,
const char *servername,
@@ -4230,7 +4230,7 @@ static WERROR construct_printer_info7(TALLOC_CTX *mem_ctx,
struct spoolss_PrinterInfo7 *r,
int snum)
{
- struct auth_serversupplied_info *session_info;
+ struct auth3_session_info *session_info;
struct GUID guid;
NTSTATUS status;
@@ -4299,7 +4299,7 @@ static bool snum_is_shared_printer(int snum)
********************************************************************/
static WERROR enum_all_printers_info_level(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *servername,
uint32_t level,
@@ -4420,7 +4420,7 @@ static WERROR enum_all_printers_info_level(TALLOC_CTX *mem_ctx,
********************************************************************/
static WERROR enumprinters_level0(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
uint32_t flags,
const char *servername,
@@ -4438,7 +4438,7 @@ static WERROR enumprinters_level0(TALLOC_CTX *mem_ctx,
********************************************************************/
static WERROR enum_all_printers_info_1(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *servername,
uint32_t flags,
@@ -4456,7 +4456,7 @@ static WERROR enum_all_printers_info_1(TALLOC_CTX *mem_ctx,
*********************************************************************/
static WERROR enum_all_printers_info_1_local(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *servername,
union spoolss_PrinterInfo **info,
@@ -4473,7 +4473,7 @@ static WERROR enum_all_printers_info_1_local(TALLOC_CTX *mem_ctx,
*********************************************************************/
static WERROR enum_all_printers_info_1_name(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *servername,
union spoolss_PrinterInfo **info,
@@ -4500,7 +4500,7 @@ static WERROR enum_all_printers_info_1_name(TALLOC_CTX *mem_ctx,
*********************************************************************/
static WERROR enum_all_printers_info_1_network(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *servername,
union spoolss_PrinterInfo **info,
@@ -4537,7 +4537,7 @@ static WERROR enum_all_printers_info_1_network(TALLOC_CTX *mem_ctx,
********************************************************************/
static WERROR enum_all_printers_info_2(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *servername,
union spoolss_PrinterInfo **info,
@@ -4554,7 +4554,7 @@ static WERROR enum_all_printers_info_2(TALLOC_CTX *mem_ctx,
********************************************************************/
static WERROR enumprinters_level1(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
uint32_t flags,
const char *servername,
@@ -4588,7 +4588,7 @@ static WERROR enumprinters_level1(TALLOC_CTX *mem_ctx,
********************************************************************/
static WERROR enumprinters_level2(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
uint32_t flags,
const char *servername,
@@ -4624,7 +4624,7 @@ static WERROR enumprinters_level2(TALLOC_CTX *mem_ctx,
********************************************************************/
static WERROR enumprinters_level4(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
uint32_t flags,
const char *servername,
@@ -4643,7 +4643,7 @@ static WERROR enumprinters_level4(TALLOC_CTX *mem_ctx,
********************************************************************/
static WERROR enumprinters_level5(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
uint32_t flags,
const char *servername,
@@ -4663,7 +4663,7 @@ static WERROR enumprinters_level5(TALLOC_CTX *mem_ctx,
WERROR _spoolss_EnumPrinters(struct pipes_struct *p,
struct spoolss_EnumPrinters *r)
{
- const struct auth_serversupplied_info *session_info = get_session_info_system();
+ const struct auth3_session_info *session_info = get_session_info_system();
WERROR result;
/* that's an [in out] buffer */
@@ -5533,7 +5533,7 @@ static WERROR fill_printer_driver_info101(TALLOC_CTX *mem_ctx,
********************************************************************/
static WERROR construct_printer_driver_info_level(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
uint32_t level,
union spoolss_DriverInfo *r,
@@ -5908,7 +5908,7 @@ WERROR _spoolss_WritePrinter(struct pipes_struct *p,
static WERROR control_printer(struct policy_handle *handle, uint32_t command,
struct pipes_struct *p)
{
- const struct auth_serversupplied_info *session_info = p->session_info;
+ const struct auth3_session_info *session_info = p->session_info;
int snum;
WERROR errcode = WERR_BADFUNC;
struct printer_handle *Printer = find_printer_index_by_hnd(p, handle);
@@ -6271,7 +6271,7 @@ static bool add_printer_hook(TALLOC_CTX *ctx, struct security_token *token,
}
static WERROR update_dsspooler(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
int snum,
struct spoolss_SetPrinterInfo2 *printer,
@@ -7248,7 +7248,7 @@ static WERROR spoolss_setjob_1(TALLOC_CTX *mem_ctx,
WERROR _spoolss_SetJob(struct pipes_struct *p,
struct spoolss_SetJob *r)
{
- const struct auth_serversupplied_info *session_info = p->session_info;
+ const struct auth3_session_info *session_info = p->session_info;
int snum;
WERROR errcode = WERR_BADFUNC;
@@ -7319,7 +7319,7 @@ WERROR _spoolss_SetJob(struct pipes_struct *p,
****************************************************************************/
static WERROR enumprinterdrivers_level_by_architecture(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *servername,
const char *architecture,
@@ -7445,7 +7445,7 @@ static WERROR enumprinterdrivers_level_by_architecture(TALLOC_CTX *mem_ctx,
****************************************************************************/
static WERROR enumprinterdrivers_level(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *servername,
const char *architecture,
diff --git a/source3/rpc_server/spoolss/srv_spoolss_util.c b/source3/rpc_server/spoolss/srv_spoolss_util.c
index c1485de741..386ecb776b 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_util.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_util.c
@@ -28,7 +28,7 @@
#include "rpc_client/cli_winreg_spoolss.h"
WERROR winreg_printer_binding_handle(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
struct dcerpc_binding_handle **winreg_binding_handle)
{
@@ -61,7 +61,7 @@ WERROR winreg_printer_binding_handle(TALLOC_CTX *mem_ctx,
}
WERROR winreg_delete_printer_key_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *printer,
const char *key)
@@ -78,7 +78,7 @@ WERROR winreg_delete_printer_key_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_printer_update_changeid_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *printer)
{
@@ -93,7 +93,7 @@ WERROR winreg_printer_update_changeid_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_printer_get_changeid_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *printer,
uint32_t *pchangeid)
@@ -110,7 +110,7 @@ WERROR winreg_printer_get_changeid_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_get_printer_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *printer,
struct spoolss_PrinterInfo2 **pinfo2)
@@ -128,7 +128,7 @@ WERROR winreg_get_printer_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_create_printer_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *sharename)
{
@@ -143,7 +143,7 @@ WERROR winreg_create_printer_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_update_printer_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *sharename,
uint32_t info2_mask,
@@ -166,7 +166,7 @@ WERROR winreg_update_printer_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_set_printer_dataex_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *printer,
const char *key,
@@ -191,7 +191,7 @@ WERROR winreg_set_printer_dataex_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_enum_printer_dataex_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *printer,
const char *key,
@@ -212,7 +212,7 @@ WERROR winreg_enum_printer_dataex_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_get_printer_dataex_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *printer,
const char *key,
@@ -237,7 +237,7 @@ WERROR winreg_get_printer_dataex_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_delete_printer_dataex_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *printer,
const char *key,
@@ -256,7 +256,7 @@ WERROR winreg_delete_printer_dataex_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_get_driver_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *architecture,
const char *driver_name,
@@ -277,7 +277,7 @@ WERROR winreg_get_driver_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_get_driver_list_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *architecture,
uint32_t version,
@@ -298,7 +298,7 @@ WERROR winreg_get_driver_list_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_del_driver_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
struct spoolss_DriverInfo8 *info8,
uint32_t version)
@@ -315,7 +315,7 @@ WERROR winreg_del_driver_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_add_driver_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
struct spoolss_AddDriverInfoCtr *r,
const char **driver_name,
@@ -334,7 +334,7 @@ WERROR winreg_add_driver_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_get_printer_secdesc_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *sharename,
struct spoolss_security_descriptor **psecdesc)
@@ -351,7 +351,7 @@ WERROR winreg_get_printer_secdesc_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_set_printer_secdesc_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *sharename,
const struct spoolss_security_descriptor *secdesc)
@@ -368,7 +368,7 @@ WERROR winreg_set_printer_secdesc_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_printer_enumforms1_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
uint32_t *pnum_info,
union spoolss_FormInfo **pinfo)
@@ -385,7 +385,7 @@ WERROR winreg_printer_enumforms1_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_printer_getform1_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *form_name,
struct spoolss_FormInfo1 *r)
@@ -402,7 +402,7 @@ WERROR winreg_printer_getform1_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_printer_addform1_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
struct spoolss_AddFormInfo1 *form)
{
@@ -417,7 +417,7 @@ WERROR winreg_printer_addform1_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_printer_setform1_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *form_name,
struct spoolss_AddFormInfo1 *form)
@@ -434,7 +434,7 @@ WERROR winreg_printer_setform1_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_printer_deleteform1_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *form_name)
{
@@ -449,7 +449,7 @@ WERROR winreg_printer_deleteform1_internal(TALLOC_CTX *mem_ctx,
}
WERROR winreg_enum_printer_key_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *printer,
const char *key,
diff --git a/source3/rpc_server/spoolss/srv_spoolss_util.h b/source3/rpc_server/spoolss/srv_spoolss_util.h
index 2ae3a60499..74d80c83a6 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_util.h
+++ b/source3/rpc_server/spoolss/srv_spoolss_util.h
@@ -22,39 +22,39 @@
#ifndef _SRV_SPOOLSS_UITL_H
#define _SRV_SPOOLSS_UITL_H
-struct auth_serversupplied_info;
+struct auth3_session_info;
struct dcerpc_binding_handle;
WERROR winreg_printer_binding_handle(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
struct dcerpc_binding_handle **winreg_binding_handle);
WERROR winreg_delete_printer_key_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *printer,
const char *key);
WERROR winreg_printer_update_changeid_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *printer);
WERROR winreg_printer_get_changeid_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *printer,
uint32_t *pchangeid);
WERROR winreg_get_printer_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *printer,
struct spoolss_PrinterInfo2 **pinfo2);
WERROR winreg_create_printer_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *sharename);
WERROR winreg_update_printer_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *sharename,
uint32_t info2_mask,
@@ -62,7 +62,7 @@ WERROR winreg_update_printer_internal(TALLOC_CTX *mem_ctx,
struct spoolss_DeviceMode *devmode,
struct security_descriptor *secdesc);
WERROR winreg_set_printer_dataex_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *printer,
const char *key,
@@ -71,14 +71,14 @@ WERROR winreg_set_printer_dataex_internal(TALLOC_CTX *mem_ctx,
uint8_t *data,
uint32_t data_size);
WERROR winreg_enum_printer_dataex_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *printer,
const char *key,
uint32_t *pnum_values,
struct spoolss_PrinterEnumValues **penum_values);
WERROR winreg_get_printer_dataex_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *printer,
const char *key,
@@ -87,71 +87,71 @@ WERROR winreg_get_printer_dataex_internal(TALLOC_CTX *mem_ctx,
uint8_t **data,
uint32_t *data_size);
WERROR winreg_delete_printer_dataex_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *printer,
const char *key,
const char *value);
WERROR winreg_get_driver_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *architecture,
const char *driver_name,
uint32_t driver_version,
struct spoolss_DriverInfo8 **_info8);
WERROR winreg_get_driver_list_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *architecture,
uint32_t version,
uint32_t *num_drivers,
const char ***drivers_p);
WERROR winreg_del_driver_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
struct spoolss_DriverInfo8 *info8,
uint32_t version);
WERROR winreg_add_driver_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
struct spoolss_AddDriverInfoCtr *r,
const char **driver_name,
uint32_t *driver_version);
WERROR winreg_get_printer_secdesc_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *sharename,
struct spoolss_security_descriptor **psecdesc);
WERROR winreg_set_printer_secdesc_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *sharename,
const struct spoolss_security_descriptor *secdesc);
WERROR winreg_printer_enumforms1_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
uint32_t *pnum_info,
union spoolss_FormInfo **pinfo);
WERROR winreg_printer_getform1_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *form_name,
struct spoolss_FormInfo1 *r);
WERROR winreg_printer_addform1_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
struct spoolss_AddFormInfo1 *form);
WERROR winreg_printer_setform1_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *form_name,
struct spoolss_AddFormInfo1 *form);
WERROR winreg_printer_deleteform1_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *form_name);
WERROR winreg_enum_printer_key_internal(TALLOC_CTX *mem_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
const char *printer,
const char *key,
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 5b2dcfdddb..ec87782634 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -626,7 +626,7 @@ static bool pipe_ntlmssp_auth_bind(struct pipes_struct *p,
static bool pipe_ntlmssp_verify_final(TALLOC_CTX *mem_ctx,
struct auth_ntlmssp_state *ntlmssp_ctx,
enum dcerpc_AuthLevel auth_level,
- struct auth_serversupplied_info **session_info)
+ struct auth3_session_info **session_info)
{
NTSTATUS status;
bool ret;
@@ -723,7 +723,7 @@ err:
static NTSTATUS pipe_gssapi_verify_final(TALLOC_CTX *mem_ctx,
struct gse_context *gse_ctx,
const struct tsocket_address *remote_address,
- struct auth_serversupplied_info **session_info)
+ struct auth3_session_info **session_info)
{
NTSTATUS status;
bool bret;
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c
index b6ee6a89dd..afde88b4c9 100644
--- a/source3/rpc_server/srv_pipe_hnd.c
+++ b/source3/rpc_server/srv_pipe_hnd.c
@@ -411,7 +411,7 @@ bool fsp_is_np(struct files_struct *fsp)
NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name,
const struct tsocket_address *local_address,
const struct tsocket_address *remote_address,
- struct auth_serversupplied_info *session_info,
+ struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
struct fake_file_handle **phandle)
{
diff --git a/source3/rpc_server/srv_pipe_hnd.h b/source3/rpc_server/srv_pipe_hnd.h
index 13c70cf513..12ce272f43 100644
--- a/source3/rpc_server/srv_pipe_hnd.h
+++ b/source3/rpc_server/srv_pipe_hnd.h
@@ -31,7 +31,7 @@ bool fsp_is_np(struct files_struct *fsp);
NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name,
const struct tsocket_address *local_address,
const struct tsocket_address *remote_address,
- struct auth_serversupplied_info *session_info,
+ struct auth3_session_info *session_info,
struct messaging_context *msg_ctx,
struct fake_file_handle **phandle);
bool np_read_in_progress(struct fake_file_handle *handle);
diff --git a/source3/rpc_server/svcctl/srv_svcctl_nt.c b/source3/rpc_server/svcctl/srv_svcctl_nt.c
index 004aff4486..2a96f58f3c 100644
--- a/source3/rpc_server/svcctl/srv_svcctl_nt.c
+++ b/source3/rpc_server/svcctl/srv_svcctl_nt.c
@@ -409,7 +409,7 @@ WERROR _svcctl_QueryServiceStatus(struct pipes_struct *p,
static int enumerate_status(TALLOC_CTX *ctx,
struct messaging_context *msg_ctx,
- struct auth_serversupplied_info *session_info,
+ struct auth3_session_info *session_info,
struct ENUM_SERVICE_STATUSW **status)
{
int num_services = 0;
@@ -670,7 +670,7 @@ WERROR _svcctl_QueryServiceStatusEx(struct pipes_struct *p,
static WERROR fill_svc_config(TALLOC_CTX *mem_ctx,
struct messaging_context *msg_ctx,
- struct auth_serversupplied_info *session_info,
+ struct auth3_session_info *session_info,
const char *name,
struct QUERY_SERVICE_CONFIG *config)
{
diff --git a/source3/services/svc_winreg_glue.c b/source3/services/svc_winreg_glue.c
index 06f3f9195f..c4cd46d70d 100644
--- a/source3/services/svc_winreg_glue.c
+++ b/source3/services/svc_winreg_glue.c
@@ -77,7 +77,7 @@ struct security_descriptor* svcctl_gen_service_sd(TALLOC_CTX *mem_ctx)
struct security_descriptor *svcctl_get_secdesc(TALLOC_CTX *mem_ctx,
struct messaging_context *msg_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
const char *name)
{
struct dcerpc_binding_handle *h = NULL;
@@ -147,7 +147,7 @@ done:
}
bool svcctl_set_secdesc(struct messaging_context *msg_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
const char *name,
struct security_descriptor *sd)
{
@@ -259,7 +259,7 @@ done:
const char *svcctl_get_string_value(TALLOC_CTX *mem_ctx,
struct messaging_context *msg_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
const char *key_name,
const char *value_name)
{
@@ -321,7 +321,7 @@ done:
const char *svcctl_lookup_dispname(TALLOC_CTX *mem_ctx,
struct messaging_context *msg_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
const char *name)
{
const char *display_name = NULL;
@@ -344,7 +344,7 @@ const char *svcctl_lookup_dispname(TALLOC_CTX *mem_ctx,
const char *svcctl_lookup_description(TALLOC_CTX *mem_ctx,
struct messaging_context *msg_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
const char *name)
{
const char *description = NULL;
diff --git a/source3/services/svc_winreg_glue.h b/source3/services/svc_winreg_glue.h
index 4ff9e27c40..e17d6692dc 100644
--- a/source3/services/svc_winreg_glue.h
+++ b/source3/services/svc_winreg_glue.h
@@ -24,34 +24,34 @@
#ifndef SVC_WINREG_GLUE_H
#define SVC_WINREG_GLUE_H
-struct auth_serversupplied_info;
+struct auth3_session_info;
struct security_descriptor* svcctl_gen_service_sd(TALLOC_CTX *mem_ctx);
struct security_descriptor *svcctl_get_secdesc(TALLOC_CTX *mem_ctx,
struct messaging_context *msg_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
const char *name);
bool svcctl_set_secdesc(struct messaging_context *msg_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
const char *name,
struct security_descriptor *sd);
const char *svcctl_get_string_value(TALLOC_CTX *mem_ctx,
struct messaging_context *msg_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
const char *key_name,
const char *value_name);
const char *svcctl_lookup_dispname(TALLOC_CTX *mem_ctx,
struct messaging_context *msg_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
const char *name);
const char *svcctl_lookup_description(TALLOC_CTX *mem_ctx,
struct messaging_context *msg_ctx,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
const char *name);
#endif /* SVC_WINREG_GLUE_H */
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index 911a86a15f..c7bf239a36 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -422,7 +422,7 @@ struct smbd_smb2_session {
NTSTATUS status;
uint64_t vuid;
struct auth_ntlmssp_state *auth_ntlmssp_state;
- struct auth_serversupplied_info *session_info;
+ struct auth3_session_info *session_info;
DATA_BLOB session_key;
bool do_signing;
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index 4629a39aa3..25a82cdbb0 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -225,7 +225,7 @@ NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
connection_struct **pconn,
int snum,
const char *path,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
char **poldcwd)
{
connection_struct *conn;
@@ -266,7 +266,7 @@ NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
conn->sconn->num_tcons_open++;
if (session_info != NULL) {
- conn->session_info = copy_serverinfo(conn, session_info);
+ conn->session_info = copy_session_info(conn, session_info);
if (conn->session_info == NULL) {
DEBUG(0, ("copy_serverinfo failed\n"));
TALLOC_FREE(conn);
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 6a3b6ddf2f..f32989da54 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -263,7 +263,7 @@ int register_homes_share(const char *username)
int register_existing_vuid(struct smbd_server_connection *sconn,
uint16 vuid,
- struct auth_serversupplied_info *session_info,
+ struct auth3_session_info *session_info,
DATA_BLOB response_blob,
const char *smb_name)
{
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index ae63f0adf2..f3b54e7221 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -478,7 +478,7 @@ NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
connection_struct **pconn,
int snum,
const char *path,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
char **poldcwd);
/* The following definitions come from smbd/negprot.c */
@@ -711,7 +711,7 @@ int register_initial_vuid(struct smbd_server_connection *sconn);
int register_homes_share(const char *username);
int register_existing_vuid(struct smbd_server_connection *sconn,
uint16 vuid,
- struct auth_serversupplied_info *session_info,
+ struct auth3_session_info *session_info,
DATA_BLOB response_blob,
const char *smb_name);
void add_session_user(struct smbd_server_connection *sconn, const char *user);
@@ -1009,7 +1009,7 @@ int list_sessions(TALLOC_CTX *mem_ctx, struct sessionid **session_list);
/* The following definitions come from smbd/sesssetup.c */
NTSTATUS do_map_to_guest(NTSTATUS status,
- struct auth_serversupplied_info **session_info,
+ struct auth3_session_info **session_info,
const char *user, const char *domain);
NTSTATUS parse_spnego_mechanisms(TALLOC_CTX *ctx,
@@ -1108,10 +1108,10 @@ void reply_transs2(struct smb_request *req);
bool change_to_guest(void);
bool change_to_user(connection_struct *conn, uint16 vuid);
bool change_to_user_by_session(connection_struct *conn,
- const struct auth_serversupplied_info *session_info);
+ const struct auth3_session_info *session_info);
bool change_to_root_user(void);
bool smbd_change_to_root_user(void);
-bool become_authenticated_pipe_user(struct auth_serversupplied_info *session_info);
+bool become_authenticated_pipe_user(struct auth3_session_info *session_info);
bool unbecome_authenticated_pipe_user(void);
void become_root(void);
void unbecome_root(void);
@@ -1119,7 +1119,7 @@ void smbd_become_root(void);
void smbd_unbecome_root(void);
bool become_user(connection_struct *conn, uint16 vuid);
bool become_user_by_session(connection_struct *conn,
- const struct auth_serversupplied_info *session_info);
+ const struct auth3_session_info *session_info);
bool unbecome_user(void);
uid_t get_current_uid(connection_struct *conn);
gid_t get_current_gid(connection_struct *conn);
diff --git a/source3/smbd/server_reload.c b/source3/smbd/server_reload.c
index 259a963abf..1242aae673 100644
--- a/source3/smbd/server_reload.c
+++ b/source3/smbd/server_reload.c
@@ -37,7 +37,7 @@
void reload_printers(struct tevent_context *ev,
struct messaging_context *msg_ctx)
{
- struct auth_serversupplied_info *session_info = NULL;
+ struct auth3_session_info *session_info = NULL;
struct spoolss_PrinterInfo2 *pinfo2 = NULL;
int snum;
int n_services = lp_numservices();
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index 5c410be02a..c772b8a069 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -373,22 +373,22 @@ static NTSTATUS find_forced_group(bool force_user,
}
/****************************************************************************
- Create an auth_serversupplied_info structure for a connection_struct
+ Create an auth3_session_info structure for a connection_struct
****************************************************************************/
static NTSTATUS create_connection_session_info(struct smbd_server_connection *sconn,
TALLOC_CTX *mem_ctx, int snum,
- struct auth_serversupplied_info *vuid_serverinfo,
+ struct auth3_session_info *vuid_serverinfo,
DATA_BLOB password,
- struct auth_serversupplied_info **presult)
+ struct auth3_session_info **presult)
{
if (lp_guest_only(snum)) {
- return make_server_info_guest(mem_ctx, presult);
+ return make_session_info_guest(mem_ctx, presult);
}
if (vuid_serverinfo != NULL) {
- struct auth_serversupplied_info *result;
+ struct auth3_session_info *result;
/*
* This is the normal security != share case where we have a
@@ -414,7 +414,7 @@ static NTSTATUS create_connection_session_info(struct smbd_server_connection *sc
}
}
- result = copy_serverinfo(mem_ctx, vuid_serverinfo);
+ result = copy_session_info(mem_ctx, vuid_serverinfo);
if (result == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -466,7 +466,7 @@ NTSTATUS set_conn_force_user_group(connection_struct *conn, int snum)
*/
char *fuser;
- struct auth_serversupplied_info *forced_serverinfo;
+ struct auth3_session_info *forced_serverinfo;
fuser = talloc_string_sub(conn, lp_force_user(snum), "%S",
lp_const_servicename(snum));
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 74d9e1cebf..694c0874f2 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -49,9 +49,9 @@ struct pending_auth_data {
on a logon error possibly map the error to success if "map to guest"
is set approriately
*/
-NTSTATUS do_map_to_guest(NTSTATUS status,
- struct auth_serversupplied_info **server_info,
- const char *user, const char *domain)
+static NTSTATUS do_map_to_guest_server_info(NTSTATUS status,
+ struct auth_serversupplied_info **server_info,
+ const char *user, const char *domain)
{
user = user ? user : "";
domain = domain ? domain : "";
@@ -76,6 +76,37 @@ NTSTATUS do_map_to_guest(NTSTATUS status,
return status;
}
+/*
+ on a logon error possibly map the error to success if "map to guest"
+ is set approriately
+*/
+NTSTATUS do_map_to_guest(NTSTATUS status,
+ struct auth3_session_info **session_info,
+ const char *user, const char *domain)
+{
+ user = user ? user : "";
+ domain = domain ? domain : "";
+
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NO_SUCH_USER)) {
+ if ((lp_map_to_guest() == MAP_TO_GUEST_ON_BAD_USER) ||
+ (lp_map_to_guest() == MAP_TO_GUEST_ON_BAD_PASSWORD)) {
+ DEBUG(3,("No such user %s [%s] - using guest account\n",
+ user, domain));
+ status = make_session_info_guest(NULL, session_info);
+ }
+ }
+
+ if (NT_STATUS_EQUAL(status, NT_STATUS_WRONG_PASSWORD)) {
+ if (lp_map_to_guest() == MAP_TO_GUEST_ON_BAD_PASSWORD) {
+ DEBUG(3,("Registered username %s for guest access\n",
+ user));
+ status = make_session_info_guest(NULL, session_info);
+ }
+ }
+
+ return status;
+}
+
/****************************************************************************
Add the standard 'Samba' signature to the end of the session setup.
****************************************************************************/
@@ -251,7 +282,7 @@ static void reply_spnego_kerberos(struct smb_request *req,
int sess_vuid = req->vuid;
NTSTATUS ret = NT_STATUS_OK;
DATA_BLOB ap_rep, ap_rep_wrapped, response;
- struct auth_serversupplied_info *session_info = NULL;
+ struct auth3_session_info *session_info = NULL;
DATA_BLOB session_key = data_blob_null;
uint8 tok_id[2];
DATA_BLOB nullblob = data_blob_null;
@@ -456,7 +487,7 @@ static void reply_spnego_ntlmssp(struct smb_request *req,
{
bool do_invalidate = true;
DATA_BLOB response;
- struct auth_serversupplied_info *session_info = NULL;
+ struct auth3_session_info *session_info = NULL;
struct smbd_server_connection *sconn = req->sconn;
if (NT_STATUS_IS_OK(nt_status)) {
@@ -1297,7 +1328,7 @@ void reply_sesssetup_and_X(struct smb_request *req)
const char *primary_domain;
struct auth_usersupplied_info *user_info = NULL;
struct auth_serversupplied_info *server_info = NULL;
- struct auth_serversupplied_info *session_info = NULL;
+ struct auth3_session_info *session_info = NULL;
uint16 smb_flag2 = req->flags2;
NTSTATUS nt_status;
@@ -1635,8 +1666,8 @@ void reply_sesssetup_and_X(struct smb_request *req)
free_user_info(&user_info);
if (!NT_STATUS_IS_OK(nt_status)) {
- nt_status = do_map_to_guest(nt_status, &server_info,
- user, domain);
+ nt_status = do_map_to_guest_server_info(nt_status, &server_info,
+ user, domain);
}
if (!NT_STATUS_IS_OK(nt_status)) {
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c
index 8114144574..5d703e3a18 100644
--- a/source3/smbd/uid.c
+++ b/source3/smbd/uid.c
@@ -87,7 +87,7 @@ static void free_conn_session_info_if_unused(connection_struct *conn)
static bool check_user_ok(connection_struct *conn,
uint16_t vuid,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
int snum)
{
bool valid_vuid = (vuid != UID_FIELD_INVALID);
@@ -158,7 +158,7 @@ static bool check_user_ok(connection_struct *conn,
* username-based faked one.
*/
- ent->session_info = copy_serverinfo(
+ ent->session_info = copy_session_info(
conn, conn->force_user ? conn->session_info : session_info);
if (ent->session_info == NULL) {
@@ -190,7 +190,7 @@ static bool check_user_ok(connection_struct *conn,
****************************************************************************/
static bool change_to_user_internal(connection_struct *conn,
- const struct auth_serversupplied_info *session_info,
+ const struct auth3_session_info *session_info,
uint16_t vuid)
{
int snum;
@@ -277,7 +277,7 @@ static bool change_to_user_internal(connection_struct *conn,
bool change_to_user(connection_struct *conn, uint16_t vuid)
{
- const struct auth_serversupplied_info *session_info = NULL;
+ const struct auth3_session_info *session_info = NULL;
user_struct *vuser;
int snum = SNUM(conn);
@@ -328,7 +328,7 @@ bool change_to_user(connection_struct *conn, uint16_t vuid)
}
bool change_to_user_by_session(connection_struct *conn,
- const struct auth_serversupplied_info *session_info)
+ const struct auth3_session_info *session_info)
{
SMB_ASSERT(conn != NULL);
SMB_ASSERT(session_info != NULL);
@@ -367,7 +367,7 @@ bool smbd_change_to_root_user(void)
user. Doesn't modify current_user.
****************************************************************************/
-bool become_authenticated_pipe_user(struct auth_serversupplied_info *session_info)
+bool become_authenticated_pipe_user(struct auth3_session_info *session_info)
{
if (!push_sec_ctx())
return False;
@@ -487,7 +487,7 @@ bool become_user(connection_struct *conn, uint16 vuid)
}
bool become_user_by_session(connection_struct *conn,
- const struct auth_serversupplied_info *session_info)
+ const struct auth3_session_info *session_info)
{
if (!push_sec_ctx())
return false;
diff --git a/source3/winbindd/winbindd_samr.c b/source3/winbindd/winbindd_samr.c
index 3b9377f729..e3c2e887fa 100644
--- a/source3/winbindd/winbindd_samr.c
+++ b/source3/winbindd/winbindd_samr.c
@@ -43,13 +43,13 @@ static NTSTATUS open_internal_samr_pipe(TALLOC_CTX *mem_ctx,
struct rpc_pipe_client **samr_pipe)
{
struct rpc_pipe_client *cli = NULL;
- struct auth_serversupplied_info *session_info = NULL;
+ struct auth3_session_info *session_info = NULL;
NTSTATUS status;
if (session_info == NULL) {
status = make_session_info_system(mem_ctx, &session_info);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("open_samr_pipe: Could not create auth_serversupplied_info: %s\n",
+ DEBUG(0, ("open_samr_pipe: Could not create auth3_session_info: %s\n",
nt_errstr(status)));
return status;
}
@@ -120,13 +120,13 @@ static NTSTATUS open_internal_lsa_pipe(TALLOC_CTX *mem_ctx,
struct rpc_pipe_client **lsa_pipe)
{
struct rpc_pipe_client *cli = NULL;
- struct auth_serversupplied_info *session_info = NULL;
+ struct auth3_session_info *session_info = NULL;
NTSTATUS status;
if (session_info == NULL) {
status = make_session_info_system(mem_ctx, &session_info);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("open_lsa_pipe: Could not create auth_serversupplied_info: %s\n",
+ DEBUG(0, ("open_lsa_pipe: Could not create auth3_session_info: %s\n",
nt_errstr(status)));
return status;
}