<?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>2467</bug_id>
          
          <creation_ts>2012-05-17 09:35:47 +0000</creation_ts>
          <short_desc>xserver-nodm-init init script broken for rootles X</short_desc>
          <delta_ts>2012-06-19 13:31:44 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>graphics</component>
          <version>1.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>(Scheduled)</status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>1.3 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="tf">tf+bugs.yocto</reporter>
          <assigned_to name="Laurentiu Palcu">laurentiu.palcu</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>ross.burton</cc>
    
    <cc>song.liu</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>21407</commentid>
    <comment_count>0</comment_count>
      <attachid>516</attachid>
    <who name="tf">tf+bugs.yocto</who>
    <bug_when>2012-05-17 09:35:47 +0000</bug_when>
    <thetext>Created attachment 516
Patch to add missing -s option to su invocation.

the init script tries to start the server using this line:

su -l -c &apos;/etc/X11/Xserver&amp;&apos; $username

This does not work, because the user &apos;xuser&apos; has default shell /bin/false, so the whole line is a NOP. It can be fixed by adding &apos;-s /bin/sh&apos; to the command line; patch is attached.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21925</commentid>
    <comment_count>1</comment_count>
    <who name="Laurentiu Palcu">laurentiu.palcu</who>
    <bug_when>2012-06-08 08:09:58 +0000</bug_when>
    <thetext>I tested rootless X on an atom based Lenovo Ideapad S10-3t, with Intel GPU, and it works fine. I used atom-pc machine target and I didn&apos;t need to change anything else. However, it doesn&apos;t work in qemux86 anymore because X depends very much on DRI now and qemu does not support it.

Nevertheless, the bug doesn&apos;t seem to be valid since the xserver-nodm script works fine for atom-pc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21986</commentid>
    <comment_count>2</comment_count>
    <who name="Laurentiu Palcu">laurentiu.palcu</who>
    <bug_when>2012-06-11 10:53:47 +0000</bug_when>
    <thetext>Works fine on real HW. Closing as invalid.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21989</commentid>
    <comment_count>3</comment_count>
    <who name="tf">tf+bugs.yocto</who>
    <bug_when>2012-06-11 11:31:48 +0000</bug_when>
    <thetext>I am using this on real HW too, and it definitely does not work here, and I don&apos;t see how it could possibly work considering xuser has no shell ... from a root console, if you do &apos;su xuser&apos; do you get an xuser shell?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21990</commentid>
    <comment_count>4</comment_count>
    <who name="Laurentiu Palcu">laurentiu.palcu</who>
    <bug_when>2012-06-11 12:04:55 +0000</bug_when>
    <thetext>@tf: I do get a shell after doing &apos;su xuser&apos; in a root console. Also, /etc/passwd shows that xuser does have a shell assigned:

xuser:x:1000:1000::/home/xuser:/bin/sh

The &apos;/bin/sh&apos; is assigned by default by useradd if no -s option is provided and if /etc/default/useradd exists. In our case, the file exists and the default shell is /bin/sh. So, it should also work for you.

Are you using the latest tree? Can you provide more info?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21991</commentid>
    <comment_count>5</comment_count>
    <who name="tf">tf+bugs.yocto</who>
    <bug_when>2012-06-11 12:39:25 +0000</bug_when>
    <thetext>I am using denzil; the xuser entry in the passwd file is:

  xuser:x:999:999::/home/xuser:/bin/false

The reason for this is connman, the connman.inc file also does a useradd xuser and it specifies the shell as /bin/false -- I guess the final outcome depends on whether your xserver-nodm-init or connman recipe gets built first.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21992</commentid>
    <comment_count>6</comment_count>
    <who name="Laurentiu Palcu">laurentiu.palcu</who>
    <bug_when>2012-06-11 13:35:36 +0000</bug_when>
    <thetext>You&apos;re right. It looks like a parallelism issue. If connman creates the user first, then xserver-nodm-init script will fail to create the user because it already exists. It turns out, I was &quot;lucky&quot; enough not to reproduce it... :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21993</commentid>
    <comment_count>7</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2012-06-11 13:42:32 +0000</bug_when>
    <thetext>There is a good reason for connman to create the user -- dbus warns if it comes across a username it doesn&apos;t recognise in the rules.

Long term I want to see that rule die anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21996</commentid>
    <comment_count>8</comment_count>
    <who name="Laurentiu Palcu">laurentiu.palcu</who>
    <bug_when>2012-06-11 15:01:32 +0000</bug_when>
    <thetext>Well, I think the right solution to this would be to make useradd parameters consistent for both connman and xserver-nodm-init. Afterall, they both add the same user which is shared between connman and rootless X.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22120</commentid>
    <comment_count>9</comment_count>
    <who name="Laurentiu Palcu">laurentiu.palcu</who>
    <bug_when>2012-06-13 13:14:32 +0000</bug_when>
    <thetext>Patches merged:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=ca6d07c92c50a52d05aa960b7929184413780714
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=7f017cab0b3e4d5a4fc356eccd8eb8429b0531d0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22121</commentid>
    <comment_count>10</comment_count>
    <who name="tf">tf+bugs.yocto</who>
    <bug_when>2012-06-13 13:21:37 +0000</bug_when>
    <thetext>Thx; it&apos;s a fix for now, but having to manually keep files in sync is not very robust -- would it not be better to have a dedicated xuser package that the two packages RDEPEND on?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22123</commentid>
    <comment_count>11</comment_count>
    <who name="Laurentiu Palcu">laurentiu.palcu</who>
    <bug_when>2012-06-13 13:34:46 +0000</bug_when>
    <thetext>Technically, it would be better. But I don&apos;t think it&apos;s worth the effort, provided USERADD_PARAMs are not expected to change that often in the future. Otherwise, yes, I agree with you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22124</commentid>
    <comment_count>12</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2012-06-13 14:02:16 +0000</bug_when>
    <thetext>I&apos;ve made it a personal mission to remove the xuser reference in connman anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22337</commentid>
    <comment_count>13</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2012-06-19 13:31:44 +0000</bug_when>
    <thetext>Hi,
I have tested it with the core-image-sato-sugarbay-20120618061023.hddimg.

X starts,

the line: 
     xuser:x:1000:1000::/home/xuser:/bin/sh 

exist in /etc/passwd, and in connman.inc the USER_ADD_PARAM${PN} is created like this: 

USERADD_PARAM_${PN} = &quot;--create-home \
                       --groups video,tty,audio \
                       --user-group xuser&quot;


Setting it to verified.
alex.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>516</attachid>
            <date>2012-05-17 09:35:47 +0000</date>
            <delta_ts>2012-05-17 09:35:47 +0000</delta_ts>
            <desc>Patch to add missing -s option to su invocation.</desc>
            <filename>0001-xserver-nodm-init-fix-server-invocation-via-su-for-r.patch</filename>
            <type>text/plain</type>
            <size>1339</size>
            <attacher name="tf">tf+bugs.yocto</attacher>
            
              <data encoding="base64">RnJvbSAxNTk0ZjAyMDljNTc5ZjQxNTY0ZTU3MTE4NmEyODRkOGNiODFiNzE0IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBUb21hcyBGcnlkcnljaCA8dG9tYXNAc2xlZXBmaXZlLmNvbT4K
RGF0ZTogVGh1LCAxNyBNYXkgMjAxMiAwOTo1OToxNyArMDEwMApTdWJqZWN0OiBbUEFUQ0hdIHhz
ZXJ2ZXItbm9kbS1pbml0OiBmaXggc2VydmVyIGludm9jYXRpb24gdmlhIHN1IGZvciByb290bGVz
cwogWApUbzogeW9jdG9AeW9jdG9wcm9qZWN0Lm9yZwoKU2luY2UgdGhlIFggdXNlciBtaWdodCBu
b3QgaGF2ZSBhIGxvZ2luIHNoZWxsIChhcyBpcyB0aGUgY2FzZSB3aXRoIHRoZSBkZWZhdWx0Cnh1
c2VyLCB3aGVyZSBsb2dpbiBzaGVsbCBpcyAvYmluL2ZhbHNlKSwgYSBzaGVsbCBwYXJhbWV0ZXIg
bXVzdCBwYXNzZWQKZXhwbGl0ZWx5IHRvIHRoZSBzdSBjb21tYW5kLgoKU2lnbmVkLW9mZi1ieTog
VG9tYXMgRnJ5ZHJ5Y2ggPHRvbWFzQHNsZWVwZml2ZS5jb20+Ci0tLQogLi4uL3gxMS1jb21tb24v
eHNlcnZlci1ub2RtLWluaXQveHNlcnZlci1ub2RtICAgICAgfCAgICAyICstCiAxIGZpbGUgY2hh
bmdlZCwgMSBpbnNlcnRpb24oKyksIDEgZGVsZXRpb24oLSkKCmRpZmYgLS1naXQgYS9tZXRhL3Jl
Y2lwZXMtZ3JhcGhpY3MveDExLWNvbW1vbi94c2VydmVyLW5vZG0taW5pdC94c2VydmVyLW5vZG0g
Yi9tZXRhL3JlY2lwZXMtZ3JhcGhpY3MveDExLWNvbW1vbi94c2VydmVyLW5vZG0taW5pdC94c2Vy
dmVyLW5vZG0KaW5k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