diff options
author | Jeremy Allison <jra@samba.org> | 1998-07-16 00:06:29 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-07-16 00:06:29 +0000 |
commit | f1cd3cb54c6495db2a91c473f91c78d24622d98e (patch) | |
tree | ebcd5c9128b1025fbe19f1bb4911f9e6b47af286 /source3/lib/util.c | |
parent | 7ade0aa1d22367cb0d998d35573dc5e333a41f75 (diff) | |
download | samba-f1cd3cb54c6495db2a91c473f91c78d24622d98e.tar.gz samba-f1cd3cb54c6495db2a91c473f91c78d24622d98e.tar.bz2 samba-f1cd3cb54c6495db2a91c473f91c78d24622d98e.zip |
Makefile: Added CC=gcc to DGUX on Intel. Comment from ross@filmworks.com.
ipc.c:
loadparm.c:
printing.c:
Added code from <Dirk.DeWachter@rug.ac.be> to implement print
queue pausing. New parameters are "queuepause command" and
"queueresume command".
util.c: Added fix for mount options in autmount map.
lib/rpc/include/rpc_misc.h: Removed duplicate pipe names for Jean-Francois.
Jeremy.
(This used to be commit 559a9bf2bbdeae3e76ba9178779cd3a9537c4e91)
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r-- | source3/lib/util.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index 905809f111..ec12affe79 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -4038,6 +4038,30 @@ char *client_addr(int fd) return addr_buf; } +#if (defined(NETGROUP) && defined(AUTOMOUNT)) +/****************************************************************** + Remove any mount options such as -rsize=2048,wsize=2048 etc. + Based on a fix from <Thomas.Hepper@icem.de>. +*******************************************************************/ + +static void strip_mount_options( pstring *str) +{ + if (**str == '-') + { + char *p = *str; + while(*p && !isspace(*p)) + p++; + while(*p && isspace(*p)) + p++; + if(*p) { + pstring tmp_str; + + pstrcpy(tmp_str, p); + pstrcpy(*str, tmp_str); + } + } +} + /******************************************************************* Patch from jkf@soton.ac.uk Split Luke's automount_server into YP lookup and string splitter @@ -4045,7 +4069,6 @@ char *client_addr(int fd) As we may end up doing both, cache the last YP result. *******************************************************************/ -#if (defined(NETGROUP) && defined(AUTOMOUNT)) #ifdef NISPLUS_HOME static char *automount_lookup(char *user_name) { @@ -4094,6 +4117,9 @@ static char *automount_lookup(char *user_name) } nis_freeresult(result); } + + strip_mount_options(&last_value); + DEBUG(4, ("NIS+ Lookup: %s resulted in %s\n", user_name, last_value)); return last_value; } @@ -4141,6 +4167,8 @@ static char *automount_lookup(char *user_name) last_value[nis_result_len] = '\0'; } + strip_mount_options(&last_value); + DEBUG(4, ("YP Lookup: %s resulted in %s\n", user_name, last_value)); return last_value; } |