<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>13288</bug_id>
          
          <creation_ts>2019-04-17 23:28:53 +0000</creation_ts>
          <short_desc>pseudo should not follow symlinks in /proc</short_desc>
          <delta_ts>2026-05-14 15:16:11 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Pseudo</product>
          <component>pseudo</component>
          <version>master</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Matt Cowell">matt.cowell</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>david.nystrom</cc>
    
    <cc>paul</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>sam</cc>
    
    <cc>seebs</cc>
    
    <cc>tgamblin</cc>
    
    <cc>yp.pseudo.watcher</cc>
    
    <cc>yp.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>83573</commentid>
    <comment_count>0</comment_count>
      <attachid>4480</attachid>
    <who name="Matt Cowell">matt.cowell</who>
    <bug_when>2019-04-17 23:28:53 +0000</bug_when>
    <thetext>Created attachment 4480
patch to fix issue

Some symlinks in /proc, such as those under /proc/[pid]/fd,
/proc/[pid]/cwd, and /proc/[pid]/exe that are not real and should not
have readlink called on them.  These look like symlinks, but behave like
hardlinks.  Readlink does not return actual paths.  Previously
pseudo_fix_path would expand files such as /dev/stdin to paths such as
/proc/6680/fd/pipe:[1270830076] which do not exist.

This issue affects:
- deleted files
- deleted directories
- fifos
- sockets
- anon_inodes (epoll, eventfd, inotify, signalfd, timerfd, etc)

The proposed fix is to check the filesystem type of symlinks before calling readlink(), and skip symlink expansion for that element of the path if the filesystem type is procfs.


Reproduction information:

Preconditions/Environment
-------------------------
run a shell under pseudo

Triggering Action/Cause
-----------------------
-&gt; echo foo | cat /dev/stdin

Expectation
-----------
&quot;foo&quot; prints

Actual Result
-------------
&quot;cat: /dev/stdin: No such file or directory&quot; prints

Reproducibility
---------------
100%


Same test case with debug enabled:

Before fix:
-&gt; echo foo | PSEUDO_DEBUG=pV cat /dev/stdin
paes: newpath , element list &lt;/dev/stdin&gt;
element to add: &apos;&apos;
pae: &apos;&apos;, + &apos;&apos;, is_dir 1
element to add: &apos;dev&apos;
pae: &apos;&apos;, + &apos;dev&apos;, is_dir 1
element to add: &apos;stdin&apos;
pae: &apos;/dev&apos;, + &apos;stdin&apos;, is_dir 1
paes: newpath , element list &lt;/proc/self/fd/0&gt;
element to add: &apos;&apos;
pae: &apos;&apos;, + &apos;&apos;, is_dir 1
element to add: &apos;proc&apos;
pae: &apos;&apos;, + &apos;proc&apos;, is_dir 1
element to add: &apos;self&apos;
pae: &apos;/proc&apos;, + &apos;self&apos;, is_dir 1
paes: newpath /proc, element list &lt;6680&gt;
element to add: &apos;6680&apos;
pae: &apos;/proc&apos;, + &apos;6680&apos;, is_dir 1
element to add: &apos;fd&apos;
pae: &apos;/proc/6680&apos;, + &apos;fd&apos;, is_dir 1
element to add: &apos;0&apos;
pae: &apos;/proc/6680/fd&apos;, + &apos;0&apos;, is_dir 1
paes: newpath /proc/6680/fd, element list &lt;pipe:[1270830076]&gt;
element to add: &apos;pipe:[1270830076]&apos;
pae: &apos;/proc/6680/fd&apos;, + &apos;pipe:[1270830076]&apos;, is_dir 1
&lt;nil&gt; + /dev/stdin =&gt; &lt;/proc/6680/fd/pipe:[1270830076]&gt;
base_path[follow]: &lt;nil&gt;&lt;/&gt;/dev/stdin =&gt; /proc/6680/fd/pipe:[1270830076]
cat: /dev/stdin: No such file or directory


After fix:
-&gt; echo foo | PSEUDO_DEBUG=pV cat /dev/stdin
paes: newpath , element list &lt;/dev/stdin&gt;
element to add: &apos;&apos;
pae: &apos;&apos;, + &apos;&apos;, is_dir 1
element to add: &apos;dev&apos;
pae: &apos;&apos;, + &apos;dev&apos;, is_dir 1
element to add: &apos;stdin&apos;
pae: &apos;/dev&apos;, + &apos;stdin&apos;, is_dir 1
paes: newpath , element list &lt;/proc/self/fd/0&gt;
element to add: &apos;&apos;
pae: &apos;&apos;, + &apos;&apos;, is_dir 1
element to add: &apos;proc&apos;
pae: &apos;&apos;, + &apos;proc&apos;, is_dir 1
element to add: &apos;self&apos;
pae: &apos;/proc&apos;, + &apos;self&apos;, is_dir 1
pae: &apos;/proc/self&apos; is procfs symlink, not expanding
element to add: &apos;fd&apos;
pae: &apos;/proc/self&apos;, + &apos;fd&apos;, is_dir 0
element to add: &apos;0&apos;
pae: &apos;/proc/self/fd&apos;, + &apos;0&apos;, is_dir 1
pae: &apos;/proc/self/fd/0&apos; is procfs symlink, not expanding
&lt;nil&gt; + /dev/stdin =&gt; &lt;/proc/self/fd/0&gt;
base_path[follow]: &lt;nil&gt;&lt;/&gt;/dev/stdin =&gt; /proc/self/fd/0
foo


Other test cases that can reproduce:
- Using bash process substitution: cat &lt;(echo foo)
- Accessing a deleted file under /proc/[pid]/fd/* , /proc/[pid]/exe, or similar
- possibly glibc APIs which use symlinks under /proc (there are several including fexecve).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84688</commentid>
    <comment_count>1</comment_count>
    <who name="Seebs">seebs</who>
    <bug_when>2019-08-15 15:44:20 +0000</bug_when>
    <thetext>*** Bug 13483 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84694</commentid>
    <comment_count>2</comment_count>
    <who name="Sam Liddicott">sam</who>
    <bug_when>2019-08-15 17:22:40 +0000</bug_when>
    <thetext>I like this solution and patch.

I don&apos;t know everything intended to achieved by pseudo following symlinks, or how much of that is relevant to /proc, but if there is a compulsion to follow the symlinks for proc, then maybe:

instead of never following a symlink on procfs, we could just avoid following the symlink whose lstat failed if it is on a procfs 

so:

lstat(&quot;/proc/6724/fd/63&quot;, {st_mode=S_IFLNK|0500, st_size=64, ...}) = 0
readlink(&quot;/proc/6724/fd/63&quot;, &quot;pipe:[21346885]&quot;, 4096) = 15
lstat(&quot;/proc/6724/fd/pipe:[21346885]&quot;, 0x7ffe0f16e040) = -1 ENOENT (No such file or directory)

As the final lstat failed, use the pre-readlink value for open, the pre-readlink file was on a procfs</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84700</commentid>
    <comment_count>3</comment_count>
    <who name="Matt Cowell">matt.cowell</who>
    <bug_when>2019-08-15 17:51:57 +0000</bug_when>
    <thetext>&gt; we could just avoid following the symlink whose lstat failed

I had considered this, but there are cases where the lstat in procfs can improperly succeed and dereference the wrong path, such as when namespaces are in use or if a file with the suffix &quot; (deleted)&quot; exists (in the case of deleted files / directories).

Mount namespace example (two processes in different namespaces):
sh-5.0# readlink /proc/27570/cwd /proc/27574/cwd
/root/foo
/root/foo
sh-5.0# tail /proc/27570/cwd/asdf /proc/27574/cwd/asdf
==&gt; /proc/27570/cwd/asdf &lt;==
ns1

==&gt; /proc/27574/cwd/asdf &lt;==
ns2


Deleted file example:
sh-5.0# echo right file &gt; bar
sh-5.0# echo wrong file &gt; &apos;bar (deleted)&apos;
sh-5.0# exec 200&lt;&gt;bar
sh-5.0# rm bar
sh-5.0# realpath /proc/self/fd/200
/root/bar (deleted)
sh-5.0# cat /proc/self/fd/200
right file
sh-5.0# cat &quot;$(realpath /proc/self/fd/200)&quot;
wrong file</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86051</commentid>
    <comment_count>4</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2020-01-16 16:13:39 +0000</bug_when>
    <thetext>Moved to M3 but the earlier we get pseudo patches in the better.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87936</commentid>
    <comment_count>5</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2020-08-13 10:11:28 +0000</bug_when>
    <thetext>Sakib,
Peter thinks that the patch is okay.
He&apos;s a bit concerned about the cost of checking that for every single symlink path element, but he said that he can&apos;t think of a good way to avoid it.

Please prepare a patch and on an isolated system that only you use, time builds before and after to see if there is a measureable difference. If there isn&apos;t submit the patch and CC seebs. Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89719</commentid>
    <comment_count>6</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-03-24 00:23:28 +0000</bug_when>
    <thetext>ping. 3.3-M4 or has this been merged?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89832</commentid>
    <comment_count>7</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-03-31 00:10:48 +0000</bug_when>
    <thetext>ping. 3.3-M4 or has this been merged?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89856</commentid>
    <comment_count>8</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-04-01 16:27:34 +0000</bug_when>
    <thetext>Medium+ needs a milestone.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91469</commentid>
    <comment_count>9</comment_count>
    <who name="Sam Liddicott">sam</who>
    <bug_when>2021-09-18 09:27:54 +0000</bug_when>
    <thetext>As it&apos;s nearly 30 months since a patch has been supplied.

Instead of thinking about merging for years on end, please could you merge and then spend years thinking about reverting the merge for the rest of time?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91474</commentid>
    <comment_count>10</comment_count>
    <who name="Sakib Sajal">sakib.sajal</who>
    <bug_when>2021-09-20 13:42:58 +0000</bug_when>
    <thetext>If its so important for you, do it yourself. Cheers! :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91477</commentid>
    <comment_count>11</comment_count>
    <who name="Sam Liddicott">sam</who>
    <bug_when>2021-09-20 18:18:26 +0000</bug_when>
    <thetext>What kind of response is that?

I&apos;m running the fix I posted in duplicate https://bugzilla.yoctoproject.org/show_bug.cgi?id=13483 so don&apos;t need the fix merging.

I&apos;m thinking of all your other users for whom /dev/fd/2 etc hasn&apos;t been working for *years*

You&apos;ve time for inane disrespect for people who take the time to report bugs *and* post fixes but no time to help users when you have the fix on a plate.

As far as I can tell this bug languishes because correct behaviour might take longer than the incorrect behaviour that causes total failure for simple code that ought to work.

You think it&apos;s not that important!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91478</commentid>
    <comment_count>12</comment_count>
    <who name="Sakib Sajal">sakib.sajal</who>
    <bug_when>2021-09-20 18:45:00 +0000</bug_when>
    <thetext>My apologies if my comment seemed inappropriate/disrespectful.

I have been trying to find time to work on upstream yocto bugs but have not been able to do so. I will get on them early October.

Thank you!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92860</commentid>
    <comment_count>13</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-03-24 15:56:18 +0000</bug_when>
    <thetext>We added the patch and it seemed to mostly work okay but there is at least one use case, mentioned in the revert log, that failed so the patch was reverted:
   https://git.yoctoproject.org/pseudo/commit/?id=df1d1321fb093283485c387e3c933d2d264e509c

Early in the next release, we need to understand why this happened and decide if we want to add one or more special exceptions to the patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92912</commentid>
    <comment_count>14</comment_count>
    <who name="Sam Liddicott">sam</who>
    <bug_when>2022-04-01 08:00:48 +0000</bug_when>
    <thetext>I suppose it failed because /proc/self/fd/3 is obviously reported by the kernel as a symlink to /home/pokybuild/yocto-worker/beaglebone/build/build/tmp/work/beaglebone_yocto-poky-linux-gnueabi/core-image-minimal/1.0-r0/sdk-ext/image/usr/local/oe-sdk-hardcoded-buildpath/layers/build/meta/

and that resolved path was needed by pseudo in order to perform more file system mappings, and therefore we cannot simply refuse to resolve /proc symlinks

However, the basis of the reverted patch is that we can&apos;t always safely resolve /proc symlinks. 

But maybe we can...

Certainly under /proc, opening a symlink is not the same as opening readlink(symlink) because for diagnostic reasons, the kernel emits bogus symlink target which the kernel itself does not follow when opening.

Apparently, only the kernel can properly resolve symlinks under proc -- it knows when the final stage symlink is bogus. (This problem is not restricted to pseudo; pre-use readlink resolution simply cannot be trusted in /proc by any process).

But can we tell after all? And in a simple way? 

Just as surely as we need to not fail when we fail to resolve /dev/*/fd/* to pipe:[...], 
we also need a way to resolve /proc symlinks that do direct back out of the /proc file system but which may have a deleted target

I had supposed in comment 2 [https://bugzilla.yoctoproject.org/show_bug.cgi?id=13288#c2] that the last stage readlink would always fail when the last stage was bogus:
/proc/6724/fd/63 -&gt; pipe:[21346885]
/proc/6724/fd/64 -&gt; /tmp/file (deleted)
But it is evident from the examples in comment 3 [https://bugzilla.yoctoproject.org/show_bug.cgi?id=13288#c3] that real clashing files can exist with those names. 

What makes the difference which I failed to take into account before, is whether or not the link target is absolute, meaning it begins with a /

Real clashing/deleted files can only exist for those names if the symlink target begins with a /

If the link target does NOT begin with a / then it will not leave the /proc file system and we can safely do as I proposed in comment 2 which is:
&gt; instead of never following a symlink on procfs, we could just avoid 
&gt; following the symlink whose lstat failed if it is on a procfs
adding the condition: provided that it was not an absolute symlink
This way /dev/fd/3 will resolve to /proc/self/fd/3 to /proc/6724/fd/3 and stop before resolving to pipe:[21346885] whose lstat will fail. The ultimate filename /proc/6724/fd/3 will work

But if the proc symlink target were an absolute path then we have additional conditions to follow, because the issue is how to safely navigate to that exiting link (/proc/*/fd/3 -&gt; /home/pokybuild/...) in a way that won&apos;t choke on &quot; (deleted)&quot; or cross-namespace links.

The absolute symlink in /proc is not like a symlink in a pseudo chroot, or a normal filesystem. It seems to refer to real final paths with any symlinks already resolved, and no need for any chroot path fixups before further symlink resolution (unlike symlinks in the chroot directories on a normal non-proc file system).

So not only must the lstat of the symlink target not fail, but the st_dev and st_ino properties must match those of a stat of the symlink, and thus we know that the symlink target exists and is the original valid target and not a new one with the same name.

Therefore (if it is likely to matter in real life) we can tell whether &quot; (deleted)&quot; is part of the name or not, whether or not the target symlink is valid.

If they match, then the symlink target is valid however many times &quot; (deleted)&quot; may appear in it due to tricksie hobbitses, and thus we have the link target that we can continue resolving, having successfully navigated outside of the /proc filesystem

Note: there are absolute symlinks in /proc which refer back to /proc, e.g.: 
* /proc/1/task/1/fd/10 -&gt; /proc/1/mountinfo
* /proc/482/fd/11 -&gt; /proc/sys/kernel/hostname
but that won&apos;t be a problem with these methods, /proc links just continue to get processed as /proc as described above.

Does this seem reasonable?

Cross namespace links

Although these are mentioned in comment #3 I don&apos;t know how much of real a issue this is.

But because absolute links are resolved, you won&apos;t easily find anything like /proc/2345/fd/5 -&gt; /proc/1234/fd/2
Even if you try to open the fd of another process with 5&gt;/proc/1234/fd/2 ultimately /proc/2345/fd/5 will point to whatever /proc/1234/fd/2 is pointing to.

There are absolute symlinks in /proc which may back to another related process, e.g.:
/proc/4170249/root -&gt; /proc/2527499/fdinfo\ (deleted)
/proc/4170249/task/4177332/fd/37 -&gt; /proc/4170249/status
/proc/1337266/fd/8 -&gt; /proc/1337266/mountinfo

but I&apos;m not certain they can be an issue. 
Maybe we can refuse to traverse links from /proc/X/ to /proc/Y/ where X != Y
Maybe where they aren&apos;t part of the same process group? Or session? Or mount namespace? Or children of a common pseudo invocation?

Do we expect such symlinks to occur in /proc where the target also needs some path massaging to avoid an abort? Where the target despite being in a different namespace is in a pseudo chroot path that this instance of pseudo is controlling and can validly massage?

Surely if it&apos;s possible it&apos;s much less likely than the situation that reverted Matt&apos;s patch or the bug fixed by the Matt&apos;s patch, and it can be addressed when it happens.

(I wish I had kept my original patch now, and I see I didn&apos;t attach it to #13483)

Simply put quit processing without error for symlinks anywhere whose target in /proc fails lstat rather than symlink sources in /proc whose target fails lstat

In /proc if lstat target succeeds and (target is not in /proc) then we add the st_ino st_dev test to confirm


step by step:

* resolve the symlink to the fully qualified target
* if lstat(target) fails
  * and the target is in /proc then return the symlink not the target and let the kernel resolve it on use (it will be pipe:[...] or something like that
  * if st_no and st_dev of stat(symlink) don&apos;t match lstat of target then return the target knowing it will fail on use
* continue processing based on the new target as input

Sam</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95804</commentid>
    <comment_count>15</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-06-22 15:05:31 +0000</bug_when>
    <thetext>Sakib doesn&apos;t have time to continue to test this since it failed some YP autobuilder tests. -- YP bug review</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96454</commentid>
    <comment_count>16</comment_count>
    <who name="Trevor Gamblin">tgamblin</who>
    <bug_when>2023-09-14 15:56:32 +0000</bug_when>
    <thetext>Moved to M4.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97058</commentid>
    <comment_count>17</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-10-30 15:29:09 +0000</bug_when>
    <thetext>Bulk move to 5.0 M1. -- Randy</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97991</commentid>
    <comment_count>18</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-01-25 14:28:45 +0000</bug_when>
    <thetext>Bulk move of bugs owned by &quot;unassigned&quot; from 5.0-M2 to 5.0-M3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98309</commentid>
    <comment_count>19</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-02-22 19:53:25 +0000</bug_when>
    <thetext>Bulk move of bugs from 5.0-M3 to 5.99.
The bugs in this list are all unassigned and are ones that I consider to be nice to do some time but not essential track from milestone to milestone in 5.0 or 5.1. We agreed on this bug handling approach in the YP bug review on Feb 22, 2024.

If you disagree, please move back to a 5.[012...]-M* milestone.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105422</commentid>
    <comment_count>20</comment_count>
    <who name="Paul Barker">paul</who>
    <bug_when>2026-05-13 13:26:28 +0000</bug_when>
    <thetext>Is this resolved by commit 814e554564b2 (&quot;pseudo_util.c: Skip realpath like expansion for /proc on Linux&quot;) in pseudo?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105443</commentid>
    <comment_count>21</comment_count>
    <who name="Paul Barker">paul</who>
    <bug_when>2026-05-14 15:16:11 +0000</bug_when>
    <thetext>The issue was fixed as far as we could with the patch mentioned in my last comment, this doesn&apos;t exactly match the proposed fix described in earlier comments but it&apos;s the best we can reasonably do.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>4480</attachid>
            <date>2019-04-17 23:28:53 +0000</date>
            <delta_ts>2019-04-17 23:28:53 +0000</delta_ts>
            <desc>patch to fix issue</desc>
            <filename>0001-pseudo_fix_path-do-not-expand-symlinks-in-proc.patch</filename>
            <type>application/octet-stream</type>
            <size>2274</size>
            <attacher name="Matt Cowell">matt.cowell</attacher>
            
              <data encoding="base64">RnJvbSBjYjY5MTQ2ZDE4MzgyZjI3MmUzNDczMzhjZmM1YTg5MzBmNjkzZWQ2IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXR0IENvd2VsbCA8bWF0dC5jb3dlbGxAbm9raWEuY29tPgpE
YXRlOiBXZWQsIDE3IEFwciAyMDE5IDE1OjUxOjA3IC0wNTAwClN1YmplY3Q6IFtQQVRDSF0gcHNl
dWRvX2ZpeF9wYXRoOiBkbyBub3QgZXhwYW5kIHN5bWxpbmtzIGluIC9wcm9jCgpTb21lIHN5bWxp
bmtzIGluIC9wcm9jLCBzdWNoIGFzIHRob3NlIHVuZGVyIC9wcm9jL1twaWRdL2ZkLAovcHJvYy9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zKSAmJiBzZnMuZl90eXBlID09IFBST0NfU1VQRVJfTUFHSUMpIHsKKwkJCQkJcHNldWRvX2Rl
YnVnKFBEQkdGX1BBVEggfCBQREJHRl9WRVJCT1NFLAorCQkJCQkJInBhZTogJyVzJyBpcyBwcm9j
ZnMgc3ltbGluaywgbm90IGV4cGFuZGluZ1xuIiwKKwkJCQkJCW5ld3BhdGgpOworCQkJCQlpc19s
aW5rID0gMDsKKwkJCQl9CisKKwkJCQljbG9zZShmZCk7CisJCQl9CisJCX0KKwogCQlpZiAobGlu
a19yZWN1cnNpb24gPj0gUFNFVURPX01BWF9MSU5LX1JFQ1VSU0lPTiAmJiBpc19saW5rKSB7CiAJ
CQlwc2V1ZG9fZGlhZygibGluayByZWN1cnNpb24gdG9vIGRlZXAsIG5vdCBleHBhbmRpbmcgcGF0
aCAnJXMnLlxuIiwgbmV3cGF0aCk7CiAJCQlpc19saW5rID0gMDsKLS0gCjIuMTcuMQoK
</data>

          </attachment>
      

    </bug>

</bugzilla>