[SCM] Samba Shared Repository - branch v3-3-test updated -
release-3-2-0pre2-2594-g344d69f
Volker Lendecke
vlendec at samba.org
Sun May 25 10:06:13 GMT 2008
The branch, v3-3-test has been updated
via 344d69f95e217d16213eaa6b53141af6ab459708 (commit)
via 17b0db20d28d1b737c5e86b78106657e8ca5ce9c (commit)
via f52d7c3faba4aa815d95883775f4859251406161 (commit)
via c1e115964b671802a4af5beab3ad3222ee17b9c0 (commit)
from 534e87de2eed10db0c8fc5dd8ab7dd2621b09408 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test
- Log -----------------------------------------------------------------
commit 344d69f95e217d16213eaa6b53141af6ab459708
Author: Volker Lendecke <vl at samba.org>
Date: Sun May 11 11:26:33 2008 +0200
Remove some references to get_current_username() and current_user_info
commit 17b0db20d28d1b737c5e86b78106657e8ca5ce9c
Author: Volker Lendecke <vl at samba.org>
Date: Sun May 11 01:03:45 2008 +0200
Remove the reference to current_user_info from share_access.c
This required to pass around the domain a bit
commit f52d7c3faba4aa815d95883775f4859251406161
Author: Volker Lendecke <vl at samba.org>
Date: Sun May 11 01:02:52 2008 +0200
Remove reference to current_user_info from lanman.c
commit c1e115964b671802a4af5beab3ad3222ee17b9c0
Author: Volker Lendecke <vl at samba.org>
Date: Sun May 25 11:43:15 2008 +0200
Remove stuff from client_proto.h
-----------------------------------------------------------------------
Summary of changes:
source/client/client_proto.h | 404 ------------------------------------
source/include/proto.h | 5 +-
source/lib/afs.c | 8 +-
source/modules/vfs_expand_msdfs.c | 2 +-
source/modules/vfs_full_audit.c | 6 +-
source/modules/vfs_recycle.c | 2 +-
source/printing/nt_printing.c | 2 +-
source/rpc_server/srv_spoolss_nt.c | 16 +-
source/smbd/lanman.c | 32 ++--
source/smbd/msdfs.c | 11 +
source/smbd/service.c | 21 +-
source/smbd/share_access.c | 26 ++-
source/smbd/uid.c | 9 +-
13 files changed, 82 insertions(+), 462 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/client/client_proto.h b/source/client/client_proto.h
index 7adc086..aa3eb0e 100644
--- a/source/client/client_proto.h
+++ b/source/client/client_proto.h
@@ -49,408 +49,4 @@ int tar_parseargs(int argc, char *argv[], const char *Optarg, int Optind);
int do_smb_browse(void);
int do_smb_browse(void);
-/* The following definitions come from rpc_client/cli_netlogon.c */
-
-NTSTATUS rpccli_netlogon_setup_creds(struct rpc_pipe_client *cli,
- const char *server_name,
- const char *domain,
- const char *clnt_name,
- const char *machine_account,
- const unsigned char machine_pwd[16],
- enum netr_SchannelType sec_chan_type,
- uint32_t *neg_flags_inout);
-NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- uint32 logon_parameters,
- const char *domain,
- const char *username,
- const char *password,
- const char *workstation,
- int logon_type);
-NTSTATUS rpccli_netlogon_sam_network_logon(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- uint32 logon_parameters,
- const char *server,
- const char *username,
- const char *domain,
- const char *workstation,
- const uint8 chal[8],
- DATA_BLOB lm_response,
- DATA_BLOB nt_response,
- struct netr_SamInfo3 **info3);
-NTSTATUS rpccli_netlogon_sam_network_logon_ex(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- uint32 logon_parameters,
- const char *server,
- const char *username,
- const char *domain,
- const char *workstation,
- const uint8 chal[8],
- DATA_BLOB lm_response,
- DATA_BLOB nt_response,
- struct netr_SamInfo3 **info3);
-
-/* The following definitions come from rpc_client/cli_pipe.c */
-
-NTSTATUS rpc_api_pipe_req(struct rpc_pipe_client *cli,
- uint8 op_num,
- prs_struct *in_data,
- prs_struct *out_data);
-NTSTATUS rpc_pipe_bind(struct rpc_pipe_client *cli,
- struct cli_pipe_auth_data *auth);
-unsigned int rpccli_set_timeout(struct rpc_pipe_client *cli,
- unsigned int timeout);
-bool rpccli_is_pipe_idx(struct rpc_pipe_client *cli, int pipe_idx);
-bool rpccli_get_pwd_hash(struct rpc_pipe_client *cli, uint8_t nt_hash[16]);
-struct cli_state *rpc_pipe_np_smb_conn(struct rpc_pipe_client *p);
-NTSTATUS rpccli_anon_bind_data(TALLOC_CTX *mem_ctx,
- struct cli_pipe_auth_data **presult);
-NTSTATUS rpccli_ntlmssp_bind_data(TALLOC_CTX *mem_ctx,
- enum pipe_auth_type auth_type,
- enum pipe_auth_level auth_level,
- const char *domain,
- const char *username,
- const char *password,
- struct cli_pipe_auth_data **presult);
-NTSTATUS rpccli_schannel_bind_data(TALLOC_CTX *mem_ctx, const char *domain,
- enum pipe_auth_level auth_level,
- const uint8_t sess_key[16],
- struct cli_pipe_auth_data **presult);
-NTSTATUS rpccli_kerberos_bind_data(TALLOC_CTX *mem_ctx,
- enum pipe_auth_level auth_level,
- const char *service_princ,
- const char *username,
- const char *password,
- struct cli_pipe_auth_data **presult);
-NTSTATUS rpc_pipe_open_tcp(TALLOC_CTX *mem_ctx, const char *host,
- const struct ndr_syntax_id *abstract_syntax,
- struct rpc_pipe_client **presult);
-struct rpc_pipe_client *cli_rpc_pipe_open_noauth(struct cli_state *cli, int pipe_idx, NTSTATUS *perr);
-struct rpc_pipe_client *cli_rpc_pipe_open_ntlmssp(struct cli_state *cli,
- int pipe_idx,
- enum pipe_auth_level auth_level,
- const char *domain,
- const char *username,
- const char *password,
- NTSTATUS *perr);
-struct rpc_pipe_client *cli_rpc_pipe_open_spnego_ntlmssp(struct cli_state *cli,
- int pipe_idx,
- enum pipe_auth_level auth_level,
- const char *domain,
- const char *username,
- const char *password,
- NTSTATUS *perr);
-struct rpc_pipe_client *get_schannel_session_key(struct cli_state *cli,
- const char *domain,
- uint32 *pneg_flags,
- NTSTATUS *perr);
-struct rpc_pipe_client *cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli,
- int pipe_idx,
- enum pipe_auth_level auth_level,
- const char *domain,
- const struct dcinfo *pdc,
- NTSTATUS *perr);
-struct rpc_pipe_client *cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli,
- int pipe_idx,
- enum pipe_auth_level auth_level,
- const char *domain,
- const char *username,
- const char *password,
- NTSTATUS *perr);
-struct rpc_pipe_client *cli_rpc_pipe_open_schannel(struct cli_state *cli,
- int pipe_idx,
- enum pipe_auth_level auth_level,
- const char *domain,
- NTSTATUS *perr);
-struct rpc_pipe_client *cli_rpc_pipe_open_krb5(struct cli_state *cli,
- int pipe_idx,
- enum pipe_auth_level auth_level,
- const char *service_princ,
- const char *username,
- const char *password,
- NTSTATUS *perr);
-
-/* The following definitions come from rpc_client/init_lsa.c */
-
-void init_lsa_String(struct lsa_String *name, const char *s);
-void init_lsa_StringLarge(struct lsa_StringLarge *name, const char *s);
-void init_lsa_AsciiString(struct lsa_AsciiString *name, const char *s);
-void init_lsa_AsciiStringLarge(struct lsa_AsciiStringLarge *name, const char *s);
-void init_lsa_sec_qos(struct lsa_QosInfo *r,
- uint32_t len,
- uint16_t impersonation_level,
- uint8_t context_mode,
- uint8_t effective_only);
-void init_lsa_obj_attr(struct lsa_ObjectAttribute *r,
- uint32_t len,
- uint8_t *root_dir,
- const char *object_name,
- uint32_t attributes,
- struct security_descriptor *sec_desc,
- struct lsa_QosInfo *sec_qos);
-void init_lsa_translated_sid(struct lsa_TranslatedSid *r,
- enum lsa_SidType sid_type,
- uint32_t rid,
- uint32_t sid_index);
-void init_lsa_translated_name2(struct lsa_TranslatedName2 *r,
- enum lsa_SidType sid_type,
- const char *name,
- uint32_t sid_index,
- uint32_t unknown);
-
-/* The following definitions come from rpc_client/init_netlogon.c */
-
-void init_netr_SamBaseInfo(struct netr_SamBaseInfo *r,
- NTTIME last_logon,
- NTTIME last_logoff,
- NTTIME acct_expiry,
- NTTIME last_password_change,
- NTTIME allow_password_change,
- NTTIME force_password_change,
- const char *account_name,
- const char *full_name,
- const char *logon_script,
- const char *profile_path,
- const char *home_directory,
- const char *home_drive,
- uint16_t logon_count,
- uint16_t bad_password_count,
- uint32_t rid,
- uint32_t primary_gid,
- struct samr_RidWithAttributeArray groups,
- uint32_t user_flags,
- struct netr_UserSessionKey key,
- const char *logon_server,
- const char *domain,
- struct dom_sid2 *domain_sid,
- struct netr_LMSessionKey LMSessKey,
- uint32_t acct_flags);
-void init_netr_SamInfo3(struct netr_SamInfo3 *r,
- NTTIME last_logon,
- NTTIME last_logoff,
- NTTIME acct_expiry,
- NTTIME last_password_change,
- NTTIME allow_password_change,
- NTTIME force_password_change,
- const char *account_name,
- const char *full_name,
- const char *logon_script,
- const char *profile_path,
- const char *home_directory,
- const char *home_drive,
- uint16_t logon_count,
- uint16_t bad_password_count,
- uint32_t rid,
- uint32_t primary_gid,
- struct samr_RidWithAttributeArray groups,
- uint32_t user_flags,
- struct netr_UserSessionKey key,
- const char *logon_server,
- const char *domain,
- struct dom_sid2 *domain_sid,
- struct netr_LMSessionKey LMSessKey,
- uint32_t acct_flags,
- uint32_t sidcount,
- struct netr_SidAttr *sids);
-NTSTATUS serverinfo_to_SamInfo3(struct auth_serversupplied_info *server_info,
- uint8_t pipe_session_key[16],
- struct netr_SamInfo3 *sam3);
-void init_netr_IdentityInfo(struct netr_IdentityInfo *r,
- const char *domain_name,
- uint32_t parameter_control,
- uint32_t logon_id_low,
- uint32_t logon_id_high,
- const char *account_name,
- const char *workstation);
-void init_netr_NetworkInfo(struct netr_NetworkInfo *r,
- const char *domain_name,
- uint32_t parameter_control,
- uint32_t logon_id_low,
- uint32_t logon_id_high,
- const char *account_name,
- const char *workstation,
- uint8_t challenge[8],
- struct netr_ChallengeResponse nt,
- struct netr_ChallengeResponse lm);
-void init_netr_PasswordInfo(struct netr_PasswordInfo *r,
- const char *domain_name,
- uint32_t parameter_control,
- uint32_t logon_id_low,
- uint32_t logon_id_high,
- const char *account_name,
- const char *workstation,
- struct samr_Password lmpassword,
- struct samr_Password ntpassword);
-
-/* The following definitions come from rpc_client/init_srvsvc.c */
-
-void init_srvsvc_NetSrvInfo102(struct srvsvc_NetSrvInfo102 *r,
- enum srvsvc_PlatformId platform_id,
- const char *server_name,
- uint32_t version_major,
- uint32_t version_minor,
- uint32_t server_type,
- const char *comment,
- uint32_t users,
- uint32_t disc,
- uint32_t hidden,
- uint32_t announce,
- uint32_t anndelta,
- uint32_t licenses,
- const char *userpath);
-void init_srvsvc_NetSrvInfo101(struct srvsvc_NetSrvInfo101 *r,
- enum srvsvc_PlatformId platform_id,
- const char *server_name,
- uint32_t version_major,
- uint32_t version_minor,
- uint32_t server_type,
- const char *comment);
-void init_srvsvc_NetSrvInfo100(struct srvsvc_NetSrvInfo100 *r,
- enum srvsvc_PlatformId platform_id,
- const char *server_name);
-void init_srvsvc_NetShareInfo0(struct srvsvc_NetShareInfo0 *r,
- const char *name);
-void init_srvsvc_NetShareInfo1(struct srvsvc_NetShareInfo1 *r,
- const char *name,
- enum srvsvc_ShareType type,
- const char *comment);
-void init_srvsvc_NetShareInfo2(struct srvsvc_NetShareInfo2 *r,
- const char *name,
- enum srvsvc_ShareType type,
- const char *comment,
- uint32_t permissions,
- uint32_t max_users,
- uint32_t current_users,
- const char *path,
- const char *password);
-void init_srvsvc_NetShareInfo501(struct srvsvc_NetShareInfo501 *r,
- const char *name,
- enum srvsvc_ShareType type,
- const char *comment,
- uint32_t csc_policy);
-void init_srvsvc_NetShareInfo502(struct srvsvc_NetShareInfo502 *r,
- const char *name,
- enum srvsvc_ShareType type,
- const char *comment,
- uint32_t permissions,
- uint32_t max_users,
- uint32_t current_users,
- const char *path,
- const char *password,
- struct sec_desc_buf *sd_buf);
-void init_srvsvc_NetShareInfo1004(struct srvsvc_NetShareInfo1004 *r,
- const char *comment);
-void init_srvsvc_NetShareInfo1005(struct srvsvc_NetShareInfo1005 *r,
- uint32_t dfs_flags);
-void init_srvsvc_NetShareInfo1006(struct srvsvc_NetShareInfo1006 *r,
- uint32_t max_users);
-void init_srvsvc_NetShareInfo1007(struct srvsvc_NetShareInfo1007 *r,
- uint32_t flags,
- const char *alternate_directory_name);
-void init_srvsvc_NetRemoteTODInfo(struct srvsvc_NetRemoteTODInfo *r,
- uint32_t elapsed,
- uint32_t msecs,
- uint32_t hours,
- uint32_t mins,
- uint32_t secs,
- uint32_t hunds,
- int32_t ttimezone,
- uint32_t tinterval,
- uint32_t day,
- uint32_t month,
- uint32_t year,
- uint32_t weekday);
-void init_srvsvc_NetSessInfo0(struct srvsvc_NetSessInfo0 *r,
- const char *client);
-void init_srvsvc_NetSessInfo1(struct srvsvc_NetSessInfo1 *r,
- const char *client,
- const char *user,
- uint32_t num_open,
- uint32_t _time,
- uint32_t idle_time,
- uint32_t user_flags);
-void init_srvsvc_NetSessInfo2(struct srvsvc_NetSessInfo2 *r,
- const char *client,
- const char *user,
- uint32_t num_open,
- uint32_t _time,
- uint32_t idle_time,
- uint32_t user_flags,
- const char *client_type);
-void init_srvsvc_NetSessInfo10(struct srvsvc_NetSessInfo10 *r,
- const char *client,
- const char *user,
- uint32_t _time,
- uint32_t idle_time);
-void init_srvsvc_NetSessInfo502(struct srvsvc_NetSessInfo502 *r,
- const char *client,
- const char *user,
- uint32_t num_open,
- uint32_t _time,
- uint32_t idle_time,
- uint32_t user_flags,
- const char *client_type,
- const char *transport);
-void init_srvsvc_NetFileInfo2(struct srvsvc_NetFileInfo2 *r,
- uint32_t fid);
-void init_srvsvc_NetFileInfo3(struct srvsvc_NetFileInfo3 *r,
- uint32_t fid,
- uint32_t permissions,
- uint32_t num_locks,
- const char *path,
- const char *user);
-void init_srvsvc_NetConnInfo0(struct srvsvc_NetConnInfo0 *r,
- uint32_t conn_id);
-void init_srvsvc_NetConnInfo1(struct srvsvc_NetConnInfo1 *r,
- uint32_t conn_id,
- uint32_t conn_type,
- uint32_t num_open,
- uint32_t num_users,
- uint32_t conn_time,
- const char *user,
- const char *share);
-
-/* The following definitions come from rpc_parse/parse_rpc.c */
-
-const char *cli_get_pipe_name(int pipe_idx);
-int cli_get_pipe_idx(const RPC_IFACE *syntax);
-void init_rpc_hdr(RPC_HDR *hdr, enum RPC_PKT_TYPE pkt_type, uint8 flags,
- uint32 call_id, int data_len, int auth_len);
-bool smb_io_rpc_hdr(const char *desc, RPC_HDR *rpc, prs_struct *ps, int depth);
-void init_rpc_context(RPC_CONTEXT *rpc_ctx, uint16 context_id,
- const RPC_IFACE *abstract, const RPC_IFACE *transfer);
-void init_rpc_hdr_rb(RPC_HDR_RB *rpc,
- uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid,
- RPC_CONTEXT *context);
-bool smb_io_rpc_context(const char *desc, RPC_CONTEXT *rpc_ctx, prs_struct *ps, int depth);
-bool smb_io_rpc_hdr_rb(const char *desc, RPC_HDR_RB *rpc, prs_struct *ps, int depth);
-void init_rpc_hdr_ba(RPC_HDR_BA *rpc,
- uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid,
- const char *pipe_addr,
- uint8 num_results, uint16 result, uint16 reason,
- RPC_IFACE *transfer);
-bool smb_io_rpc_hdr_ba(const char *desc, RPC_HDR_BA *rpc, prs_struct *ps, int depth);
-void init_rpc_hdr_req(RPC_HDR_REQ *hdr, uint32 alloc_hint, uint16 opnum);
-bool smb_io_rpc_hdr_req(const char *desc, RPC_HDR_REQ *rpc, prs_struct *ps, int depth);
-bool smb_io_rpc_hdr_resp(const char *desc, RPC_HDR_RESP *rpc, prs_struct *ps, int depth);
-bool smb_io_rpc_hdr_fault(const char *desc, RPC_HDR_FAULT *rpc, prs_struct *ps, int depth);
-void init_rpc_hdr_auth(RPC_HDR_AUTH *rai,
- uint8 auth_type, uint8 auth_level,
- uint8 auth_pad_len,
- uint32 auth_context_id);
-bool smb_io_rpc_hdr_auth(const char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, int depth);
-bool rpc_auth_verifier_chk(RPC_AUTH_VERIFIER *rav,
- const char *signature, uint32 msg_type);
-void init_rpc_auth_verifier(RPC_AUTH_VERIFIER *rav,
- const char *signature, uint32 msg_type);
-bool smb_io_rpc_auth_verifier(const char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth);
-bool smb_io_rpc_schannel_verifier(const char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth);
-void init_rpc_auth_schannel_neg(RPC_AUTH_SCHANNEL_NEG *neg,
- const char *domain, const char *myname);
-bool smb_io_rpc_auth_schannel_neg(const char *desc, RPC_AUTH_SCHANNEL_NEG *neg,
- prs_struct *ps, int depth);
-bool smb_io_rpc_auth_schannel_chk(const char *desc, int auth_len,
- RPC_AUTH_SCHANNEL_CHK * chk,
- prs_struct *ps, int depth);
-
#endif /* _CLIENT_PROTO_H_ */
diff --git a/source/include/proto.h b/source/include/proto.h
index 719eacb..afce9ae 100644
--- a/source/include/proto.h
+++ b/source/include/proto.h
@@ -10237,11 +10237,14 @@ void reply_sesssetup_and_X(struct smb_request *req);
/* The following definitions come from smbd/share_access.c */
bool token_contains_name_in_list(const char *username,
+ const char *domain,
const char *sharename,
const struct nt_user_token *token,
const char **list);
-bool user_ok_token(const char *username, struct nt_user_token *token, int snum);
+bool user_ok_token(const char *username, const char *domain,
+ struct nt_user_token *token, int snum);
bool is_share_read_only_for_token(const char *username,
+ const char *domain,
struct nt_user_token *token, int snum);
/* The following definitions come from smbd/srvstr.c */
diff --git a/source/lib/afs.c b/source/lib/afs.c
index c4569d9..7193f0e 100644
--- a/source/lib/afs.c
+++ b/source/lib/afs.c
@@ -213,8 +213,6 @@ char *afs_createtoken_str(const char *username, const char *cell)
bool afs_login(connection_struct *conn)
{
- extern userdom_struct current_user_info;
- extern struct current_user current_user;
DATA_BLOB ticket;
char *afs_username = NULL;
char *cell = NULL;
@@ -234,14 +232,14 @@ bool afs_login(connection_struct *conn)
afs_username = talloc_sub_advanced(ctx,
SNUM(conn), conn->user,
conn->connectpath, conn->gid,
- get_current_username(),
- current_user_info.domain,
+ conn->server_info->sanitized_username,
+ pdb_get_domain(conn->server_info->sam_account),
afs_username);
if (!afs_username) {
return false;
}
- user_sid = ¤t_user.nt_user_token->user_sids[0];
+ user_sid = &conn->server_info->ptok->user_sids[0];
afs_username = talloc_string_sub(talloc_tos(),
afs_username,
"%s",
diff --git a/source/modules/vfs_expand_msdfs.c b/source/modules/vfs_expand_msdfs.c
index 133c5eb..9b85ad2 100644
--- a/source/modules/vfs_expand_msdfs.c
+++ b/source/modules/vfs_expand_msdfs.c
@@ -148,7 +148,7 @@ static char *expand_msdfs_target(TALLOC_CTX *ctx,
conn->server_info->unix_name,
conn->connectpath,
conn->server_info->gid,
- get_current_username(),
+ conn->server_info->sanitized_username,
current_user_info.domain,
targethost);
diff --git a/source/modules/vfs_full_audit.c b/source/modules/vfs_full_audit.c
index 31069c1..8718dbd 100644
--- a/source/modules/vfs_full_audit.c
+++ b/source/modules/vfs_full_audit.c
@@ -59,8 +59,6 @@
#include "includes.h"
-extern userdom_struct current_user_info;
-
static int vfs_full_audit_debug_level = DBGC_VFS;
struct vfs_full_audit_private_data {
@@ -697,8 +695,8 @@ static char *audit_prefix(TALLOC_CTX *ctx, connection_struct *conn)
conn->server_info->unix_name,
conn->connectpath,
conn->server_info->gid,
- get_current_username(),
- current_user_info.domain,
+ conn->server_info->sanitized_username,
+ pdb_get_domain(conn->server_info->sam_account),
prefix);
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list