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

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

    <bug>
          <bug_id>18114</bug_id>
          
          <creation_ts>2008-12-05 22:25:24 +0300</creation_ts>
          <short_desc>Неверно обрабатывается отсутствие прав доступа к Xauthority</short_desc>
          <delta_ts>2010-04-30 22:49:18 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>xauth</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Vitaly Lipatov">lav</reporter>
          <assigned_to name="Nobody&apos;s working on this, feel free to take it">nobody</assigned_to>
          <cc>george</cc>
    
    <cc>shrek</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>82299</commentid>
    <comment_count>0</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2008-12-05 22:25:24 +0300</bug_when>
    <thetext>Если xauth указать файл, к которому мы не имеем прав доступа, он будет пытаться достаточно долго ждать, пока права появятся. Я думаю, что ожидать в случае EACCES - совершенно неверно, погода у моря не появится.

Воспроизведение: запустить под одним пользователем, указав файл другого пользователя.

Результат:
$ strace /usr/X11R6/bin/xauth -f /home/lav/.Xauthority nlist :0

stat64(&quot;/home/lav/.Xauthority-c&quot;, 0xbf8c0d44) = -1 EACCES (Permission denied)
open(&quot;/home/lav/.Xauthority-c&quot;, O_WRONLY|O_CREAT|O_EXCL, 0600) = -1 EACCES (Permission denied)
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({2, 0}, 0xbf8c0d94)    

У меня ситуация проявляется при использовании pam_xauth для su при том, что /home недоступен для рута.
Конечно можно указать xauth -i, но это неверный выход, мне кажется.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>