This works but only partialy:

bash-4.3# gumd --offline --add-user --usertype=4 --username=atom
Unsupported ioctl: cmd=0x40049409

And after that it hangs forever (the user gets created however if i press ctrl+c) BUT if i strace the process i see it hangs in the middle of setting up the user, so the user gets created but it's environment is not:

pid 23924] close(4)                    = 0
[pid 23924] setxattr("/home/atom", "security.SMACK64", "User", 4, 0) = 0
[pid 23924] chown("/home/atom", 2003, 100) = 0
[pid 23924] access("/etc/gumd/gumd.conf", R_OK) = 0
[pid 23924] open("/etc/gumd/gumd.conf", O_RDONLY) = 4
[pid 23924] fstat(4, {st_mode=S_IFREG|0664, st_size=4401, ...}) = 0
[pid 23924] read(4, "#\n# gumd Configuration file.\n#\n\n"..., 4096) = 4096
[pid 23924] read(4, "t exit. Has no effect if P2P DBu"..., 4096) = 305
[pid 23924] read(4, "", 4096)           = 0
[pid 23924] close(4)                    = 0
[pid 23924] openat(AT_FDCWD, "/etc/skel", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
[pid 23924] getdents64(4, /* 4 entries */, 32768) = 120
[pid 23924] lstat("/etc/skel/.bash_profile", {st_mode=S_IFREG|0644, st_size=49, ...}) = 0
[pid 23924] getresuid([0], [0], [0])    = 0
[pid 23924] getresgid([0], [0], [0])    = 0
[pid 23924] openat(AT_FDCWD, "/usr/lib/gio/modules", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 5 [pid 23924] stat("/usr/lib/gio/modules/giomodule.cache", 0x7fff46afcaf0) = -1 ENOENT (No such file or directory)
[pid 23924] getdents64(5, /* 2 entries */, 32768) = 48
[pid 23924] getdents64(5, /* 0 entries */, 32768) = 0
[pid 23924] close(5)                    = 0
[pid 23924] lstat("/etc/skel/.bash_profile", {st_mode=S_IFREG|0644, st_size=49, ...}) = 0
[pid 23924] open("/etc/skel/.bash_profile", O_RDONLY) = 5
[pid 23924] fstat(5, {st_mode=S_IFREG|0644, st_size=49, ...}) = 0
[pid 23924] fstat(5, {st_mode=S_IFREG|0644, st_size=49, ...}) = 0
[pid 23924] flistxattr(5, NULL, 0)      = 17
[pid 23924] flistxattr(5, "security.SMACK64\0", 17) = 17
[pid 23924] open("/home/atom/.bash_profile", O_WRONLY|O_CREAT|O_EXCL, 0644) = 6
[pid 23924] write(2, "Unsupported ioctl: cmd=0x4004940"..., 34) = 34
[pid 23924] pipe2([7, 8], O_CLOEXEC)    = 0
[pid 23924] splice(5, [0], 8, NULL, 65536, SPLICE_F_MORE) = 49
[pid 23924] splice(7, NULL, 6, [0], 49, SPLICE_F_MORE) = 49

After this, the splice () calls continue forever.


On 10/17/2014 04:14 PM, Zaman, Imran wrote:
Hi Rafal/Roman!

I agree with patrick, and consequently:

In order to make life easier, I have added "offline" support in gumd, which 
means that gumd can be run as simple binary to add/del/update/get user/group.
No (p2p) dbus is needed.

offline mode:  user will be added and gumd will exit immediately
# gumd -o -a --username=user1 --usertype=4               (e.g.)

non-offline mode (it needs either p2p dbus or system bus):
# gumd

The changes have already been merged and pushed to tizen, and should show up in 
next Tizen common release (hopefully on monday).
Please make sure that you use gumd with version 0.0.6.

Roman, please test user creation at image level with gumd 0.0.6 and let me know 
if you face any issues.

BR
imran
________________________________________
From: Dev [[email protected]] on behalf of Patrick Ohly 
[[email protected]]
Sent: 17 October 2014 10:37
To: [email protected]
Subject: Re: [Dev] Gumd usage in building images

On Fri, 2014-10-17 at 09:18 +0200, Dominig ar Foll (Intel OTC) wrote:
Hello;

when looking at off line mode (use during image creation) remember that
we have a fast growing community planing to use Yocto and so your
solution needs to work with Yocto as well.
For those not familiar with Yocto, some background:
       * Tools manipulating the root filesystem typically get compiled
         for the host system (for example, your Intel-based laptop
         running some Linux distro) and then get invoked to modify files
         used in the target (for example, ARM). Make sure that your files
         don't have architecture dependencies (LSB vs. MSB, 32 vs 64).
       * If that's not possible, tools are run under qemu.
       * chroot is not used (because it would require root privileges),
         so tools need to support manipulating files not at their final
         destination (for example, tmp/sysroot/usr/ instead of /usr).
       * The environment prepared for the tools only consists of env
         variables. There's no concept of spawning additional daemons
         (doesn't matter whether it's dbus-daemon or gumd).

For gumd, a mode where the client tool embeds the daemon code directly
would be the best solution IMHO. A --sysroot parameter similar to gcc
would probably be useful/needed, too.

--
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.



_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



--
--------------
 Roman Kubiak
--------------

_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev

Reply via email to