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 | 559a9bf2bbdeae3e76ba9178779cd3a9537c4e91 (patch) | |
tree | 5281ddf2ca348d31ad4c752ee6df10c25978af1f /source/lib/util.c | |
parent | 7f7e265ab457d046441d502d4b8447bc2c966675 (diff) | |
download | samba-559a9bf2bbdeae3e76ba9178779cd3a9537c4e91.tar.gz samba-559a9bf2bbdeae3e76ba9178779cd3a9537c4e91.tar.xz samba-559a9bf2bbdeae3e76ba9178779cd3a9537c4e91.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.
Diffstat (limited to 'source/lib/util.c')
-rw-r--r-- | source/lib/util.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/source/lib/util.c b/source/lib/util.c index 905809f1111..ec12affe799 100644 --- a/source/lib/util.c +++ b/source/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; } |