H. Peter Anvin <[EMAIL PROTECTED]> writes:
3.1.4 is out. It definitely worked when I tried it, but your syntax
looks correct, so I'm a bit confused. Could you try it with the
released 3.1.4?
I believe lookup_multi.c (from ftp.kernel.org, apparently 21-Jan-00)
has the following errors.
1. It thinks malloc initializes mem.
2. It fails set a flag for the mark of a new map entry.
3. It passes the type (file, nisplus, etc.) when it should not.
Here's the patch which works in my limited tests with commands such as
automount /home multi file /etc/auto_home -- nisplus auto_home
*** lookup_multi.c.orig Fri Jan 21 13:08:09 2000
--- lookup_multi.c Fri Mar 17 14:49:34 2000
***************
*** 71,78 ****
memcpy(ctxt->argl, argv, (argc+1)*sizeof(const char **));
for ( i = j = an = 0 ; argv[an] ; an++ ) {
! if ( j == 0 )
ctxt->m[i].argv = &ctxt->argl[an];
if ( !strcmp(ctxt->argl[an], "--") ) {
ctxt->argl[an] = NULL;
i++; j = 0;
--- 71,81 ----
memcpy(ctxt->argl, argv, (argc+1)*sizeof(const char **));
for ( i = j = an = 0 ; argv[an] ; an++ ) {
! if ( j == 0 ) {
ctxt->m[i].argv = &ctxt->argl[an];
+ ctxt->m[i].argc = 0;
+ j=1;
+ }
if ( !strcmp(ctxt->argl[an], "--") ) {
ctxt->argl[an] = NULL;
i++; j = 0;
***************
*** 95,101 ****
if ( !(ctxt->m[i].mod = open_lookup(map, MODPREFIX,
mapfmt ? mapfmt : my_mapfmt,
! ctxt->m[i].argc, ctxt->m[i].argv)) )
return 1;
}
--- 98,104 ----
if ( !(ctxt->m[i].mod = open_lookup(map, MODPREFIX,
mapfmt ? mapfmt : my_mapfmt,
! ctxt->m[i].argc-1, ctxt->m[i].argv+1)) )
return 1;
}
--
--Darrel Hankerson [EMAIL PROTECTED]