no-slashify-colons option
Subsystems (2)
PATCH 1/1 no-slashify-colons option
Hi,
After upgrading one of our servers from Fedora 5 (autofs-4.1.4) to Fedora 6 (autofs-5.0.1) we noticed that the "--no-slashify-colons" option was no more working.
We've got the following maps./etc/auto.master:
/nfs /etc/auto.nfs --no-slashify-colons
/etc/auto.nfs:
datas -async,ro,bg,vers=3,tcp,timeo=600,hard,intr,rsize=32768,wsize=32768,context=system_u:object_r:httpd_sys_content_t nfs_server:/exported_nfs
Setting log level to debug showed that the last colon from system_u:object_r:httpd_sys_content_t (used for SELinux) was replaced by a slash.
Dec 4 16:47:41 client automount[2094]: lookup_mount: lookup(file): deptinfo -> -async,ro,bg,vers=3,tcp,timeo=600,hard,intr,rsize=32768,wsize=32768,context=system_u:object_r:httpd_sys_content_t nfs_server:/exported_nfs Dec 4 16:47:41 client automount[2094]: parse_mount: parse(sun): expanded
entry: -async,ro,bg,vers=3,tcp,timeo=600,hard,intr,rsize=32768,wsize=32768,context=system_u:object_r/httpd_sys_content_t nfs_server:/exported_nfs
Using "--no-slashify-colons" should prevent this as it was back in version 4.1.4.
Following patch fixes the issue. Regards.
--
Benoit
lib/master_tok.l 2006-12-06 15:17:30.000000000 +0100 renamed from lib/master_tok.l 2006-12-06 15:10:08.000000000 +0100 +6 -0
@@ -91,6 +91,7 @@ OPTIONSTR ([\-]?([[:alpha:]_]([[:alnum:]_\-])*(=([[:alnum:]_\-])+)*)+) MACROSTR (-D{OPTWS}([[:alpha:]_]([[:alnum:]_\-])*)=([[:alnum:]_\-])+) +SLASHIFYSTR (--(no-)?slashify-colons) NUMBER [0-9]+ DNSERVSTR1 ([[:alpha:]][[:alnum:]\-.]*(:[0-9]+)?:)
@@ -323,6 +324,11 @@ {OPTWS} {} + {SLASHIFYSTR} { + strcpy(master_lval.strtype, master_text); + return(OPTION); + } + {MACROSTR} { strcpy(master_lval.strtype, master_text); return(OPTION);