diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-05-18 05:52:52 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-05-18 05:52:52 +0000 |
commit | 58e1fe62cc955c6b8449332447a6879c6fab64e7 (patch) | |
tree | d132d46aad501e052c6431a0506fbd7c0d56722b /source3/smbd/service.c | |
parent | 27ecfceae15ae80224f4dedd07381598b945359e (diff) | |
download | samba-58e1fe62cc955c6b8449332447a6879c6fab64e7.tar.gz samba-58e1fe62cc955c6b8449332447a6879c6fab64e7.tar.xz samba-58e1fe62cc955c6b8449332447a6879c6fab64e7.zip |
A few things in this commit:
cleanup some of the code in net_rpc_join re const warnings and
fstrings.
Passdb:
Make the %u and %U substituions in passdb work.
This is done by declaring these paramters to be 'const' and doing
the substitution manually. I'm told this is us going full circle,
but I can't really see a better way.
Finally these things actually seem to work properly...
Make the lanman code use the pdb's recorded values for homedir etc
rather than the values from lp_*()
Add code to set the plaintext password in the passdb, where it can
decide how to store/set it. For use with a future 'ldap password
change' option, or somthing like that...
Add pdb_unix, so as to remove the 'not in passdb' special cases from the
local_lookup_*() code. Quite small, as it uses the new 'struct passwd ->
SAM_ACCOUNT' code that is now in just one place. (also used by pdb_smbpasswd)
Other:
Fix up the adding of [homes] at session setup time to actually pass
the right string, that is the unix homedir, not the UNC path.
Fix up [homes] so that for winbind users is picks the correct name.
(bad interactions with the default domain code previously)
Change the rpc_server/srv_lsa_nt.c code to match NT when for the
SATUS_NONE_MAPPED reply: This was only being triggered on
no queries, now it is on the 'no mappings' (ie all mappings failed).
Checked against Win2k.
Policy Question: Should SID -> unix_user.234/unix_group.364 be
considered a mapping or not? Currently it isn't.
Andrew Bartlett
(This used to be commit c28668068b5a3b3cf3c4317e5fb32ec9957f3e34)
Diffstat (limited to 'source3/smbd/service.c')
-rw-r--r-- | source3/smbd/service.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/source3/smbd/service.c b/source3/smbd/service.c index 467bab4a0ac..32ceb631543 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -81,9 +81,6 @@ BOOL set_current_service(connection_struct *conn,BOOL do_chdir) int add_home_service(const char *service, const char *homedir) { int iHomeService; - int iService; - fstring new_service; - fstring domain; if (!service || !homedir) return -1; @@ -98,11 +95,19 @@ int add_home_service(const char *service, const char *homedir) * include any macros. */ - split_domain_and_name(service, domain, new_service); - lp_add_home(new_service, iHomeService, homedir); - iService = lp_servicenumber(new_service); + { + const char *p = strchr(service,*lp_winbind_separator()); + + /* We only want the 'user' part of the string */ + if (p) { + service = p + 1; + } + } + + lp_add_home(service, iHomeService, homedir); + + return lp_servicenumber(service); - return iService; } |