DATA_BLOB *plaintext,
bool encrypted)
{
- struct smbd_server_connection *sconn = smbd_server_conn;
const char *domain;
NTSTATUS result;
bool was_mapped;
fstring internal_username;
fstrcpy(internal_username, smb_name);
- was_mapped = map_username(sconn, internal_username);
+ was_mapped = map_username(internal_username);
DEBUG(5, ("Mapping user [%s]\\[%s] from workstation [%s]\n",
client_domain, smb_name, wksta_name));
uid_t *uid, gid_t *gid,
bool *username_was_mapped)
{
- struct smbd_server_connection *sconn = smbd_server_conn;
fstring dom_user, lower_username;
fstring real_username;
struct passwd *passwd;
/* Get the passwd struct. Try to create the account if necessary. */
- *username_was_mapped = map_username(sconn, dom_user);
+ *username_was_mapped = map_username(dom_user);
passwd = smb_getpwnam( NULL, dom_user, real_username, True );
if (!passwd) {
/* The following definitions come from smbd/map_username.c */
-bool map_username(struct smbd_server_connection *sconn, fstring user);
+bool map_username(fstring user);
/* The following definitions come from smbd/message.c */
NTSTATUS _samr_ChangePasswordUser2(pipes_struct *p,
struct samr_ChangePasswordUser2 *r)
{
- struct smbd_server_connection *sconn = smbd_server_conn;
NTSTATUS status;
fstring user_name;
fstring wks;
* function.
*/
- (void)map_username(sconn, user_name);
+ (void)map_username(user_name);
/*
* UNIX username case mangling not required, pass_oem_change
NTSTATUS _samr_OemChangePasswordUser2(pipes_struct *p,
struct samr_OemChangePasswordUser2 *r)
{
- struct smbd_server_connection *sconn = smbd_server_conn;
NTSTATUS status;
fstring user_name;
const char *wks = NULL;
* function.
*/
- (void)map_username(sconn, user_name);
+ (void)map_username(user_name);
/*
* UNIX username case mangling not required, pass_oem_change
NTSTATUS _samr_ChangePasswordUser3(pipes_struct *p,
struct samr_ChangePasswordUser3 *r)
{
- struct smbd_server_connection *sconn = smbd_server_conn;
NTSTATUS status;
fstring user_name;
const char *wks = NULL;
* function.
*/
- (void)map_username(sconn, user_name);
+ (void)map_username(user_name);
/*
* UNIX username case mangling not required, pass_oem_change
TALLOC_FREE(key);
}
-bool map_username(struct smbd_server_connection *sconn, fstring user)
+bool map_username(fstring user)
{
XFILE *f;
char *mapfile = lp_username_map();
int find_service(fstring service)
{
int iService;
- struct smbd_server_connection *sconn = smbd_server_conn;
all_string_sub(service,"\\","/",0);
* Try mapping the servicename, it may
* be a Windows to unix mapped user name.
*/
- if(map_username(sconn, service))
+ if(map_username(service))
phome_dir = get_user_home_dir(
talloc_tos(), service);
}
fstring unix_username;
fstrcpy(unix_username,
current_user_info.smb_name);
- map_username(sconn, unix_username);
+ map_username(unix_username);
snum = find_service(unix_username);
}
if (snum != -1) {
/* lookup the passwd struct, create a new user if necessary */
- username_was_mapped = map_username(sconn, user);
+ username_was_mapped = map_username(user);
pw = smb_getpwnam( mem_ctx, user, real_username, True );
data_blob_free(&nt_resp);
data_blob_clear_free(&plaintext_password);
- map_username(sconn, sub_user);
+ map_username(sub_user);
add_session_user(sconn, sub_user);
add_session_workgroup(sconn, domain);
/* Then force it to null for the benfit of the code below */
fstring tmp;
bool username_was_mapped = false;
bool map_domainuser_to_guest = false;
- struct smbd_server_connection *sconn = smbd_server_conn;
if (!spnego_parse_krb5_wrap(*secblob, &ticket, tok_id)) {
status = NT_STATUS_LOGON_FAILURE;
/* lookup the passwd struct, create a new user if necessary */
- username_was_mapped = map_username(sconn, user);
+ username_was_mapped = map_username(user);
pw = smb_getpwnam(talloc_tos(), user, real_username, true );
if (pw) {