<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>26797</bug_id>
          
          <creation_ts>2012-01-10 13:01:13 +0400</creation_ts>
          <short_desc>Неправильно разбираются параметры монтирования NFS</short_desc>
          <delta_ts>2015-02-12 23:20:26 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>autofs</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Fr. Br. George">george</reporter>
          <assigned_to name="Sergey Bolshakov">sbolshakov</assigned_to>
          <cc>boyarsh</cc>
    
    <cc>evg</cc>
    
    <cc>ldv</cc>
    
    <cc>rider</cc>
    
    <cc>sbolshakov</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>128141</commentid>
    <comment_count>0</comment_count>
    <who name="Fr. Br. George">george</who>
    <bug_when>2012-01-10 13:01:13 +0400</bug_when>
    <thetext>/etc/auto.avahi неправильно обрабатывает параметры монтирования NFS, если в них содержится &quot;=&quot;, например:

=;n/a;n/a;space;Network File System;office.altlinux.ru;altair.office.altlinux.ru;10.1.0.2;2049;&quot;options=ro,noexec,nosuid,nodev,nolock,hard,intr,vers=3&quot; &quot;path=/space&quot;

превращается в
-o sec=sys,3 вместо -osec=sys,ro,noexec,nosuid,nodev,nolock,hard,intr,vers=3

В результате монтирование не происходит из-за некорректного параметра &quot;3&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128142</commentid>
    <comment_count>1</comment_count>
      <attachid>5286</attachid>
    <who name="Fr. Br. George">george</who>
    <bug_when>2012-01-10 13:02:22 +0400</bug_when>
    <thetext>Created attachment 5286
Кратко опишите вложение.

(дополнительно) Добавьте комментарий для этого вложения.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128177</commentid>
    <comment_count>2</comment_count>
    <who name="Sergey Bolshakov">sbolshakov</who>
    <bug_when>2012-01-10 14:09:04 +0400</bug_when>
    <thetext>собственно, auto.avahi -- моя самодеятельность, никаких устоявшихся практик,
а тем более формальных документов насчёт того, как именно должны быть
представлены опции монтирования в описании зоны, нет.
я предполагал, что vers *не* входит в options, а указывается отдельно,
что-то вроде:
--- %&lt; ---
share._nfs._tcp                 SRV     0       0       2049    host
                                TXT     vers=4 options=ro path=/share
--- %&lt; ---
впрочем, в общем случае замечание верно.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>130307</commentid>
    <comment_count>3</comment_count>
    <who name="Fr. Br. George">george</who>
    <bug_when>2012-04-03 13:36:09 +0400</bug_when>
    <thetext>Перестало работать в p6 (или и не работало) :(. Патчик-то можно приложить, аль некошерен?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>130309</commentid>
    <comment_count>4</comment_count>
    <who name="Sergey Bolshakov">sbolshakov</who>
    <bug_when>2012-04-03 13:47:31 +0400</bug_when>
    <thetext>что мешает указать vers= отдельнолежащей опцией ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>130769</commentid>
    <comment_count>5</comment_count>
    <who name="Fr. Br. George">george</who>
    <bug_when>2012-04-20 11:22:39 +0400</bug_when>
    <thetext>Отсутствие прав root. Это имеет отношение к проблеме?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>134784</commentid>
    <comment_count>6</comment_count>
    <who name="Anton V. Boyarshinov">boyarsh</who>
    <bug_when>2012-11-13 14:26:22 +0400</bug_when>
    <thetext>А что-таки мешает приложить патч?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>134786</commentid>
    <comment_count>7</comment_count>
    <who name="Sergey Bolshakov">sbolshakov</who>
    <bug_when>2012-11-13 14:29:55 +0400</bug_when>
    <thetext>правило, которое гласит, что в options содержатся только флаги (опции без значения). опции со значением указываются отдельно.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>134787</commentid>
    <comment_count>8</comment_count>
    <who name="Sergey Bolshakov">sbolshakov</who>
    <bug_when>2012-11-13 14:30:35 +0400</bug_when>
    <thetext>.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>134828</commentid>
    <comment_count>9</comment_count>
    <who name="Anton V. Boyarshinov">boyarsh</who>
    <bug_when>2012-11-14 11:56:02 +0400</bug_when>
    <thetext>(В ответ на комментарий №7)
&gt; правило, которое гласит, что в options содержатся только флаги (опции без
&gt; значения). опции со значением указываются отдельно.

А где содержится это правило?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>134925</commentid>
    <comment_count>10</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2012-11-16 18:55:09 +0400</bug_when>
    <thetext>(In reply to comment #4)
&gt; что мешает указать vers= отдельнолежащей опцией ?

Какие еще из нижеперечисленных опций предлагается указывать отдельно?
$ man mount |colcrt |grep =value
       uid=value and gid=value
       ownmask=value and othmask=value
       uid=value and gid=value
       setuid=value and setgid=value
       mode=value
       reserved=value
       root=value
       bs=value
       uid=value and gid=value
       mode=value
       ptmxmode=value
              ptmxmode=value specifies a more useful mode for the ptmx node and  is  highly  recommended  when  the
       uid=value and gid=value
       umask=value
       dmask=value
       fmask=value
       allow utime=value
       check=value
       codepage=value
       iocharset=value
       uid=value and gid=value
       umask=value
       uid=value and gid=value
       mode=value
       iocharset=value
       resize=value
       uid=value, gid=value and umask=value
       uid=value and gid=value
       ufstype=value
       onerror=value
       ihashsize=value
       logbufs=value
       logbsize=value
       sunit=value and swidth=value

Давайте быстро исправим ошибку вместо того, чтобы искать пути ее объезда.
Тем более что правильный патч уже давно готов.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>134926</commentid>
    <comment_count>11</comment_count>
    <who name="Sergey Bolshakov">sbolshakov</who>
    <bug_when>2012-11-16 19:14:54 +0400</bug_when>
    <thetext>указывать отдельно предлагается vers= path= и sec=, поскольку любые другие
опции со значением игнорируются, о чём кстати выдаётся предупреждение.
это не ошибка, это бай дизайн.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>134928</commentid>
    <comment_count>12</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2012-11-16 19:32:17 +0400</bug_when>
    <thetext>(In reply to comment #11)
&gt; указывать отдельно предлагается vers= path= и sec=, поскольку любые другие
&gt; опции со значением игнорируются, о чём кстати выдаётся предупреждение.

Однако vers= в options= не игнорируется, и никаких предупреждений о том, что все плохо, при использовании vers= в options= не выдается.

&gt; это не ошибка, это бай дизайн.

В таком случае это неправильный бай дизайн, который надо зафиксить.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>134929</commentid>
    <comment_count>13</comment_count>
    <who name="Sergey Bolshakov">sbolshakov</who>
    <bug_when>2012-11-16 19:48:11 +0400</bug_when>
    <thetext>о том, что всё плохо, недвусмысленно намекается:
&quot;В результате монтирование не происходит&quot;
бай дизайном я вполне удовлетворён, дополнительная
диагностика о недопустимости foo=bar в options воспоследует.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>134932</commentid>
    <comment_count>14</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2012-11-16 20:55:52 +0400</bug_when>
    <thetext>(In reply to comment #13)
&gt; бай дизайном я вполне удовлетворён, дополнительная
&gt; диагностика о недопустимости foo=bar в options воспоследует.

В чем причина недопустимости foo=bar в options?
На соображения безопасности это не похоже.  Что же это тогда?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>134933</commentid>
    <comment_count>15</comment_count>
    <who name="Sergey Bolshakov">sbolshakov</who>
    <bug_when>2012-11-16 21:05:42 +0400</bug_when>
    <thetext>в том, что, каламбурчик-с, options are optional, тогда как комбинация vers/path нужна.
И собственно, ввиду отсутствия каких-либо документов, регламентирующих
размещение в записи TXT параметров монтирования nfs, люди делятся на
тех, кто написал скриптъ, и тех, кто уберёт лишние запятые из зоны.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>134934</commentid>
    <comment_count>16</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2012-11-16 21:25:48 +0400</bug_when>
    <thetext>(In reply to comment #15)
&gt; в том, что, каламбурчик-с, options are optional, тогда как комбинация vers/path
&gt; нужна.
&gt; И собственно, ввиду отсутствия каких-либо документов, регламентирующих
&gt; размещение в записи TXT параметров монтирования nfs, люди делятся на
&gt; тех, кто написал скриптъ, и тех, кто уберёт лишние запятые из зоны.

Как насчет символа &quot;=&quot; в значении path=?
Как насчет других опций со значениями, которые почему-то оказались хуже опций без значений?
Будем и дальше отрицать здравый смысл, ссылаясь на отсутствие стандарта?

Допустим, я хочу передать одну из нижеперечисленных опций:
$ man nfs |colcrt |grep &apos;^[[:space:]]*[^[:space:]=]\+=&apos;
       timeo=n        The  time  in  deciseconds (tenths of a second) the NFS client waits for a response before it
       retrans=n      The  number  of  times  the  NFS client retries a request before it attempts further recovery
       rsize=n        The maximum number of bytes in each network READ request that the NFS client can receive when
       wsize=n        The maximum number of bytes per network WRITE request that the NFS client can send when writ‐
       acregmin=n     The  minimum time (in seconds) that the NFS client caches attributes of a regular file before
       acregmax=n     The  maximum time (in seconds) that the NFS client caches attributes of a regular file before
       acdirmin=n     The  minimum time (in seconds) that the NFS client caches attributes of a directory before it
       acdirmax=n     The  maximum time (in seconds) that the NFS client caches attributes of a directory before it
       actimeo=n      Using  actimeo  sets all of acregmin, acregmax, acdirmin, and acdirmax to the same value.  If
       retry=n        The number of minutes that the mount(8) command retries an NFS mount operation in  the  fore‐
       sec=mode       The RPCGSS security flavor to use for accessing files on this mount point.  If the sec option
       lookupcache=mode
       proto=netid    The  transport  protocol name and protocol family the NFS client uses to transmit requests to
       port=n         The  numeric  value  of  the  server&apos;s  NFS service port.  If the server&apos;s NFS service is not
       mountport=n    The numeric value of the server&apos;s mountd port.  If the server&apos;s mountd service is not  avail‐
       mountproto=netid
       mounthost=name The  hostname of the host running mountd.  If this option is not specified, the mount(8) com‐
       mountvers=n    The RPC version number used to contact the server&apos;s mountd.  If this option is not specified,
       namlen=n       The maximum length of a pathname component on this mount.  If this option is  not  specified,
       nfsvers=n      The NFS protocol version number used to contact the server&apos;s NFS service.  If the server does
       vers=n         This option is an alternative to the nfsvers option.  It is included for  compatibility  with
       proto=netid    The  transport  protocol name and protocol family the NFS client uses to transmit requests to
       port=n         The  numeric  value  of  the  server&apos;s  NFS service port.  If the server&apos;s NFS service is not
       clientaddr=n.n.n.n

Мне в этом случае следует переписать скрипт /etc/auto.avahi?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>134936</commentid>
    <comment_count>17</comment_count>
    <who name="Sergey Bolshakov">sbolshakov</who>
    <bug_when>2012-11-16 21:50:41 +0400</bug_when>
    <thetext>(В ответ на комментарий №16)
&gt; (In reply to comment #15)
&gt; &gt; в том, что, каламбурчик-с, options are optional, тогда как комбинация vers/path
&gt; &gt; нужна.
&gt; &gt; И собственно, ввиду отсутствия каких-либо документов, регламентирующих
&gt; &gt; размещение в записи TXT параметров монтирования nfs, люди делятся на
&gt; &gt; тех, кто написал скриптъ, и тех, кто уберёт лишние запятые из зоны.
&gt; 
&gt; Как насчет символа &quot;=&quot; в значении path=?
&gt; Как насчет других опций со значениями, которые почему-то оказались хуже опций
&gt; без значений?
&gt; Будем и дальше отрицать здравый смысл, ссылаясь на отсутствие стандарта?

Предложенный патч этих проблем не решает.
К тому же, *мой* здравый смысл подсказывает мне
избегать решений кажущихся проблем.

&gt; Мне в этом случае следует переписать скрипт /etc/auto.avahi?

С такими запросами это явно необходимо. милости прошу.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>150205</commentid>
    <comment_count>18</comment_count>
    <who name="Fr. Br. George">george</who>
    <bug_when>2015-02-12 18:48:50 +0300</bug_when>
    <thetext>Новые nfs-utils актуализировали эту багу в ещё одном месте:

@@ -46,6 +46,7 @@ discover_nfs() {
        case &quot;$vers,$path&quot; in
            ,|4,) printf -- &apos;-fstype=nfs4 %s %s:/&apos; $options $addr ;;
            4,*) printf -- &apos;-fstype=nfs4 %s %s:%s&apos; $options $addr $path ;;
+           3,*) printf -- &apos;%s %s:%s&apos; $options,vers=3 $addr $path ;;
            *,*) printf -- &apos;%s %s:%s&apos; $options $addr $path ;;
        esac
        break

Суть в том, что mount без параметров теперь v4.2 (а не v3), и обработать ни vers=3, ни -onfsversion=3 auto.avahi не может.

&gt; &gt; Мне в этом случае следует переписать скрипт /etc/auto.avahi?
&gt; С такими запросами это явно необходимо. милости прошу.

Давайте, давайте уже ACL кому-нибудь дадим? Тем более, что переписывать-то две строки надо всего.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>150216</commentid>
    <comment_count>19</comment_count>
    <who name="Sergey Bolshakov">sbolshakov</who>
    <bug_when>2015-02-12 23:20:26 +0300</bug_when>
    <thetext>mount без параметров v4 последние несколько лет,
сборка с 4.2 в качестве дефолта опубликована не была.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>5286</attachid>
            <date>2012-01-10 13:02:22 +0400</date>
            <delta_ts>2012-01-10 13:02:22 +0400</delta_ts>
            <desc>Кратко опишите вложение.</desc>
            <filename>auto.avahi.nfsopts.patch</filename>
            <type>text/plain</type>
            <size>393</size>
            <attacher name="Fr. Br. George">george</attacher>
            
              <data encoding="base64">LS0tIGFsdGxpbnV4L2V0Yy9hdXRvLmF2YWhpCTIwMTItMDEtMTAgMTE6MTk6NTcuMDAwMDAwMDAw
ICswNDAwCisrKyAvZXRjL2F1dG8uYXZhaGkJMjAxMi0wMS0xMCAxMjo0NDoyMy4wMDAwMDAwMDAg
KzA0MDAKQEAgLTM1LDcgKzM1LDcgQEAKIAkJdmVycz0zfHZlcnM9NCkgdmVycz0iJHtvcHQjIyo9
fSIgOzsKIAkJcGF0aD0qKSBwYXRoPSIke29wdCMjKj19IiA7OwogCQlzZWM9bm9uZXxzZWM9c3lz
fHNlYz1rcmIqKSBzZWM9IiR7b3B0IyMqPX0iIDs7Ci0JCW9wdGlvbnM9Kikgb3B0aW9ucz0iJHtv
cHQjIyo9fSIgOzsKKwkJb3B0aW9ucz0qKSBvcHRpb25zPSIke29wdCMqPX0iIDs7CiAJCSopIHdh
cm4gInVuc3VwcG9ydGVkIG9wdGlvbjogJG9wdCIgOzsKIAkgICAgZXNhYwogCWRvbmUK
</data>

          </attachment>
      

    </bug>

</bugzilla>