[Lxc-users] lxc-start setenv & setuid

Vijay Viswanathan vijay.vishy at gmail.com
Thu Nov 14 18:03:20 UTC 2013


Hi,
I want to start a program inside a container under a particular uid and
after setting particular ENV variable, but I dont have the luxury of
busybox & shell start script and I also dont want to exec that program
under a C wrapper program. How do I achieve that ?

simply put, without a hack in start.c is there a way to print a different
uid for 1) and MYENV in 2 ?

1)
# ./lxc-start -n r id
uid=0(root) gid=0(root) groups=0(root)

2)
--- with hack in start.c &
# ./lxc-start -n r env
container=lxc
MYENV=TESTVAL


Thanks,
Vijay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20131114/8f572c25/attachment.html>


More information about the lxc-users mailing list