In the getfilemounts() function when the code comes acros a line
which starts with a "+" (include an NIS map here) instead of just
including that map it cats the entire /etc/auto.master file again and
actually include *all* NIS maps which are mentioned.  This means that if
you have n (> 1) NIS map inclusions then the inclusions are done <n>
times,and it also means that the inclusion for all maps is first done
when the first NIS map inclusion is found. 

   It is perfectly legitimate to have an /etc/auto.master file like
this:

+auto.master-TEST
/home   /etc/my-home-override.amap
+auto.master

   whereby the /home setting is meant to override the stanmdrad one in
auto.master.  The bug in the getfilemounts() function stops this
happening as auto.master will be included when +auto.master-TEST is
seen.

   The fix for this is to change the "while read auto_master_in" loop to
be:

        while read auto_master_in
        do
            case "$auto_master_in" in
            +*)
                nismap=`echo $auto_master_in | sed -e 's/^\+//'`
                catnismap $nismap
                ;;
            *)
                echo $auto_master_in
                ;;
            esac
        done

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

Reply via email to