diff options
author | Jeremy Allison <jra@samba.org> | 2007-12-04 17:48:38 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-12-04 17:48:38 -0800 |
commit | 3771ada352acab83451c4daf170ea92a5ee6354f (patch) | |
tree | f1f44ba789f596b58e417659d63cd35e86c7f9ce /source3/lib/substitute.c | |
parent | 74dfee916f1e7f9ad01c93bda94e1fba9b89be9d (diff) | |
download | samba-3771ada352acab83451c4daf170ea92a5ee6354f.tar.gz samba-3771ada352acab83451c4daf170ea92a5ee6354f.tar.bz2 samba-3771ada352acab83451c4daf170ea92a5ee6354f.zip |
Remove pstring from automount lookups. Remove premature optimization.
Jeremy.
(This used to be commit 6863fe51b5afea234b04b073d3e1b7608d60620e)
Diffstat (limited to 'source3/lib/substitute.c')
-rw-r--r-- | source3/lib/substitute.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c index 09604f8442..b456b9b992 100644 --- a/source3/lib/substitute.c +++ b/source3/lib/substitute.c @@ -416,9 +416,9 @@ static const char *automount_path(const char *user_name) if (lp_nis_home_map()) { const char *home_path_start; - const char *automount_value = automount_lookup(user_name); + char *automount_value = automount_lookup(ctx, user_name); - if(strlen(automount_value) > 0) { + if(automount_value && strlen(automount_value) > 0) { home_path_start = strchr_m(automount_value,':'); if (home_path_start != NULL) { DEBUG(5, ("NIS lookup succeeded. " @@ -472,7 +472,7 @@ static const char *automount_server(const char *user_name) if (lp_nis_home_map()) { char *p; char *srv; - char *automount_value = automount_lookup(user_name); + char *automount_value = automount_lookup(ctx, user_name); if (!automount_value) { return ""; } |