mirror of
https://github.com/samba-team/samba.git
synced 2025-11-07 12:23:51 +03:00
s3-auth Use the common auth_session_info
This patch finally has the same structure being used to describe the authorization data of a user across the whole codebase. This will allow of our session handling to be accomplished with common code. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
This commit is contained in:
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
NTSTATUS auth_ntlmssp_steal_session_info(TALLOC_CTX *mem_ctx,
|
NTSTATUS auth_ntlmssp_steal_session_info(TALLOC_CTX *mem_ctx,
|
||||||
struct auth_ntlmssp_state *auth_ntlmssp_state,
|
struct auth_ntlmssp_state *auth_ntlmssp_state,
|
||||||
struct auth3_session_info **session_info)
|
struct auth_session_info **session_info)
|
||||||
{
|
{
|
||||||
NTSTATUS nt_status = create_local_token(mem_ctx,
|
NTSTATUS nt_status = create_local_token(mem_ctx,
|
||||||
auth_ntlmssp_state->server_info,
|
auth_ntlmssp_state->server_info,
|
||||||
|
|||||||
@@ -457,13 +457,13 @@ static NTSTATUS log_nt_token(struct security_token *token)
|
|||||||
NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
|
NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth_serversupplied_info *server_info,
|
const struct auth_serversupplied_info *server_info,
|
||||||
DATA_BLOB *session_key,
|
DATA_BLOB *session_key,
|
||||||
struct auth3_session_info **session_info_out)
|
struct auth_session_info **session_info_out)
|
||||||
{
|
{
|
||||||
struct security_token *t;
|
struct security_token *t;
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
size_t i;
|
size_t i;
|
||||||
struct dom_sid tmp_sid;
|
struct dom_sid tmp_sid;
|
||||||
struct auth3_session_info *session_info;
|
struct auth_session_info *session_info;
|
||||||
struct wbcUnixId *ids;
|
struct wbcUnixId *ids;
|
||||||
struct auth_user_info_dc *user_info_dc;
|
struct auth_user_info_dc *user_info_dc;
|
||||||
union netr_Validation val;
|
union netr_Validation val;
|
||||||
@@ -474,7 +474,7 @@ NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
|
|||||||
return NT_STATUS_LOGON_FAILURE;
|
return NT_STATUS_LOGON_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
session_info = make_auth3_session_info(mem_ctx);
|
session_info = make_auth_session_info(mem_ctx);
|
||||||
if (!session_info) {
|
if (!session_info) {
|
||||||
return NT_STATUS_NO_MEMORY;
|
return NT_STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
@@ -832,7 +832,7 @@ static NTSTATUS get_guest_info3(TALLOC_CTX *mem_ctx,
|
|||||||
left as-is for now.
|
left as-is for now.
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
static NTSTATUS make_new_session_info_guest(struct auth3_session_info **session_info, struct auth_serversupplied_info **server_info)
|
static NTSTATUS make_new_session_info_guest(struct auth_session_info **session_info, struct auth_serversupplied_info **server_info)
|
||||||
{
|
{
|
||||||
static const char zeros[16] = {0};
|
static const char zeros[16] = {0};
|
||||||
const char *guest_account = lp_guestaccount();
|
const char *guest_account = lp_guestaccount();
|
||||||
@@ -901,7 +901,7 @@ done:
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
static NTSTATUS make_new_session_info_system(TALLOC_CTX *mem_ctx,
|
static NTSTATUS make_new_session_info_system(TALLOC_CTX *mem_ctx,
|
||||||
struct auth3_session_info **session_info)
|
struct auth_session_info **session_info)
|
||||||
{
|
{
|
||||||
struct passwd *pwd;
|
struct passwd *pwd;
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
@@ -935,7 +935,7 @@ static NTSTATUS make_new_session_info_system(TALLOC_CTX *mem_ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Fake a auth3_session_info just from a username (as a
|
Fake a auth_session_info just from a username (as a
|
||||||
session_info structure, with create_local_token() already called on
|
session_info structure, with create_local_token() already called on
|
||||||
it.
|
it.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -943,7 +943,7 @@ static NTSTATUS make_new_session_info_system(TALLOC_CTX *mem_ctx,
|
|||||||
NTSTATUS make_session_info_from_username(TALLOC_CTX *mem_ctx,
|
NTSTATUS make_session_info_from_username(TALLOC_CTX *mem_ctx,
|
||||||
const char *username,
|
const char *username,
|
||||||
bool is_guest,
|
bool is_guest,
|
||||||
struct auth3_session_info **session_info)
|
struct auth_session_info **session_info)
|
||||||
{
|
{
|
||||||
struct auth_serversupplied_info *result;
|
struct auth_serversupplied_info *result;
|
||||||
struct passwd *pwd;
|
struct passwd *pwd;
|
||||||
@@ -985,7 +985,7 @@ NTSTATUS make_session_info_from_username(TALLOC_CTX *mem_ctx,
|
|||||||
* - The 'server_info' parameter allows the missing 'info3' to be copied across.
|
* - The 'server_info' parameter allows the missing 'info3' to be copied across.
|
||||||
*/
|
*/
|
||||||
static struct auth_serversupplied_info *copy_session_info_serverinfo_guest(TALLOC_CTX *mem_ctx,
|
static struct auth_serversupplied_info *copy_session_info_serverinfo_guest(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *src,
|
const struct auth_session_info *src,
|
||||||
struct auth_serversupplied_info *server_info)
|
struct auth_serversupplied_info *server_info)
|
||||||
{
|
{
|
||||||
struct auth_serversupplied_info *dst;
|
struct auth_serversupplied_info *dst;
|
||||||
@@ -1003,7 +1003,7 @@ static struct auth_serversupplied_info *copy_session_info_serverinfo_guest(TALLO
|
|||||||
|
|
||||||
/* This element must be provided to convert back to an
|
/* This element must be provided to convert back to an
|
||||||
* auth_serversupplied_info. This needs to be from hte
|
* auth_serversupplied_info. This needs to be from hte
|
||||||
* auth3_session_info because the group values in particular
|
* auth_session_info because the group values in particular
|
||||||
* may change during create_local_token() processing */
|
* may change during create_local_token() processing */
|
||||||
SMB_ASSERT(src->unix_token);
|
SMB_ASSERT(src->unix_token);
|
||||||
dst->utok.uid = src->unix_token->uid;
|
dst->utok.uid = src->unix_token->uid;
|
||||||
@@ -1057,23 +1057,23 @@ static struct auth_serversupplied_info *copy_session_info_serverinfo_guest(TALLO
|
|||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct auth3_session_info *copy_session_info(TALLOC_CTX *mem_ctx,
|
struct auth_session_info *copy_session_info(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *src)
|
const struct auth_session_info *src)
|
||||||
{
|
{
|
||||||
struct auth3_session_info *dst;
|
struct auth_session_info *dst;
|
||||||
DATA_BLOB blob;
|
DATA_BLOB blob;
|
||||||
enum ndr_err_code ndr_err;
|
enum ndr_err_code ndr_err;
|
||||||
|
|
||||||
ndr_err = ndr_push_struct_blob(
|
ndr_err = ndr_push_struct_blob(
|
||||||
&blob, talloc_tos(), src,
|
&blob, talloc_tos(), src,
|
||||||
(ndr_push_flags_fn_t)ndr_push_auth3_session_info);
|
(ndr_push_flags_fn_t)ndr_push_auth_session_info);
|
||||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||||
DEBUG(0, ("copy_session_info(): ndr_push_auth3_session_info failed: "
|
DEBUG(0, ("copy_session_info(): ndr_push_auth_session_info failed: "
|
||||||
"%s\n", ndr_errstr(ndr_err)));
|
"%s\n", ndr_errstr(ndr_err)));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
dst = talloc(mem_ctx, struct auth3_session_info);
|
dst = talloc(mem_ctx, struct auth_session_info);
|
||||||
if (dst == NULL) {
|
if (dst == NULL) {
|
||||||
DEBUG(0, ("talloc failed\n"));
|
DEBUG(0, ("talloc failed\n"));
|
||||||
TALLOC_FREE(blob.data);
|
TALLOC_FREE(blob.data);
|
||||||
@@ -1082,11 +1082,11 @@ struct auth3_session_info *copy_session_info(TALLOC_CTX *mem_ctx,
|
|||||||
|
|
||||||
ndr_err = ndr_pull_struct_blob(
|
ndr_err = ndr_pull_struct_blob(
|
||||||
&blob, dst, dst,
|
&blob, dst, dst,
|
||||||
(ndr_pull_flags_fn_t)ndr_pull_auth3_session_info);
|
(ndr_pull_flags_fn_t)ndr_pull_auth_session_info);
|
||||||
TALLOC_FREE(blob.data);
|
TALLOC_FREE(blob.data);
|
||||||
|
|
||||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||||
DEBUG(0, ("copy_session_info(): ndr_pull_auth3_session_info failed: "
|
DEBUG(0, ("copy_session_info(): ndr_pull_auth_session_info failed: "
|
||||||
"%s\n", ndr_errstr(ndr_err)));
|
"%s\n", ndr_errstr(ndr_err)));
|
||||||
TALLOC_FREE(dst);
|
TALLOC_FREE(dst);
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -1100,7 +1100,7 @@ struct auth3_session_info *copy_session_info(TALLOC_CTX *mem_ctx,
|
|||||||
* SMB level session key with SystemLibraryDTC
|
* SMB level session key with SystemLibraryDTC
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool session_info_set_session_key(struct auth3_session_info *info,
|
bool session_info_set_session_key(struct auth_session_info *info,
|
||||||
DATA_BLOB session_key)
|
DATA_BLOB session_key)
|
||||||
{
|
{
|
||||||
TALLOC_FREE(info->session_key.data);
|
TALLOC_FREE(info->session_key.data);
|
||||||
@@ -1111,7 +1111,7 @@ bool session_info_set_session_key(struct auth3_session_info *info,
|
|||||||
return (info->session_key.data != NULL);
|
return (info->session_key.data != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct auth3_session_info *guest_info = NULL;
|
static struct auth_session_info *guest_info = NULL;
|
||||||
|
|
||||||
static struct auth_serversupplied_info *guest_server_info = NULL;
|
static struct auth_serversupplied_info *guest_server_info = NULL;
|
||||||
|
|
||||||
@@ -1128,20 +1128,20 @@ NTSTATUS make_server_info_guest(TALLOC_CTX *mem_ctx,
|
|||||||
{
|
{
|
||||||
/* This is trickier than it would appear to need to be because
|
/* This is trickier than it would appear to need to be because
|
||||||
* we are trying to avoid certain costly operations when the
|
* we are trying to avoid certain costly operations when the
|
||||||
* structure is converted to a 'auth3_session_info' again in
|
* structure is converted to a 'auth_session_info' again in
|
||||||
* create_local_token() */
|
* create_local_token() */
|
||||||
*server_info = copy_session_info_serverinfo_guest(mem_ctx, guest_info, guest_server_info);
|
*server_info = copy_session_info_serverinfo_guest(mem_ctx, guest_info, guest_server_info);
|
||||||
return (*server_info != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;
|
return (*server_info != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS make_session_info_guest(TALLOC_CTX *mem_ctx,
|
NTSTATUS make_session_info_guest(TALLOC_CTX *mem_ctx,
|
||||||
struct auth3_session_info **session_info)
|
struct auth_session_info **session_info)
|
||||||
{
|
{
|
||||||
*session_info = copy_session_info(mem_ctx, guest_info);
|
*session_info = copy_session_info(mem_ctx, guest_info);
|
||||||
return (*session_info != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;
|
return (*session_info != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct auth3_session_info *system_info = NULL;
|
static struct auth_session_info *system_info = NULL;
|
||||||
|
|
||||||
NTSTATUS init_system_info(void)
|
NTSTATUS init_system_info(void)
|
||||||
{
|
{
|
||||||
@@ -1152,14 +1152,14 @@ NTSTATUS init_system_info(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS make_session_info_system(TALLOC_CTX *mem_ctx,
|
NTSTATUS make_session_info_system(TALLOC_CTX *mem_ctx,
|
||||||
struct auth3_session_info **session_info)
|
struct auth_session_info **session_info)
|
||||||
{
|
{
|
||||||
if (system_info == NULL) return NT_STATUS_UNSUCCESSFUL;
|
if (system_info == NULL) return NT_STATUS_UNSUCCESSFUL;
|
||||||
*session_info = copy_session_info(mem_ctx, system_info);
|
*session_info = copy_session_info(mem_ctx, system_info);
|
||||||
return (*session_info != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;
|
return (*session_info != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct auth3_session_info *get_session_info_system(void)
|
const struct auth_session_info *get_session_info_system(void)
|
||||||
{
|
{
|
||||||
return system_info;
|
return system_info;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ NTSTATUS auth_netlogond_init(void);
|
|||||||
|
|
||||||
NTSTATUS auth_ntlmssp_steal_session_info(TALLOC_CTX *mem_ctx,
|
NTSTATUS auth_ntlmssp_steal_session_info(TALLOC_CTX *mem_ctx,
|
||||||
struct auth_ntlmssp_state *auth_ntlmssp_state,
|
struct auth_ntlmssp_state *auth_ntlmssp_state,
|
||||||
struct auth3_session_info **session_info);
|
struct auth_session_info **session_info);
|
||||||
NTSTATUS auth_ntlmssp_start(const struct tsocket_address *remote_address,
|
NTSTATUS auth_ntlmssp_start(const struct tsocket_address *remote_address,
|
||||||
struct auth_ntlmssp_state **auth_ntlmssp_state);
|
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,
|
NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth_serversupplied_info *server_info,
|
const struct auth_serversupplied_info *server_info,
|
||||||
DATA_BLOB *session_key,
|
DATA_BLOB *session_key,
|
||||||
struct auth3_session_info **session_info_out);
|
struct auth_session_info **session_info_out);
|
||||||
NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username,
|
NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username,
|
||||||
bool is_guest,
|
bool is_guest,
|
||||||
uid_t *uid, gid_t *gid,
|
uid_t *uid, gid_t *gid,
|
||||||
@@ -165,20 +165,20 @@ NTSTATUS make_server_info_pw(struct auth_serversupplied_info **server_info,
|
|||||||
NTSTATUS make_session_info_from_username(TALLOC_CTX *mem_ctx,
|
NTSTATUS make_session_info_from_username(TALLOC_CTX *mem_ctx,
|
||||||
const char *username,
|
const char *username,
|
||||||
bool is_guest,
|
bool is_guest,
|
||||||
struct auth3_session_info **session_info);
|
struct auth_session_info **session_info);
|
||||||
struct auth3_session_info *copy_session_info(TALLOC_CTX *mem_ctx,
|
struct auth_session_info *copy_session_info(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *src);
|
const struct auth_session_info *src);
|
||||||
bool init_guest_info(void);
|
bool init_guest_info(void);
|
||||||
NTSTATUS init_system_info(void);
|
NTSTATUS init_system_info(void);
|
||||||
bool session_info_set_session_key(struct auth3_session_info *info,
|
bool session_info_set_session_key(struct auth_session_info *info,
|
||||||
DATA_BLOB session_key);
|
DATA_BLOB session_key);
|
||||||
NTSTATUS make_server_info_guest(TALLOC_CTX *mem_ctx,
|
NTSTATUS make_server_info_guest(TALLOC_CTX *mem_ctx,
|
||||||
struct auth_serversupplied_info **server_info);
|
struct auth_serversupplied_info **server_info);
|
||||||
NTSTATUS make_session_info_guest(TALLOC_CTX *mem_ctx,
|
NTSTATUS make_session_info_guest(TALLOC_CTX *mem_ctx,
|
||||||
struct auth3_session_info **server_info);
|
struct auth_session_info **server_info);
|
||||||
NTSTATUS make_session_info_system(TALLOC_CTX *mem_ctx,
|
NTSTATUS make_session_info_system(TALLOC_CTX *mem_ctx,
|
||||||
struct auth3_session_info **session_info);
|
struct auth_session_info **session_info);
|
||||||
const struct auth3_session_info *get_session_info_system(void);
|
const struct auth_session_info *get_session_info_system(void);
|
||||||
bool copy_current_user(struct current_user *dst, struct current_user *src);
|
bool copy_current_user(struct current_user *dst, struct current_user *src);
|
||||||
struct passwd *smb_getpwnam( TALLOC_CTX *mem_ctx, const char *domuser,
|
struct passwd *smb_getpwnam( TALLOC_CTX *mem_ctx, const char *domuser,
|
||||||
char **p_save_username, bool create );
|
char **p_save_username, bool create );
|
||||||
@@ -225,7 +225,7 @@ struct netr_SamInfo3;
|
|||||||
struct netr_SamInfo6;
|
struct netr_SamInfo6;
|
||||||
|
|
||||||
struct auth_serversupplied_info *make_server_info(TALLOC_CTX *mem_ctx);
|
struct auth_serversupplied_info *make_server_info(TALLOC_CTX *mem_ctx);
|
||||||
struct auth3_session_info *make_auth3_session_info(TALLOC_CTX *mem_ctx);
|
struct auth_session_info *make_auth_session_info(TALLOC_CTX *mem_ctx);
|
||||||
NTSTATUS serverinfo_to_SamInfo2(struct auth_serversupplied_info *server_info,
|
NTSTATUS serverinfo_to_SamInfo2(struct auth_serversupplied_info *server_info,
|
||||||
uint8_t *pipe_session_key,
|
uint8_t *pipe_session_key,
|
||||||
size_t pipe_session_key_len,
|
size_t pipe_session_key_len,
|
||||||
@@ -319,6 +319,6 @@ NTSTATUS make_session_info_krb5(TALLOC_CTX *mem_ctx,
|
|||||||
struct PAC_LOGON_INFO *logon_info,
|
struct PAC_LOGON_INFO *logon_info,
|
||||||
bool mapped_to_guest, bool username_was_mapped,
|
bool mapped_to_guest, bool username_was_mapped,
|
||||||
DATA_BLOB *session_key,
|
DATA_BLOB *session_key,
|
||||||
struct auth3_session_info **session_info);
|
struct auth_session_info **session_info);
|
||||||
|
|
||||||
#endif /* _AUTH_PROTO_H_ */
|
#endif /* _AUTH_PROTO_H_ */
|
||||||
|
|||||||
@@ -67,11 +67,11 @@ struct auth_serversupplied_info *make_server_info(TALLOC_CTX *mem_ctx)
|
|||||||
Make a server_info struct. Free with TALLOC_FREE().
|
Make a server_info struct. Free with TALLOC_FREE().
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
struct auth3_session_info *make_auth3_session_info(TALLOC_CTX *mem_ctx)
|
struct auth_session_info *make_auth_session_info(TALLOC_CTX *mem_ctx)
|
||||||
{
|
{
|
||||||
struct auth3_session_info *result;
|
struct auth_session_info *result;
|
||||||
|
|
||||||
result = talloc_zero(mem_ctx, struct auth3_session_info);
|
result = talloc_zero(mem_ctx, struct auth_session_info);
|
||||||
if (result == NULL) {
|
if (result == NULL) {
|
||||||
DEBUG(0, ("talloc failed\n"));
|
DEBUG(0, ("talloc failed\n"));
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ NTSTATUS make_session_info_krb5(TALLOC_CTX *mem_ctx,
|
|||||||
struct PAC_LOGON_INFO *logon_info,
|
struct PAC_LOGON_INFO *logon_info,
|
||||||
bool mapped_to_guest, bool username_was_mapped,
|
bool mapped_to_guest, bool username_was_mapped,
|
||||||
DATA_BLOB *session_key,
|
DATA_BLOB *session_key,
|
||||||
struct auth3_session_info **session_info)
|
struct auth_session_info **session_info)
|
||||||
{
|
{
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
struct auth_serversupplied_info *server_info;
|
struct auth_serversupplied_info *server_info;
|
||||||
|
|||||||
@@ -128,18 +128,18 @@ bool nt_printing_init(struct messaging_context *msg_ctx);
|
|||||||
|
|
||||||
const char *get_short_archi(const char *long_archi);
|
const char *get_short_archi(const char *long_archi);
|
||||||
|
|
||||||
bool print_access_check(const struct auth3_session_info *server_info,
|
bool print_access_check(const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx, int snum,
|
struct messaging_context *msg_ctx, int snum,
|
||||||
int access_type);
|
int access_type);
|
||||||
|
|
||||||
WERROR nt_printer_publish(TALLOC_CTX *mem_ctx,
|
WERROR nt_printer_publish(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *server_info,
|
const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct spoolss_PrinterInfo2 *pinfo2,
|
struct spoolss_PrinterInfo2 *pinfo2,
|
||||||
int action);
|
int action);
|
||||||
|
|
||||||
bool is_printer_published(TALLOC_CTX *mem_ctx,
|
bool is_printer_published(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *server_info,
|
const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *servername, char *printer, struct GUID *guid,
|
const char *servername, char *printer, struct GUID *guid,
|
||||||
struct spoolss_PrinterInfo2 **info2);
|
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);
|
WERROR check_published_printers(struct messaging_context *msg_ctx);
|
||||||
|
|
||||||
bool printer_driver_in_use(TALLOC_CTX *mem_ctx,
|
bool printer_driver_in_use(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *server_info,
|
const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const struct spoolss_DriverInfo8 *r);
|
const struct spoolss_DriverInfo8 *r);
|
||||||
bool printer_driver_files_in_use(TALLOC_CTX *mem_ctx,
|
bool printer_driver_files_in_use(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *server_info,
|
const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct spoolss_DriverInfo8 *r);
|
struct spoolss_DriverInfo8 *r);
|
||||||
bool delete_driver_files(const struct auth3_session_info *server_info,
|
bool delete_driver_files(const struct auth_session_info *server_info,
|
||||||
const struct spoolss_DriverInfo8 *r);
|
const struct spoolss_DriverInfo8 *r);
|
||||||
|
|
||||||
WERROR move_driver_to_download_area(struct auth3_session_info *session_info,
|
WERROR move_driver_to_download_area(struct auth_session_info *session_info,
|
||||||
struct spoolss_AddDriverInfoCtr *r);
|
struct spoolss_AddDriverInfoCtr *r);
|
||||||
|
|
||||||
WERROR clean_up_driver_struct(TALLOC_CTX *mem_ctx,
|
WERROR clean_up_driver_struct(TALLOC_CTX *mem_ctx,
|
||||||
struct auth3_session_info *session_info,
|
struct auth_session_info *session_info,
|
||||||
struct spoolss_AddDriverInfoCtr *r);
|
struct spoolss_AddDriverInfoCtr *r);
|
||||||
|
|
||||||
void map_printer_permissions(struct security_descriptor *sd);
|
void map_printer_permissions(struct security_descriptor *sd);
|
||||||
|
|
||||||
void map_job_permissions(struct security_descriptor *sd);
|
void map_job_permissions(struct security_descriptor *sd);
|
||||||
|
|
||||||
bool print_time_access_check(const struct auth3_session_info *server_info,
|
bool print_time_access_check(const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *servicename);
|
const char *servicename);
|
||||||
|
|
||||||
void nt_printer_remove(TALLOC_CTX *mem_ctx,
|
void nt_printer_remove(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *server_info,
|
const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *printer);
|
const char *printer);
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ struct pipes_struct {
|
|||||||
|
|
||||||
enum dcerpc_transport_t transport;
|
enum dcerpc_transport_t transport;
|
||||||
|
|
||||||
struct auth3_session_info *session_info;
|
struct auth_session_info *session_info;
|
||||||
struct messaging_context *msg_ctx;
|
struct messaging_context *msg_ctx;
|
||||||
|
|
||||||
struct dcesrv_ep_entry_list *ep_entries;
|
struct dcesrv_ep_entry_list *ep_entries;
|
||||||
|
|||||||
@@ -198,13 +198,13 @@ bool print_job_set_name(struct tevent_context *ev,
|
|||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *sharename, uint32 jobid, const char *name);
|
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);
|
bool print_job_get_name(TALLOC_CTX *mem_ctx, const char *sharename, uint32_t jobid, char **name);
|
||||||
WERROR print_job_delete(const struct auth3_session_info *server_info,
|
WERROR print_job_delete(const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
int snum, uint32_t jobid);
|
int snum, uint32_t jobid);
|
||||||
bool print_job_pause(const struct auth3_session_info *server_info,
|
bool print_job_pause(const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
int snum, uint32 jobid, WERROR *errcode);
|
int snum, uint32 jobid, WERROR *errcode);
|
||||||
bool print_job_resume(const struct auth3_session_info *server_info,
|
bool print_job_resume(const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
int snum, uint32 jobid, WERROR *errcode);
|
int snum, uint32 jobid, WERROR *errcode);
|
||||||
ssize_t print_job_write(struct tevent_context *ev,
|
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 snum, uint32 jobid, const char *buf, size_t size);
|
||||||
int print_queue_length(struct messaging_context *msg_ctx, int snum,
|
int print_queue_length(struct messaging_context *msg_ctx, int snum,
|
||||||
print_status_struct *pstatus);
|
print_status_struct *pstatus);
|
||||||
WERROR print_job_start(const struct auth3_session_info *server_info,
|
WERROR print_job_start(const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *clientmachine,
|
const char *clientmachine,
|
||||||
int snum, const char *docname, const char *filename,
|
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,
|
int print_queue_status(struct messaging_context *msg_ctx, int snum,
|
||||||
print_queue_struct **ppqueue,
|
print_queue_struct **ppqueue,
|
||||||
print_status_struct *status);
|
print_status_struct *status);
|
||||||
WERROR print_queue_pause(const struct auth3_session_info *server_info,
|
WERROR print_queue_pause(const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx, int snum);
|
struct messaging_context *msg_ctx, int snum);
|
||||||
WERROR print_queue_resume(const struct auth3_session_info *server_info,
|
WERROR print_queue_resume(const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx, int snum);
|
struct messaging_context *msg_ctx, int snum);
|
||||||
WERROR print_queue_purge(const struct auth3_session_info *server_info,
|
WERROR print_queue_purge(const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx, int snum);
|
struct messaging_context *msg_ctx, int snum);
|
||||||
uint16 pjobid_to_rap(const char* sharename, uint32 jobid);
|
uint16 pjobid_to_rap(const char* sharename, uint32 jobid);
|
||||||
bool rap_to_pjobid(uint16 rap_jobid, fstring sharename, uint32 *pjobid);
|
bool rap_to_pjobid(uint16 rap_jobid, fstring sharename, uint32 *pjobid);
|
||||||
|
|||||||
@@ -305,7 +305,7 @@ typedef struct files_struct {
|
|||||||
#include "sysquotas.h"
|
#include "sysquotas.h"
|
||||||
|
|
||||||
struct vuid_cache_entry {
|
struct vuid_cache_entry {
|
||||||
struct auth3_session_info *session_info;
|
struct auth_session_info *session_info;
|
||||||
uint16_t vuid;
|
uint16_t vuid;
|
||||||
bool read_only;
|
bool read_only;
|
||||||
};
|
};
|
||||||
@@ -403,7 +403,7 @@ typedef struct connection_struct {
|
|||||||
* This represents the user information on this connection. Depending
|
* This represents the user information on this connection. Depending
|
||||||
* on the vuid using this tid, this might change per SMB request.
|
* on the vuid using this tid, this might change per SMB request.
|
||||||
*/
|
*/
|
||||||
struct auth3_session_info *session_info;
|
struct auth_session_info *session_info;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the "force group" parameter is set, this is the primary gid that
|
* If the "force group" parameter is set, this is the primary gid that
|
||||||
@@ -1447,7 +1447,7 @@ typedef struct user_struct {
|
|||||||
TDB key string */
|
TDB key string */
|
||||||
int homes_snum;
|
int homes_snum;
|
||||||
|
|
||||||
struct auth3_session_info *session_info;
|
struct auth_session_info *session_info;
|
||||||
|
|
||||||
struct auth_ntlmssp_state *auth_ntlmssp_state;
|
struct auth_ntlmssp_state *auth_ntlmssp_state;
|
||||||
} user_struct;
|
} user_struct;
|
||||||
|
|||||||
@@ -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
|
Determine the correct cVersion associated with an architecture and driver
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
static uint32 get_correct_cversion(struct auth3_session_info *session_info,
|
static uint32 get_correct_cversion(struct auth_session_info *session_info,
|
||||||
const char *architecture,
|
const char *architecture,
|
||||||
const char *driverpath_in,
|
const char *driverpath_in,
|
||||||
WERROR *perr)
|
WERROR *perr)
|
||||||
@@ -762,7 +762,7 @@ static uint32 get_correct_cversion(struct auth3_session_info *session_info,
|
|||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
static WERROR clean_up_driver_struct_level(TALLOC_CTX *mem_ctx,
|
static WERROR clean_up_driver_struct_level(TALLOC_CTX *mem_ctx,
|
||||||
struct auth3_session_info *session_info,
|
struct auth_session_info *session_info,
|
||||||
const char *architecture,
|
const char *architecture,
|
||||||
const char **driver_path,
|
const char **driver_path,
|
||||||
const char **data_file,
|
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,
|
WERROR clean_up_driver_struct(TALLOC_CTX *mem_ctx,
|
||||||
struct auth3_session_info *session_info,
|
struct auth_session_info *session_info,
|
||||||
struct spoolss_AddDriverInfoCtr *r)
|
struct spoolss_AddDriverInfoCtr *r)
|
||||||
{
|
{
|
||||||
switch (r->level) {
|
switch (r->level) {
|
||||||
@@ -954,7 +954,7 @@ static WERROR move_driver_file_to_download_area(TALLOC_CTX *mem_ctx,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
WERROR move_driver_to_download_area(struct auth3_session_info *session_info,
|
WERROR move_driver_to_download_area(struct auth_session_info *session_info,
|
||||||
struct spoolss_AddDriverInfoCtr *r)
|
struct spoolss_AddDriverInfoCtr *r)
|
||||||
{
|
{
|
||||||
struct spoolss_AddDriverInfo3 *driver;
|
struct spoolss_AddDriverInfo3 *driver;
|
||||||
@@ -1174,7 +1174,7 @@ WERROR move_driver_to_download_area(struct auth3_session_info *session_info,
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
bool printer_driver_in_use(TALLOC_CTX *mem_ctx,
|
bool printer_driver_in_use(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const struct spoolss_DriverInfo8 *r)
|
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,
|
bool printer_driver_files_in_use(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct spoolss_DriverInfo8 *info)
|
struct spoolss_DriverInfo8 *info)
|
||||||
{
|
{
|
||||||
@@ -1516,7 +1516,7 @@ static NTSTATUS driver_unlink_internals(connection_struct *conn,
|
|||||||
this.
|
this.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
bool delete_driver_files(const struct auth3_session_info *session_info,
|
bool delete_driver_files(const struct auth_session_info *session_info,
|
||||||
const struct spoolss_DriverInfo8 *r)
|
const struct spoolss_DriverInfo8 *r)
|
||||||
{
|
{
|
||||||
int i = 0;
|
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)
|
3) "printer admins" (may result in numerous calls to winbind)
|
||||||
|
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
bool print_access_check(const struct auth3_session_info *session_info,
|
bool print_access_check(const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx, int snum,
|
struct messaging_context *msg_ctx, int snum,
|
||||||
int access_type)
|
int access_type)
|
||||||
{
|
{
|
||||||
@@ -1823,7 +1823,7 @@ bool print_access_check(const struct auth3_session_info *session_info,
|
|||||||
Check the time parameters allow a print operation.
|
Check the time parameters allow a print operation.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
bool print_time_access_check(const struct auth3_session_info *session_info,
|
bool print_time_access_check(const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *servicename)
|
const char *servicename)
|
||||||
{
|
{
|
||||||
@@ -1861,7 +1861,7 @@ bool print_time_access_check(const struct auth3_session_info *session_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void nt_printer_remove(TALLOC_CTX *mem_ctx,
|
void nt_printer_remove(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *printer)
|
const char *printer)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ static void store_printer_guid(struct messaging_context *msg_ctx,
|
|||||||
const char *printer, struct GUID guid)
|
const char *printer, struct GUID guid)
|
||||||
{
|
{
|
||||||
TALLOC_CTX *tmp_ctx;
|
TALLOC_CTX *tmp_ctx;
|
||||||
struct auth3_session_info *session_info = NULL;
|
struct auth_session_info *session_info = NULL;
|
||||||
const char *guid_str;
|
const char *guid_str;
|
||||||
DATA_BLOB blob;
|
DATA_BLOB blob;
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
@@ -244,7 +244,7 @@ static WERROR nt_printer_unpublish_ads(ADS_STRUCT *ads,
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
WERROR nt_printer_publish(TALLOC_CTX *mem_ctx,
|
WERROR nt_printer_publish(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct spoolss_PrinterInfo2 *pinfo2,
|
struct spoolss_PrinterInfo2 *pinfo2,
|
||||||
int action)
|
int action)
|
||||||
@@ -326,7 +326,7 @@ WERROR check_published_printers(struct messaging_context *msg_ctx)
|
|||||||
int snum;
|
int snum;
|
||||||
int n_services = lp_numservices();
|
int n_services = lp_numservices();
|
||||||
TALLOC_CTX *tmp_ctx = NULL;
|
TALLOC_CTX *tmp_ctx = NULL;
|
||||||
struct auth3_session_info *session_info = NULL;
|
struct auth_session_info *session_info = NULL;
|
||||||
struct spoolss_PrinterInfo2 *pinfo2;
|
struct spoolss_PrinterInfo2 *pinfo2;
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
WERROR result;
|
WERROR result;
|
||||||
@@ -388,7 +388,7 @@ done:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool is_printer_published(TALLOC_CTX *mem_ctx,
|
bool is_printer_published(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *servername, char *printer, struct GUID *guid,
|
const char *servername, char *printer, struct GUID *guid,
|
||||||
struct spoolss_PrinterInfo2 **info2)
|
struct spoolss_PrinterInfo2 **info2)
|
||||||
@@ -469,7 +469,7 @@ done:
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
WERROR nt_printer_publish(TALLOC_CTX *mem_ctx,
|
WERROR nt_printer_publish(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct spoolss_PrinterInfo2 *pinfo2,
|
struct spoolss_PrinterInfo2 *pinfo2,
|
||||||
int action)
|
int action)
|
||||||
@@ -483,7 +483,7 @@ WERROR check_published_printers(struct messaging_context *msg_ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool is_printer_published(TALLOC_CTX *mem_ctx,
|
bool is_printer_published(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *servername, char *printer, struct GUID *guid,
|
const char *servername, char *printer, struct GUID *guid,
|
||||||
struct spoolss_PrinterInfo2 **info2)
|
struct spoolss_PrinterInfo2 **info2)
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ bool nt_printing_tdb_migrate(struct messaging_context *msg_ctx)
|
|||||||
bool drivers_exists = file_exist(drivers_path);
|
bool drivers_exists = file_exist(drivers_path);
|
||||||
bool printers_exists = file_exist(printers_path);
|
bool printers_exists = file_exist(printers_path);
|
||||||
bool forms_exists = file_exist(forms_path);
|
bool forms_exists = file_exist(forms_path);
|
||||||
struct auth3_session_info *session_info;
|
struct auth_session_info *session_info;
|
||||||
struct rpc_pipe_client *winreg_pipe = NULL;
|
struct rpc_pipe_client *winreg_pipe = NULL;
|
||||||
TALLOC_CTX *tmp_ctx = talloc_stackframe();
|
TALLOC_CTX *tmp_ctx = talloc_stackframe();
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
|
|||||||
@@ -2243,7 +2243,7 @@ static bool print_job_delete1(struct tevent_context *ev,
|
|||||||
Return true if the current user owns the print job.
|
Return true if the current user owns the print job.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static bool is_owner(const struct auth3_session_info *server_info,
|
static bool is_owner(const struct auth_session_info *server_info,
|
||||||
const char *servicename,
|
const char *servicename,
|
||||||
uint32 jobid)
|
uint32 jobid)
|
||||||
{
|
{
|
||||||
@@ -2259,7 +2259,7 @@ static bool is_owner(const struct auth3_session_info *server_info,
|
|||||||
Delete a print job.
|
Delete a print job.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
WERROR print_job_delete(const struct auth3_session_info *server_info,
|
WERROR print_job_delete(const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
int snum, uint32_t jobid)
|
int snum, uint32_t jobid)
|
||||||
{
|
{
|
||||||
@@ -2327,7 +2327,7 @@ pause, or resume print job. User name: %s. Printer name: %s.",
|
|||||||
Pause a job.
|
Pause a job.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
bool print_job_pause(const struct auth3_session_info *server_info,
|
bool print_job_pause(const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
int snum, uint32 jobid, WERROR *errcode)
|
int snum, uint32 jobid, WERROR *errcode)
|
||||||
{
|
{
|
||||||
@@ -2392,7 +2392,7 @@ pause, or resume print job. User name: %s. Printer name: %s.",
|
|||||||
Resume a job.
|
Resume a job.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
bool print_job_resume(const struct auth3_session_info *server_info,
|
bool print_job_resume(const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
int snum, uint32 jobid, WERROR *errcode)
|
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.
|
Do all checks needed to determine if we can start a job.
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
static WERROR print_job_checks(const struct auth3_session_info *server_info,
|
static WERROR print_job_checks(const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
int snum, int *njobs)
|
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.
|
Start spooling a job - return the jobid.
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
WERROR print_job_start(const struct auth3_session_info *server_info,
|
WERROR print_job_start(const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *clientmachine,
|
const char *clientmachine,
|
||||||
int snum, const char *docname, const char *filename,
|
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.
|
Pause a queue.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
WERROR print_queue_pause(const struct auth3_session_info *server_info,
|
WERROR print_queue_pause(const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx, int snum)
|
struct messaging_context *msg_ctx, int snum)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@@ -3282,7 +3282,7 @@ WERROR print_queue_pause(const struct auth3_session_info *server_info,
|
|||||||
Resume a queue.
|
Resume a queue.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
WERROR print_queue_resume(const struct auth3_session_info *server_info,
|
WERROR print_queue_resume(const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx, int snum)
|
struct messaging_context *msg_ctx, int snum)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@@ -3319,7 +3319,7 @@ WERROR print_queue_resume(const struct auth3_session_info *server_info,
|
|||||||
Purge a queue - implemented by deleting all jobs that we can delete.
|
Purge a queue - implemented by deleting all jobs that we can delete.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
WERROR print_queue_purge(const struct auth3_session_info *server_info,
|
WERROR print_queue_purge(const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx, int snum)
|
struct messaging_context *msg_ctx, int snum)
|
||||||
{
|
{
|
||||||
print_queue_struct *queue;
|
print_queue_struct *queue;
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ static WERROR _split_hive_key(TALLOC_CTX *mem_ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NTSTATUS _winreg_int_openkey(TALLOC_CTX *mem_ctx,
|
static NTSTATUS _winreg_int_openkey(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct dcerpc_binding_handle **h,
|
struct dcerpc_binding_handle **h,
|
||||||
uint32_t reg_type,
|
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,
|
NTSTATUS dcerpc_winreg_int_openkey(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *server_info,
|
const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct dcerpc_binding_handle **h,
|
struct dcerpc_binding_handle **h,
|
||||||
const char *key,
|
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,
|
NTSTATUS dcerpc_winreg_int_hklm_openkey(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *server_info,
|
const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct dcerpc_binding_handle **h,
|
struct dcerpc_binding_handle **h,
|
||||||
const char *key,
|
const char *key,
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#ifndef CLI_WINREG_INT_H
|
#ifndef CLI_WINREG_INT_H
|
||||||
#define CLI_WINREG_INT_H
|
#define CLI_WINREG_INT_H
|
||||||
|
|
||||||
struct auth3_session_info;
|
struct auth_session_info;
|
||||||
struct dcerpc_binding_handle;
|
struct dcerpc_binding_handle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -52,7 +52,7 @@ struct dcerpc_binding_handle;
|
|||||||
* code if something gone wrong.
|
* code if something gone wrong.
|
||||||
*/
|
*/
|
||||||
NTSTATUS dcerpc_winreg_int_openkey(TALLOC_CTX *mem_ctx,
|
NTSTATUS dcerpc_winreg_int_openkey(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *server_info,
|
const struct auth_session_info *server_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct dcerpc_binding_handle **h,
|
struct dcerpc_binding_handle **h,
|
||||||
const char *key,
|
const char *key,
|
||||||
@@ -88,7 +88,7 @@ NTSTATUS dcerpc_winreg_int_openkey(TALLOC_CTX *mem_ctx,
|
|||||||
* code if something gone wrong.
|
* code if something gone wrong.
|
||||||
*/
|
*/
|
||||||
NTSTATUS dcerpc_winreg_int_hklm_openkey(TALLOC_CTX *mem_ctx,
|
NTSTATUS dcerpc_winreg_int_hklm_openkey(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct dcerpc_binding_handle **h,
|
struct dcerpc_binding_handle **h,
|
||||||
const char *key,
|
const char *key,
|
||||||
|
|||||||
@@ -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,
|
NTSTATUS gssapi_server_get_user_info(struct gse_context *gse_ctx,
|
||||||
TALLOC_CTX *mem_ctx,
|
TALLOC_CTX *mem_ctx,
|
||||||
const struct tsocket_address *remote_address,
|
const struct tsocket_address *remote_address,
|
||||||
struct auth3_session_info **session_info)
|
struct auth_session_info **session_info)
|
||||||
{
|
{
|
||||||
TALLOC_CTX *tmp_ctx;
|
TALLOC_CTX *tmp_ctx;
|
||||||
DATA_BLOB pac_blob;
|
DATA_BLOB pac_blob;
|
||||||
|
|||||||
@@ -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,
|
NTSTATUS gssapi_server_get_user_info(struct gse_context *gse_ctx,
|
||||||
TALLOC_CTX *mem_ctx,
|
TALLOC_CTX *mem_ctx,
|
||||||
const struct tsocket_address *remote_address,
|
const struct tsocket_address *remote_address,
|
||||||
struct auth3_session_info **session_info);
|
struct auth_session_info **session_info);
|
||||||
|
|
||||||
#endif /* _DCESRV_GSSAPI_H_ */
|
#endif /* _DCESRV_GSSAPI_H_ */
|
||||||
|
|||||||
@@ -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,
|
NTSTATUS ntlmssp_server_get_user_info(struct auth_ntlmssp_state *ctx,
|
||||||
TALLOC_CTX *mem_ctx,
|
TALLOC_CTX *mem_ctx,
|
||||||
struct auth3_session_info **session_info)
|
struct auth_session_info **session_info)
|
||||||
{
|
{
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,6 @@ NTSTATUS ntlmssp_server_check_flags(struct auth_ntlmssp_state *ctx,
|
|||||||
bool do_sign, bool do_seal);
|
bool do_sign, bool do_seal);
|
||||||
NTSTATUS ntlmssp_server_get_user_info(struct auth_ntlmssp_state *ctx,
|
NTSTATUS ntlmssp_server_get_user_info(struct auth_ntlmssp_state *ctx,
|
||||||
TALLOC_CTX *mem_ctx,
|
TALLOC_CTX *mem_ctx,
|
||||||
struct auth3_session_info **session_info);
|
struct auth_session_info **session_info);
|
||||||
|
|
||||||
#endif /* _DCESRV_NTLMSSP_H_ */
|
#endif /* _DCESRV_NTLMSSP_H_ */
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ static uint32_t build_ep_list(TALLOC_CTX *mem_ctx,
|
|||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool is_priviledged_pipe(struct auth3_session_info *info) {
|
static bool is_priviledged_pipe(struct auth_session_info *info) {
|
||||||
/* If the user is not root, or has the system token, fail */
|
/* If the user is not root, or has the system token, fail */
|
||||||
if ((info->unix_token->uid != sec_initial_uid()) &&
|
if ((info->unix_token->uid != sec_initial_uid()) &&
|
||||||
!security_token_is_system(info->security_token)) {
|
!security_token_is_system(info->security_token)) {
|
||||||
|
|||||||
@@ -650,7 +650,7 @@ static NTSTATUS get_md4pw(struct samr_Password *md4pw, const char *mach_acct,
|
|||||||
struct dom_sid *domain_sid;
|
struct dom_sid *domain_sid;
|
||||||
uint32_t acct_ctrl;
|
uint32_t acct_ctrl;
|
||||||
union samr_UserInfo *info;
|
union samr_UserInfo *info;
|
||||||
struct auth3_session_info *session_info;
|
struct auth_session_info *session_info;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
#if 0
|
#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,
|
static NTSTATUS netr_set_machine_account_password(TALLOC_CTX *mem_ctx,
|
||||||
struct auth3_session_info *session_info,
|
struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *account_name,
|
const char *account_name,
|
||||||
struct samr_Password *nt_hash)
|
struct samr_Password *nt_hash)
|
||||||
|
|||||||
@@ -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,
|
struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
|
||||||
const struct ndr_syntax_id *syntax,
|
const struct ndr_syntax_id *syntax,
|
||||||
const struct tsocket_address *remote_address,
|
const struct tsocket_address *remote_address,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx)
|
struct messaging_context *msg_ctx)
|
||||||
{
|
{
|
||||||
struct pipes_struct *p;
|
struct pipes_struct *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_syntax_id *abstract_syntax,
|
||||||
const struct ndr_interface_table *ndr_table,
|
const struct ndr_interface_table *ndr_table,
|
||||||
const struct tsocket_address *remote_address,
|
const struct tsocket_address *remote_address,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct dcerpc_binding_handle **binding_handle)
|
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,
|
NTSTATUS rpcint_binding_handle(TALLOC_CTX *mem_ctx,
|
||||||
const struct ndr_interface_table *ndr_table,
|
const struct ndr_interface_table *ndr_table,
|
||||||
const struct tsocket_address *remote_address,
|
const struct tsocket_address *remote_address,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct dcerpc_binding_handle **binding_handle)
|
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,
|
static NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct ndr_syntax_id *abstract_syntax,
|
const struct ndr_syntax_id *abstract_syntax,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
const struct tsocket_address *remote_address,
|
const struct tsocket_address *remote_address,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct rpc_pipe_client **presult)
|
struct rpc_pipe_client **presult)
|
||||||
@@ -620,7 +620,7 @@ struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx,
|
|||||||
const char *pipe_name,
|
const char *pipe_name,
|
||||||
const struct tsocket_address *local_address,
|
const struct tsocket_address *local_address,
|
||||||
const struct tsocket_address *remote_address,
|
const struct tsocket_address *remote_address,
|
||||||
const struct auth3_session_info *session_info)
|
const struct auth_session_info *session_info)
|
||||||
{
|
{
|
||||||
struct np_proxy_state *result;
|
struct np_proxy_state *result;
|
||||||
char *socket_np_dir;
|
char *socket_np_dir;
|
||||||
@@ -747,7 +747,7 @@ struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx,
|
|||||||
static NTSTATUS rpc_pipe_open_external(TALLOC_CTX *mem_ctx,
|
static NTSTATUS rpc_pipe_open_external(TALLOC_CTX *mem_ctx,
|
||||||
const char *pipe_name,
|
const char *pipe_name,
|
||||||
const struct ndr_syntax_id *abstract_syntax,
|
const struct ndr_syntax_id *abstract_syntax,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct rpc_pipe_client **_result)
|
struct rpc_pipe_client **_result)
|
||||||
{
|
{
|
||||||
struct tsocket_address *local, *remote;
|
struct tsocket_address *local, *remote;
|
||||||
@@ -873,7 +873,7 @@ done:
|
|||||||
|
|
||||||
NTSTATUS rpc_pipe_open_interface(TALLOC_CTX *mem_ctx,
|
NTSTATUS rpc_pipe_open_interface(TALLOC_CTX *mem_ctx,
|
||||||
const struct ndr_syntax_id *syntax,
|
const struct ndr_syntax_id *syntax,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
const struct tsocket_address *remote_address,
|
const struct tsocket_address *remote_address,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct rpc_pipe_client **cli_pipe)
|
struct rpc_pipe_client **cli_pipe)
|
||||||
|
|||||||
@@ -36,22 +36,22 @@ struct np_proxy_state {
|
|||||||
struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
|
struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
|
||||||
const struct ndr_syntax_id *syntax,
|
const struct ndr_syntax_id *syntax,
|
||||||
const struct tsocket_address *remote_address,
|
const struct tsocket_address *remote_address,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx);
|
struct messaging_context *msg_ctx);
|
||||||
struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx,
|
struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx,
|
||||||
const char *pipe_name,
|
const char *pipe_name,
|
||||||
const struct tsocket_address *local_address,
|
const struct tsocket_address *local_address,
|
||||||
const struct tsocket_address *remote_address,
|
const struct tsocket_address *remote_address,
|
||||||
const struct auth3_session_info *session_info);
|
const struct auth_session_info *session_info);
|
||||||
NTSTATUS rpcint_binding_handle(TALLOC_CTX *mem_ctx,
|
NTSTATUS rpcint_binding_handle(TALLOC_CTX *mem_ctx,
|
||||||
const struct ndr_interface_table *ndr_table,
|
const struct ndr_interface_table *ndr_table,
|
||||||
const struct tsocket_address *remote_address,
|
const struct tsocket_address *remote_address,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct dcerpc_binding_handle **binding_handle);
|
struct dcerpc_binding_handle **binding_handle);
|
||||||
NTSTATUS rpc_pipe_open_interface(TALLOC_CTX *mem_ctx,
|
NTSTATUS rpc_pipe_open_interface(TALLOC_CTX *mem_ctx,
|
||||||
const struct ndr_syntax_id *syntax,
|
const struct ndr_syntax_id *syntax,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
const struct tsocket_address *remote_address,
|
const struct tsocket_address *remote_address,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct rpc_pipe_client **cli_pipe);
|
struct rpc_pipe_client **cli_pipe);
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ static NTSTATUS auth_anonymous_session_info(TALLOC_CTX *mem_ctx,
|
|||||||
struct auth_session_info **session_info)
|
struct auth_session_info **session_info)
|
||||||
{
|
{
|
||||||
struct auth_session_info *i;
|
struct auth_session_info *i;
|
||||||
struct auth3_session_info *s;
|
struct auth_session_info *s;
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
|
|
||||||
i = talloc_zero(mem_ctx, struct auth_session_info);
|
i = talloc_zero(mem_ctx, struct auth_session_info);
|
||||||
@@ -99,7 +99,7 @@ static int make_server_pipes_struct(TALLOC_CTX *mem_ctx,
|
|||||||
|
|
||||||
if (session_info->unix_token && session_info->unix_info && session_info->security_token) {
|
if (session_info->unix_token && session_info->unix_info && session_info->security_token) {
|
||||||
/* Don't call create_local_token(), we already have the full details here */
|
/* Don't call create_local_token(), we already have the full details here */
|
||||||
p->session_info = talloc_zero(p, struct auth3_session_info);
|
p->session_info = talloc_zero(p, struct auth_session_info);
|
||||||
if (p->session_info == NULL) {
|
if (p->session_info == NULL) {
|
||||||
TALLOC_FREE(p);
|
TALLOC_FREE(p);
|
||||||
*perrno = ENOMEM;
|
*perrno = ENOMEM;
|
||||||
|
|||||||
@@ -554,7 +554,7 @@ static void prune_printername_cache(void)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static WERROR set_printer_hnd_name(TALLOC_CTX *mem_ctx,
|
static WERROR set_printer_hnd_name(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct printer_handle *Printer,
|
struct printer_handle *Printer,
|
||||||
const char *handlename)
|
const char *handlename)
|
||||||
@@ -1536,7 +1536,7 @@ void do_drv_upgrade_printer(struct messaging_context *msg,
|
|||||||
DATA_BLOB *data)
|
DATA_BLOB *data)
|
||||||
{
|
{
|
||||||
TALLOC_CTX *tmp_ctx;
|
TALLOC_CTX *tmp_ctx;
|
||||||
struct auth3_session_info *session_info = NULL;
|
struct auth_session_info *session_info = NULL;
|
||||||
struct spoolss_PrinterInfo2 *pinfo2;
|
struct spoolss_PrinterInfo2 *pinfo2;
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
WERROR result;
|
WERROR result;
|
||||||
@@ -3887,7 +3887,7 @@ static void compose_devicemode_devicename(struct spoolss_DeviceMode *dm,
|
|||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
|
||||||
static WERROR construct_printer_info0(TALLOC_CTX *mem_ctx,
|
static WERROR construct_printer_info0(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct spoolss_PrinterInfo2 *info2,
|
struct spoolss_PrinterInfo2 *info2,
|
||||||
const char *servername,
|
const char *servername,
|
||||||
@@ -4230,7 +4230,7 @@ static WERROR construct_printer_info7(TALLOC_CTX *mem_ctx,
|
|||||||
struct spoolss_PrinterInfo7 *r,
|
struct spoolss_PrinterInfo7 *r,
|
||||||
int snum)
|
int snum)
|
||||||
{
|
{
|
||||||
struct auth3_session_info *session_info;
|
struct auth_session_info *session_info;
|
||||||
struct GUID guid;
|
struct GUID guid;
|
||||||
NTSTATUS status;
|
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,
|
static WERROR enum_all_printers_info_level(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *servername,
|
const char *servername,
|
||||||
uint32_t level,
|
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,
|
static WERROR enumprinters_level0(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
uint32_t flags,
|
uint32_t flags,
|
||||||
const char *servername,
|
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,
|
static WERROR enum_all_printers_info_1(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *servername,
|
const char *servername,
|
||||||
uint32_t flags,
|
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,
|
static WERROR enum_all_printers_info_1_local(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *servername,
|
const char *servername,
|
||||||
union spoolss_PrinterInfo **info,
|
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,
|
static WERROR enum_all_printers_info_1_name(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *servername,
|
const char *servername,
|
||||||
union spoolss_PrinterInfo **info,
|
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,
|
static WERROR enum_all_printers_info_1_network(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *servername,
|
const char *servername,
|
||||||
union spoolss_PrinterInfo **info,
|
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,
|
static WERROR enum_all_printers_info_2(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *servername,
|
const char *servername,
|
||||||
union spoolss_PrinterInfo **info,
|
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,
|
static WERROR enumprinters_level1(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
uint32_t flags,
|
uint32_t flags,
|
||||||
const char *servername,
|
const char *servername,
|
||||||
@@ -4588,7 +4588,7 @@ static WERROR enumprinters_level1(TALLOC_CTX *mem_ctx,
|
|||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
|
||||||
static WERROR enumprinters_level2(TALLOC_CTX *mem_ctx,
|
static WERROR enumprinters_level2(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
uint32_t flags,
|
uint32_t flags,
|
||||||
const char *servername,
|
const char *servername,
|
||||||
@@ -4624,7 +4624,7 @@ static WERROR enumprinters_level2(TALLOC_CTX *mem_ctx,
|
|||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
|
||||||
static WERROR enumprinters_level4(TALLOC_CTX *mem_ctx,
|
static WERROR enumprinters_level4(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
uint32_t flags,
|
uint32_t flags,
|
||||||
const char *servername,
|
const char *servername,
|
||||||
@@ -4643,7 +4643,7 @@ static WERROR enumprinters_level4(TALLOC_CTX *mem_ctx,
|
|||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
|
||||||
static WERROR enumprinters_level5(TALLOC_CTX *mem_ctx,
|
static WERROR enumprinters_level5(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
uint32_t flags,
|
uint32_t flags,
|
||||||
const char *servername,
|
const char *servername,
|
||||||
@@ -4663,7 +4663,7 @@ static WERROR enumprinters_level5(TALLOC_CTX *mem_ctx,
|
|||||||
WERROR _spoolss_EnumPrinters(struct pipes_struct *p,
|
WERROR _spoolss_EnumPrinters(struct pipes_struct *p,
|
||||||
struct spoolss_EnumPrinters *r)
|
struct spoolss_EnumPrinters *r)
|
||||||
{
|
{
|
||||||
const struct auth3_session_info *session_info = get_session_info_system();
|
const struct auth_session_info *session_info = get_session_info_system();
|
||||||
WERROR result;
|
WERROR result;
|
||||||
|
|
||||||
/* that's an [in out] buffer */
|
/* 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,
|
static WERROR construct_printer_driver_info_level(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
uint32_t level,
|
uint32_t level,
|
||||||
union spoolss_DriverInfo *r,
|
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,
|
static WERROR control_printer(struct policy_handle *handle, uint32_t command,
|
||||||
struct pipes_struct *p)
|
struct pipes_struct *p)
|
||||||
{
|
{
|
||||||
const struct auth3_session_info *session_info = p->session_info;
|
const struct auth_session_info *session_info = p->session_info;
|
||||||
int snum;
|
int snum;
|
||||||
WERROR errcode = WERR_BADFUNC;
|
WERROR errcode = WERR_BADFUNC;
|
||||||
struct printer_handle *Printer = find_printer_index_by_hnd(p, handle);
|
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,
|
static WERROR update_dsspooler(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
int snum,
|
int snum,
|
||||||
struct spoolss_SetPrinterInfo2 *printer,
|
struct spoolss_SetPrinterInfo2 *printer,
|
||||||
@@ -7248,7 +7248,7 @@ static WERROR spoolss_setjob_1(TALLOC_CTX *mem_ctx,
|
|||||||
WERROR _spoolss_SetJob(struct pipes_struct *p,
|
WERROR _spoolss_SetJob(struct pipes_struct *p,
|
||||||
struct spoolss_SetJob *r)
|
struct spoolss_SetJob *r)
|
||||||
{
|
{
|
||||||
const struct auth3_session_info *session_info = p->session_info;
|
const struct auth_session_info *session_info = p->session_info;
|
||||||
int snum;
|
int snum;
|
||||||
WERROR errcode = WERR_BADFUNC;
|
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,
|
static WERROR enumprinterdrivers_level_by_architecture(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *servername,
|
const char *servername,
|
||||||
const char *architecture,
|
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,
|
static WERROR enumprinterdrivers_level(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *servername,
|
const char *servername,
|
||||||
const char *architecture,
|
const char *architecture,
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
#include "rpc_client/cli_winreg_spoolss.h"
|
#include "rpc_client/cli_winreg_spoolss.h"
|
||||||
|
|
||||||
WERROR winreg_printer_binding_handle(TALLOC_CTX *mem_ctx,
|
WERROR winreg_printer_binding_handle(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct dcerpc_binding_handle **winreg_binding_handle)
|
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,
|
WERROR winreg_delete_printer_key_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *printer,
|
const char *printer,
|
||||||
const char *key)
|
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,
|
WERROR winreg_printer_update_changeid_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *printer)
|
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,
|
WERROR winreg_printer_get_changeid_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *printer,
|
const char *printer,
|
||||||
uint32_t *pchangeid)
|
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,
|
WERROR winreg_get_printer_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *printer,
|
const char *printer,
|
||||||
struct spoolss_PrinterInfo2 **pinfo2)
|
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,
|
WERROR winreg_create_printer_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *sharename)
|
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,
|
WERROR winreg_update_printer_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *sharename,
|
const char *sharename,
|
||||||
uint32_t info2_mask,
|
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,
|
WERROR winreg_set_printer_dataex_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *printer,
|
const char *printer,
|
||||||
const char *key,
|
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,
|
WERROR winreg_enum_printer_dataex_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *printer,
|
const char *printer,
|
||||||
const char *key,
|
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,
|
WERROR winreg_get_printer_dataex_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *printer,
|
const char *printer,
|
||||||
const char *key,
|
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,
|
WERROR winreg_delete_printer_dataex_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *printer,
|
const char *printer,
|
||||||
const char *key,
|
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,
|
WERROR winreg_get_driver_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *architecture,
|
const char *architecture,
|
||||||
const char *driver_name,
|
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,
|
WERROR winreg_get_driver_list_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *architecture,
|
const char *architecture,
|
||||||
uint32_t version,
|
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,
|
WERROR winreg_del_driver_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct spoolss_DriverInfo8 *info8,
|
struct spoolss_DriverInfo8 *info8,
|
||||||
uint32_t version)
|
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,
|
WERROR winreg_add_driver_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct spoolss_AddDriverInfoCtr *r,
|
struct spoolss_AddDriverInfoCtr *r,
|
||||||
const char **driver_name,
|
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,
|
WERROR winreg_get_printer_secdesc_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *sharename,
|
const char *sharename,
|
||||||
struct spoolss_security_descriptor **psecdesc)
|
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,
|
WERROR winreg_set_printer_secdesc_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *sharename,
|
const char *sharename,
|
||||||
const struct spoolss_security_descriptor *secdesc)
|
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,
|
WERROR winreg_printer_enumforms1_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
uint32_t *pnum_info,
|
uint32_t *pnum_info,
|
||||||
union spoolss_FormInfo **pinfo)
|
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,
|
WERROR winreg_printer_getform1_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *form_name,
|
const char *form_name,
|
||||||
struct spoolss_FormInfo1 *r)
|
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,
|
WERROR winreg_printer_addform1_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct spoolss_AddFormInfo1 *form)
|
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,
|
WERROR winreg_printer_setform1_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *form_name,
|
const char *form_name,
|
||||||
struct spoolss_AddFormInfo1 *form)
|
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,
|
WERROR winreg_printer_deleteform1_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *form_name)
|
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,
|
WERROR winreg_enum_printer_key_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *printer,
|
const char *printer,
|
||||||
const char *key,
|
const char *key,
|
||||||
|
|||||||
@@ -22,39 +22,39 @@
|
|||||||
#ifndef _SRV_SPOOLSS_UITL_H
|
#ifndef _SRV_SPOOLSS_UITL_H
|
||||||
#define _SRV_SPOOLSS_UITL_H
|
#define _SRV_SPOOLSS_UITL_H
|
||||||
|
|
||||||
struct auth3_session_info;
|
struct auth_session_info;
|
||||||
struct dcerpc_binding_handle;
|
struct dcerpc_binding_handle;
|
||||||
|
|
||||||
WERROR winreg_printer_binding_handle(TALLOC_CTX *mem_ctx,
|
WERROR winreg_printer_binding_handle(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct dcerpc_binding_handle **winreg_binding_handle);
|
struct dcerpc_binding_handle **winreg_binding_handle);
|
||||||
|
|
||||||
WERROR winreg_delete_printer_key_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_delete_printer_key_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *printer,
|
const char *printer,
|
||||||
const char *key);
|
const char *key);
|
||||||
WERROR winreg_printer_update_changeid_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_printer_update_changeid_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *printer);
|
const char *printer);
|
||||||
WERROR winreg_printer_get_changeid_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_printer_get_changeid_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *printer,
|
const char *printer,
|
||||||
uint32_t *pchangeid);
|
uint32_t *pchangeid);
|
||||||
WERROR winreg_get_printer_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_get_printer_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *printer,
|
const char *printer,
|
||||||
struct spoolss_PrinterInfo2 **pinfo2);
|
struct spoolss_PrinterInfo2 **pinfo2);
|
||||||
WERROR winreg_create_printer_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_create_printer_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *sharename);
|
const char *sharename);
|
||||||
WERROR winreg_update_printer_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_update_printer_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *sharename,
|
const char *sharename,
|
||||||
uint32_t info2_mask,
|
uint32_t info2_mask,
|
||||||
@@ -62,7 +62,7 @@ WERROR winreg_update_printer_internal(TALLOC_CTX *mem_ctx,
|
|||||||
struct spoolss_DeviceMode *devmode,
|
struct spoolss_DeviceMode *devmode,
|
||||||
struct security_descriptor *secdesc);
|
struct security_descriptor *secdesc);
|
||||||
WERROR winreg_set_printer_dataex_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_set_printer_dataex_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *printer,
|
const char *printer,
|
||||||
const char *key,
|
const char *key,
|
||||||
@@ -71,14 +71,14 @@ WERROR winreg_set_printer_dataex_internal(TALLOC_CTX *mem_ctx,
|
|||||||
uint8_t *data,
|
uint8_t *data,
|
||||||
uint32_t data_size);
|
uint32_t data_size);
|
||||||
WERROR winreg_enum_printer_dataex_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_enum_printer_dataex_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *printer,
|
const char *printer,
|
||||||
const char *key,
|
const char *key,
|
||||||
uint32_t *pnum_values,
|
uint32_t *pnum_values,
|
||||||
struct spoolss_PrinterEnumValues **penum_values);
|
struct spoolss_PrinterEnumValues **penum_values);
|
||||||
WERROR winreg_get_printer_dataex_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_get_printer_dataex_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *printer,
|
const char *printer,
|
||||||
const char *key,
|
const char *key,
|
||||||
@@ -87,71 +87,71 @@ WERROR winreg_get_printer_dataex_internal(TALLOC_CTX *mem_ctx,
|
|||||||
uint8_t **data,
|
uint8_t **data,
|
||||||
uint32_t *data_size);
|
uint32_t *data_size);
|
||||||
WERROR winreg_delete_printer_dataex_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_delete_printer_dataex_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *printer,
|
const char *printer,
|
||||||
const char *key,
|
const char *key,
|
||||||
const char *value);
|
const char *value);
|
||||||
WERROR winreg_get_driver_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_get_driver_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *architecture,
|
const char *architecture,
|
||||||
const char *driver_name,
|
const char *driver_name,
|
||||||
uint32_t driver_version,
|
uint32_t driver_version,
|
||||||
struct spoolss_DriverInfo8 **_info8);
|
struct spoolss_DriverInfo8 **_info8);
|
||||||
WERROR winreg_get_driver_list_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_get_driver_list_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *architecture,
|
const char *architecture,
|
||||||
uint32_t version,
|
uint32_t version,
|
||||||
uint32_t *num_drivers,
|
uint32_t *num_drivers,
|
||||||
const char ***drivers_p);
|
const char ***drivers_p);
|
||||||
WERROR winreg_del_driver_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_del_driver_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct spoolss_DriverInfo8 *info8,
|
struct spoolss_DriverInfo8 *info8,
|
||||||
uint32_t version);
|
uint32_t version);
|
||||||
WERROR winreg_add_driver_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_add_driver_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct spoolss_AddDriverInfoCtr *r,
|
struct spoolss_AddDriverInfoCtr *r,
|
||||||
const char **driver_name,
|
const char **driver_name,
|
||||||
uint32_t *driver_version);
|
uint32_t *driver_version);
|
||||||
WERROR winreg_get_printer_secdesc_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_get_printer_secdesc_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *sharename,
|
const char *sharename,
|
||||||
struct spoolss_security_descriptor **psecdesc);
|
struct spoolss_security_descriptor **psecdesc);
|
||||||
WERROR winreg_set_printer_secdesc_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_set_printer_secdesc_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *sharename,
|
const char *sharename,
|
||||||
const struct spoolss_security_descriptor *secdesc);
|
const struct spoolss_security_descriptor *secdesc);
|
||||||
WERROR winreg_printer_enumforms1_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_printer_enumforms1_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
uint32_t *pnum_info,
|
uint32_t *pnum_info,
|
||||||
union spoolss_FormInfo **pinfo);
|
union spoolss_FormInfo **pinfo);
|
||||||
WERROR winreg_printer_getform1_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_printer_getform1_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *form_name,
|
const char *form_name,
|
||||||
struct spoolss_FormInfo1 *r);
|
struct spoolss_FormInfo1 *r);
|
||||||
WERROR winreg_printer_addform1_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_printer_addform1_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct spoolss_AddFormInfo1 *form);
|
struct spoolss_AddFormInfo1 *form);
|
||||||
WERROR winreg_printer_setform1_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_printer_setform1_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *form_name,
|
const char *form_name,
|
||||||
struct spoolss_AddFormInfo1 *form);
|
struct spoolss_AddFormInfo1 *form);
|
||||||
WERROR winreg_printer_deleteform1_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_printer_deleteform1_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *form_name);
|
const char *form_name);
|
||||||
WERROR winreg_enum_printer_key_internal(TALLOC_CTX *mem_ctx,
|
WERROR winreg_enum_printer_key_internal(TALLOC_CTX *mem_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const char *printer,
|
const char *printer,
|
||||||
const char *key,
|
const char *key,
|
||||||
|
|||||||
@@ -626,7 +626,7 @@ static bool pipe_ntlmssp_auth_bind(struct pipes_struct *p,
|
|||||||
static bool pipe_ntlmssp_verify_final(TALLOC_CTX *mem_ctx,
|
static bool pipe_ntlmssp_verify_final(TALLOC_CTX *mem_ctx,
|
||||||
struct auth_ntlmssp_state *ntlmssp_ctx,
|
struct auth_ntlmssp_state *ntlmssp_ctx,
|
||||||
enum dcerpc_AuthLevel auth_level,
|
enum dcerpc_AuthLevel auth_level,
|
||||||
struct auth3_session_info **session_info)
|
struct auth_session_info **session_info)
|
||||||
{
|
{
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
bool ret;
|
bool ret;
|
||||||
@@ -723,7 +723,7 @@ err:
|
|||||||
static NTSTATUS pipe_gssapi_verify_final(TALLOC_CTX *mem_ctx,
|
static NTSTATUS pipe_gssapi_verify_final(TALLOC_CTX *mem_ctx,
|
||||||
struct gse_context *gse_ctx,
|
struct gse_context *gse_ctx,
|
||||||
const struct tsocket_address *remote_address,
|
const struct tsocket_address *remote_address,
|
||||||
struct auth3_session_info **session_info)
|
struct auth_session_info **session_info)
|
||||||
{
|
{
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
bool bret;
|
bool bret;
|
||||||
|
|||||||
@@ -411,7 +411,7 @@ bool fsp_is_np(struct files_struct *fsp)
|
|||||||
NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name,
|
NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name,
|
||||||
const struct tsocket_address *local_address,
|
const struct tsocket_address *local_address,
|
||||||
const struct tsocket_address *remote_address,
|
const struct tsocket_address *remote_address,
|
||||||
struct auth3_session_info *session_info,
|
struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct fake_file_handle **phandle)
|
struct fake_file_handle **phandle)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ bool fsp_is_np(struct files_struct *fsp);
|
|||||||
NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name,
|
NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name,
|
||||||
const struct tsocket_address *local_address,
|
const struct tsocket_address *local_address,
|
||||||
const struct tsocket_address *remote_address,
|
const struct tsocket_address *remote_address,
|
||||||
struct auth3_session_info *session_info,
|
struct auth_session_info *session_info,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct fake_file_handle **phandle);
|
struct fake_file_handle **phandle);
|
||||||
bool np_read_in_progress(struct fake_file_handle *handle);
|
bool np_read_in_progress(struct fake_file_handle *handle);
|
||||||
|
|||||||
@@ -409,7 +409,7 @@ WERROR _svcctl_QueryServiceStatus(struct pipes_struct *p,
|
|||||||
|
|
||||||
static int enumerate_status(TALLOC_CTX *ctx,
|
static int enumerate_status(TALLOC_CTX *ctx,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct auth3_session_info *session_info,
|
struct auth_session_info *session_info,
|
||||||
struct ENUM_SERVICE_STATUSW **status)
|
struct ENUM_SERVICE_STATUSW **status)
|
||||||
{
|
{
|
||||||
int num_services = 0;
|
int num_services = 0;
|
||||||
@@ -670,7 +670,7 @@ WERROR _svcctl_QueryServiceStatusEx(struct pipes_struct *p,
|
|||||||
|
|
||||||
static WERROR fill_svc_config(TALLOC_CTX *mem_ctx,
|
static WERROR fill_svc_config(TALLOC_CTX *mem_ctx,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
struct auth3_session_info *session_info,
|
struct auth_session_info *session_info,
|
||||||
const char *name,
|
const char *name,
|
||||||
struct QUERY_SERVICE_CONFIG *config)
|
struct QUERY_SERVICE_CONFIG *config)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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 security_descriptor *svcctl_get_secdesc(TALLOC_CTX *mem_ctx,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
const char *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
struct dcerpc_binding_handle *h = NULL;
|
struct dcerpc_binding_handle *h = NULL;
|
||||||
@@ -147,7 +147,7 @@ done:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool svcctl_set_secdesc(struct messaging_context *msg_ctx,
|
bool svcctl_set_secdesc(struct messaging_context *msg_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
const char *name,
|
const char *name,
|
||||||
struct security_descriptor *sd)
|
struct security_descriptor *sd)
|
||||||
{
|
{
|
||||||
@@ -259,7 +259,7 @@ done:
|
|||||||
|
|
||||||
const char *svcctl_get_string_value(TALLOC_CTX *mem_ctx,
|
const char *svcctl_get_string_value(TALLOC_CTX *mem_ctx,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
const char *key_name,
|
const char *key_name,
|
||||||
const char *value_name)
|
const char *value_name)
|
||||||
{
|
{
|
||||||
@@ -321,7 +321,7 @@ done:
|
|||||||
|
|
||||||
const char *svcctl_lookup_dispname(TALLOC_CTX *mem_ctx,
|
const char *svcctl_lookup_dispname(TALLOC_CTX *mem_ctx,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
const char *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
const char *display_name = NULL;
|
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,
|
const char *svcctl_lookup_description(TALLOC_CTX *mem_ctx,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
const char *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
const char *description = NULL;
|
const char *description = NULL;
|
||||||
|
|||||||
@@ -24,34 +24,34 @@
|
|||||||
#ifndef SVC_WINREG_GLUE_H
|
#ifndef SVC_WINREG_GLUE_H
|
||||||
#define SVC_WINREG_GLUE_H
|
#define SVC_WINREG_GLUE_H
|
||||||
|
|
||||||
struct auth3_session_info;
|
struct auth_session_info;
|
||||||
|
|
||||||
struct security_descriptor* svcctl_gen_service_sd(TALLOC_CTX *mem_ctx);
|
struct security_descriptor* svcctl_gen_service_sd(TALLOC_CTX *mem_ctx);
|
||||||
|
|
||||||
struct security_descriptor *svcctl_get_secdesc(TALLOC_CTX *mem_ctx,
|
struct security_descriptor *svcctl_get_secdesc(TALLOC_CTX *mem_ctx,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
const char *name);
|
const char *name);
|
||||||
|
|
||||||
bool svcctl_set_secdesc(struct messaging_context *msg_ctx,
|
bool svcctl_set_secdesc(struct messaging_context *msg_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
const char *name,
|
const char *name,
|
||||||
struct security_descriptor *sd);
|
struct security_descriptor *sd);
|
||||||
|
|
||||||
const char *svcctl_get_string_value(TALLOC_CTX *mem_ctx,
|
const char *svcctl_get_string_value(TALLOC_CTX *mem_ctx,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
const char *key_name,
|
const char *key_name,
|
||||||
const char *value_name);
|
const char *value_name);
|
||||||
|
|
||||||
const char *svcctl_lookup_dispname(TALLOC_CTX *mem_ctx,
|
const char *svcctl_lookup_dispname(TALLOC_CTX *mem_ctx,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
const char *name);
|
const char *name);
|
||||||
|
|
||||||
const char *svcctl_lookup_description(TALLOC_CTX *mem_ctx,
|
const char *svcctl_lookup_description(TALLOC_CTX *mem_ctx,
|
||||||
struct messaging_context *msg_ctx,
|
struct messaging_context *msg_ctx,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
const char *name);
|
const char *name);
|
||||||
|
|
||||||
#endif /* SVC_WINREG_GLUE_H */
|
#endif /* SVC_WINREG_GLUE_H */
|
||||||
|
|||||||
@@ -422,7 +422,7 @@ struct smbd_smb2_session {
|
|||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
uint64_t vuid;
|
uint64_t vuid;
|
||||||
struct auth_ntlmssp_state *auth_ntlmssp_state;
|
struct auth_ntlmssp_state *auth_ntlmssp_state;
|
||||||
struct auth3_session_info *session_info;
|
struct auth_session_info *session_info;
|
||||||
DATA_BLOB session_key;
|
DATA_BLOB session_key;
|
||||||
bool do_signing;
|
bool do_signing;
|
||||||
|
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
|
|||||||
connection_struct **pconn,
|
connection_struct **pconn,
|
||||||
int snum,
|
int snum,
|
||||||
const char *path,
|
const char *path,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
char **poldcwd)
|
char **poldcwd)
|
||||||
{
|
{
|
||||||
connection_struct *conn;
|
connection_struct *conn;
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ int register_homes_share(const char *username)
|
|||||||
|
|
||||||
int register_existing_vuid(struct smbd_server_connection *sconn,
|
int register_existing_vuid(struct smbd_server_connection *sconn,
|
||||||
uint16 vuid,
|
uint16 vuid,
|
||||||
struct auth3_session_info *session_info,
|
struct auth_session_info *session_info,
|
||||||
DATA_BLOB response_blob,
|
DATA_BLOB response_blob,
|
||||||
const char *smb_name)
|
const char *smb_name)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -478,7 +478,7 @@ NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
|
|||||||
connection_struct **pconn,
|
connection_struct **pconn,
|
||||||
int snum,
|
int snum,
|
||||||
const char *path,
|
const char *path,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
char **poldcwd);
|
char **poldcwd);
|
||||||
|
|
||||||
/* The following definitions come from smbd/negprot.c */
|
/* 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_homes_share(const char *username);
|
||||||
int register_existing_vuid(struct smbd_server_connection *sconn,
|
int register_existing_vuid(struct smbd_server_connection *sconn,
|
||||||
uint16 vuid,
|
uint16 vuid,
|
||||||
struct auth3_session_info *session_info,
|
struct auth_session_info *session_info,
|
||||||
DATA_BLOB response_blob,
|
DATA_BLOB response_blob,
|
||||||
const char *smb_name);
|
const char *smb_name);
|
||||||
void add_session_user(struct smbd_server_connection *sconn, const char *user);
|
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 */
|
/* The following definitions come from smbd/sesssetup.c */
|
||||||
|
|
||||||
NTSTATUS do_map_to_guest(NTSTATUS status,
|
NTSTATUS do_map_to_guest(NTSTATUS status,
|
||||||
struct auth3_session_info **session_info,
|
struct auth_session_info **session_info,
|
||||||
const char *user, const char *domain);
|
const char *user, const char *domain);
|
||||||
|
|
||||||
NTSTATUS parse_spnego_mechanisms(TALLOC_CTX *ctx,
|
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_guest(void);
|
||||||
bool change_to_user(connection_struct *conn, uint16 vuid);
|
bool change_to_user(connection_struct *conn, uint16 vuid);
|
||||||
bool change_to_user_by_session(connection_struct *conn,
|
bool change_to_user_by_session(connection_struct *conn,
|
||||||
const struct auth3_session_info *session_info);
|
const struct auth_session_info *session_info);
|
||||||
bool change_to_root_user(void);
|
bool change_to_root_user(void);
|
||||||
bool smbd_change_to_root_user(void);
|
bool smbd_change_to_root_user(void);
|
||||||
bool become_authenticated_pipe_user(struct auth3_session_info *session_info);
|
bool become_authenticated_pipe_user(struct auth_session_info *session_info);
|
||||||
bool unbecome_authenticated_pipe_user(void);
|
bool unbecome_authenticated_pipe_user(void);
|
||||||
void become_root(void);
|
void become_root(void);
|
||||||
void unbecome_root(void);
|
void unbecome_root(void);
|
||||||
@@ -1119,7 +1119,7 @@ void smbd_become_root(void);
|
|||||||
void smbd_unbecome_root(void);
|
void smbd_unbecome_root(void);
|
||||||
bool become_user(connection_struct *conn, uint16 vuid);
|
bool become_user(connection_struct *conn, uint16 vuid);
|
||||||
bool become_user_by_session(connection_struct *conn,
|
bool become_user_by_session(connection_struct *conn,
|
||||||
const struct auth3_session_info *session_info);
|
const struct auth_session_info *session_info);
|
||||||
bool unbecome_user(void);
|
bool unbecome_user(void);
|
||||||
uid_t get_current_uid(connection_struct *conn);
|
uid_t get_current_uid(connection_struct *conn);
|
||||||
gid_t get_current_gid(connection_struct *conn);
|
gid_t get_current_gid(connection_struct *conn);
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
void reload_printers(struct tevent_context *ev,
|
void reload_printers(struct tevent_context *ev,
|
||||||
struct messaging_context *msg_ctx)
|
struct messaging_context *msg_ctx)
|
||||||
{
|
{
|
||||||
struct auth3_session_info *session_info = NULL;
|
struct auth_session_info *session_info = NULL;
|
||||||
struct spoolss_PrinterInfo2 *pinfo2 = NULL;
|
struct spoolss_PrinterInfo2 *pinfo2 = NULL;
|
||||||
int snum;
|
int snum;
|
||||||
int n_services = lp_numservices();
|
int n_services = lp_numservices();
|
||||||
|
|||||||
@@ -373,14 +373,14 @@ static NTSTATUS find_forced_group(bool force_user,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Create an auth3_session_info structure for a connection_struct
|
Create an auth_session_info structure for a connection_struct
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static NTSTATUS create_connection_session_info(struct smbd_server_connection *sconn,
|
static NTSTATUS create_connection_session_info(struct smbd_server_connection *sconn,
|
||||||
TALLOC_CTX *mem_ctx, int snum,
|
TALLOC_CTX *mem_ctx, int snum,
|
||||||
struct auth3_session_info *vuid_serverinfo,
|
struct auth_session_info *vuid_serverinfo,
|
||||||
DATA_BLOB password,
|
DATA_BLOB password,
|
||||||
struct auth3_session_info **presult)
|
struct auth_session_info **presult)
|
||||||
{
|
{
|
||||||
if (lp_guest_only(snum)) {
|
if (lp_guest_only(snum)) {
|
||||||
return make_session_info_guest(mem_ctx, presult);
|
return make_session_info_guest(mem_ctx, presult);
|
||||||
@@ -388,7 +388,7 @@ static NTSTATUS create_connection_session_info(struct smbd_server_connection *sc
|
|||||||
|
|
||||||
if (vuid_serverinfo != NULL) {
|
if (vuid_serverinfo != NULL) {
|
||||||
|
|
||||||
struct auth3_session_info *result;
|
struct auth_session_info *result;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is the normal security != share case where we have a
|
* This is the normal security != share case where we have a
|
||||||
@@ -466,7 +466,7 @@ NTSTATUS set_conn_force_user_group(connection_struct *conn, int snum)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
char *fuser;
|
char *fuser;
|
||||||
struct auth3_session_info *forced_serverinfo;
|
struct auth_session_info *forced_serverinfo;
|
||||||
|
|
||||||
fuser = talloc_string_sub(conn, lp_force_user(snum), "%S",
|
fuser = talloc_string_sub(conn, lp_force_user(snum), "%S",
|
||||||
lp_const_servicename(snum));
|
lp_const_servicename(snum));
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ static NTSTATUS do_map_to_guest_server_info(NTSTATUS status,
|
|||||||
is set approriately
|
is set approriately
|
||||||
*/
|
*/
|
||||||
NTSTATUS do_map_to_guest(NTSTATUS status,
|
NTSTATUS do_map_to_guest(NTSTATUS status,
|
||||||
struct auth3_session_info **session_info,
|
struct auth_session_info **session_info,
|
||||||
const char *user, const char *domain)
|
const char *user, const char *domain)
|
||||||
{
|
{
|
||||||
user = user ? user : "";
|
user = user ? user : "";
|
||||||
@@ -282,7 +282,7 @@ static void reply_spnego_kerberos(struct smb_request *req,
|
|||||||
int sess_vuid = req->vuid;
|
int sess_vuid = req->vuid;
|
||||||
NTSTATUS ret = NT_STATUS_OK;
|
NTSTATUS ret = NT_STATUS_OK;
|
||||||
DATA_BLOB ap_rep, ap_rep_wrapped, response;
|
DATA_BLOB ap_rep, ap_rep_wrapped, response;
|
||||||
struct auth3_session_info *session_info = NULL;
|
struct auth_session_info *session_info = NULL;
|
||||||
DATA_BLOB session_key = data_blob_null;
|
DATA_BLOB session_key = data_blob_null;
|
||||||
uint8 tok_id[2];
|
uint8 tok_id[2];
|
||||||
DATA_BLOB nullblob = data_blob_null;
|
DATA_BLOB nullblob = data_blob_null;
|
||||||
@@ -487,7 +487,7 @@ static void reply_spnego_ntlmssp(struct smb_request *req,
|
|||||||
{
|
{
|
||||||
bool do_invalidate = true;
|
bool do_invalidate = true;
|
||||||
DATA_BLOB response;
|
DATA_BLOB response;
|
||||||
struct auth3_session_info *session_info = NULL;
|
struct auth_session_info *session_info = NULL;
|
||||||
struct smbd_server_connection *sconn = req->sconn;
|
struct smbd_server_connection *sconn = req->sconn;
|
||||||
|
|
||||||
if (NT_STATUS_IS_OK(nt_status)) {
|
if (NT_STATUS_IS_OK(nt_status)) {
|
||||||
@@ -1328,7 +1328,7 @@ void reply_sesssetup_and_X(struct smb_request *req)
|
|||||||
const char *primary_domain;
|
const char *primary_domain;
|
||||||
struct auth_usersupplied_info *user_info = NULL;
|
struct auth_usersupplied_info *user_info = NULL;
|
||||||
struct auth_serversupplied_info *server_info = NULL;
|
struct auth_serversupplied_info *server_info = NULL;
|
||||||
struct auth3_session_info *session_info = NULL;
|
struct auth_session_info *session_info = NULL;
|
||||||
uint16 smb_flag2 = req->flags2;
|
uint16 smb_flag2 = req->flags2;
|
||||||
|
|
||||||
NTSTATUS nt_status;
|
NTSTATUS nt_status;
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ static void free_conn_session_info_if_unused(connection_struct *conn)
|
|||||||
|
|
||||||
static bool check_user_ok(connection_struct *conn,
|
static bool check_user_ok(connection_struct *conn,
|
||||||
uint16_t vuid,
|
uint16_t vuid,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
int snum)
|
int snum)
|
||||||
{
|
{
|
||||||
bool valid_vuid = (vuid != UID_FIELD_INVALID);
|
bool valid_vuid = (vuid != UID_FIELD_INVALID);
|
||||||
@@ -190,7 +190,7 @@ static bool check_user_ok(connection_struct *conn,
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static bool change_to_user_internal(connection_struct *conn,
|
static bool change_to_user_internal(connection_struct *conn,
|
||||||
const struct auth3_session_info *session_info,
|
const struct auth_session_info *session_info,
|
||||||
uint16_t vuid)
|
uint16_t vuid)
|
||||||
{
|
{
|
||||||
int snum;
|
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)
|
bool change_to_user(connection_struct *conn, uint16_t vuid)
|
||||||
{
|
{
|
||||||
const struct auth3_session_info *session_info = NULL;
|
const struct auth_session_info *session_info = NULL;
|
||||||
user_struct *vuser;
|
user_struct *vuser;
|
||||||
int snum = SNUM(conn);
|
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,
|
bool change_to_user_by_session(connection_struct *conn,
|
||||||
const struct auth3_session_info *session_info)
|
const struct auth_session_info *session_info)
|
||||||
{
|
{
|
||||||
SMB_ASSERT(conn != NULL);
|
SMB_ASSERT(conn != NULL);
|
||||||
SMB_ASSERT(session_info != NULL);
|
SMB_ASSERT(session_info != NULL);
|
||||||
@@ -367,7 +367,7 @@ bool smbd_change_to_root_user(void)
|
|||||||
user. Doesn't modify current_user.
|
user. Doesn't modify current_user.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
bool become_authenticated_pipe_user(struct auth3_session_info *session_info)
|
bool become_authenticated_pipe_user(struct auth_session_info *session_info)
|
||||||
{
|
{
|
||||||
if (!push_sec_ctx())
|
if (!push_sec_ctx())
|
||||||
return False;
|
return False;
|
||||||
@@ -487,7 +487,7 @@ bool become_user(connection_struct *conn, uint16 vuid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool become_user_by_session(connection_struct *conn,
|
bool become_user_by_session(connection_struct *conn,
|
||||||
const struct auth3_session_info *session_info)
|
const struct auth_session_info *session_info)
|
||||||
{
|
{
|
||||||
if (!push_sec_ctx())
|
if (!push_sec_ctx())
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -43,13 +43,13 @@ static NTSTATUS open_internal_samr_pipe(TALLOC_CTX *mem_ctx,
|
|||||||
struct rpc_pipe_client **samr_pipe)
|
struct rpc_pipe_client **samr_pipe)
|
||||||
{
|
{
|
||||||
struct rpc_pipe_client *cli = NULL;
|
struct rpc_pipe_client *cli = NULL;
|
||||||
struct auth3_session_info *session_info = NULL;
|
struct auth_session_info *session_info = NULL;
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
|
|
||||||
if (session_info == NULL) {
|
if (session_info == NULL) {
|
||||||
status = make_session_info_system(mem_ctx, &session_info);
|
status = make_session_info_system(mem_ctx, &session_info);
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
DEBUG(0, ("open_samr_pipe: Could not create auth3_session_info: %s\n",
|
DEBUG(0, ("open_samr_pipe: Could not create auth_session_info: %s\n",
|
||||||
nt_errstr(status)));
|
nt_errstr(status)));
|
||||||
return 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 **lsa_pipe)
|
||||||
{
|
{
|
||||||
struct rpc_pipe_client *cli = NULL;
|
struct rpc_pipe_client *cli = NULL;
|
||||||
struct auth3_session_info *session_info = NULL;
|
struct auth_session_info *session_info = NULL;
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
|
|
||||||
if (session_info == NULL) {
|
if (session_info == NULL) {
|
||||||
status = make_session_info_system(mem_ctx, &session_info);
|
status = make_session_info_system(mem_ctx, &session_info);
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
DEBUG(0, ("open_lsa_pipe: Could not create auth3_session_info: %s\n",
|
DEBUG(0, ("open_lsa_pipe: Could not create auth_session_info: %s\n",
|
||||||
nt_errstr(status)));
|
nt_errstr(status)));
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user