summaryrefslogtreecommitdiffstats
path: root/source/lib
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-11-24 22:45:09 +0000
committerLuke Leighton <lkcl@samba.org>1999-11-24 22:45:09 +0000
commit57bff6fe82d777e599d535f076efb2328ba1188b (patch)
treec1901c8d913ce117b8f9d237473a3569493c4aa2 /source/lib
parentc01b18e632aede6fce7264ef6971d7ddba945cfb (diff)
downloadsamba-57bff6fe82d777e599d535f076efb2328ba1188b.tar.gz
samba-57bff6fe82d777e599d535f076efb2328ba1188b.tar.xz
samba-57bff6fe82d777e599d535f076efb2328ba1188b.zip
ok. *whew*. this is the first completed part of the restructure.
verified that lsaquery, lsalookupsids work, and found some bugs in the parameters of these commands :-) soo... we now have an lsa_* api that has the same arguments as the nt Lsa* api! cool! the only significant coding difference is the introduction of a user_credentials structure, containing user, domain, pass and ntlmssp flags.
Diffstat (limited to 'source/lib')
-rw-r--r--source/lib/domain_namemap.c8
-rw-r--r--source/lib/util.c21
2 files changed, 27 insertions, 2 deletions
diff --git a/source/lib/domain_namemap.c b/source/lib/domain_namemap.c
index 51fcd2467a3..551c7290ea9 100644
--- a/source/lib/domain_namemap.c
+++ b/source/lib/domain_namemap.c
@@ -882,7 +882,8 @@ static BOOL lookup_remote_ntname(const char *ntname, DOM_SID *sid, uint8 *type)
struct cli_state cli;
POLICY_HND lsa_pol;
fstring srv_name;
- extern struct cli_state *rpc_smb_cli;
+ extern struct user_credentials *usr_creds;
+ struct user_credentials usr;
BOOL res3 = True;
BOOL res4 = True;
@@ -891,7 +892,10 @@ static BOOL lookup_remote_ntname(const char *ntname, DOM_SID *sid, uint8 *type)
uint8 *types;
char *names[1];
- rpc_smb_cli = &cli;
+ usr_creds = &usr;
+
+ ZERO_STRUCT(usr);
+ pwd_set_nullpwd(&usr.pwd);
DEBUG(5,("lookup_remote_ntname: %s\n", ntname));
diff --git a/source/lib/util.c b/source/lib/util.c
index 26f0482162a..cd6368ee77f 100644
--- a/source/lib/util.c
+++ b/source/lib/util.c
@@ -3228,3 +3228,24 @@ BOOL become_user_permanently(uid_t uid, gid_t gid)
return(True);
}
+BOOL resolve_srv_name(const char* srv_name, fstring dest_host,
+ struct in_addr *ip)
+{
+ DEBUG(10,("resolve_srv_name: %s\n", srv_name));
+
+ if (srv_name == NULL || strequal("\\\\.", srv_name))
+ {
+ fstrcpy(dest_host, global_myname);
+ ip = interpret_addr2("127.0.0.1");
+ return True;
+ }
+
+ if (!strnequal("\\\\", srv_name, 2))
+ {
+ return False;
+ }
+
+ fstrcpy(dest_host, &srv_name[2]);
+ return resolve_name(dest_host, ip, 0x20);
+}
+