Re: Firefox build (Nightly) thread with root permission

2014-04-06 Thread Paul
Alex Jordan於 2014年4月6日星期日UTC+8下午1時23分04秒寫道:
 On Apr 5, 2014 6:55 AM, Paul mozloverin...@gmail.com wrote:
 
  That's why I tried to obtain root privileges on Nightly. If there is
 
 another way to make this work without gaining root permission, that will be
 
 great.
 
 The correct way to accomplish something like this is to use a helper daemon
 
 that is setuid root or, even better, use something like polkit.

Hi Alex,

Thanks for your feedback. I will look into these approaches.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Firefox build (Nightly) thread with root permission

2014-04-05 Thread Paul
Hi Mike,

Thanks for your advice.

I will definitely take your suggestion.

The experiment I am currently doing is to run some functions related to udevadm 
on Nightly. The function udev_monitor_new_from_socket() I added in Nightly did 
not work while this works well on my another Firefox OS device. 

That's why I tried to obtain root privileges on Nightly. If there is another 
way to make this work without gaining root permission, that will be great.

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Firefox build (Nightly) thread with root permission

2014-04-05 Thread Alex Jordan
On Apr 5, 2014 6:55 AM, Paul mozloverin...@gmail.com wrote:
 That's why I tried to obtain root privileges on Nightly. If there is
another way to make this work without gaining root permission, that will be
great.
The correct way to accomplish something like this is to use a helper daemon
that is setuid root or, even better, use something like polkit.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Firefox build (Nightly) thread with root permission

2014-04-02 Thread Mike Hoye

On 2014-04-02, 1:46 AM, Paul wrote:

I strongly suspect this happens due to the permission issue while Nightly does 
not allow me to gain root privileges.

However, this is necessary for me to complete my experiment. How can I obtain a 
decent permission while I do this?


strace -f should see you right as far as specifically diagnosing what's 
failing is concerned;


I reiterate that this is a terrible idea - see here 
https://bugzilla.mozilla.org/show_bug.cgi?id=353203 for just a taste as 
to why, and please don't deploy whatever you're doing here to a 
production multi-user system. But still, good luck?


Maybe we could give you better advice if you could tell us a bit more 
about what you're trying to do with your experiment.



- mhoye
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Firefox build (Nightly) thread with root permission

2014-04-01 Thread Paul
Hi,

When I added code with a function udev_monitor_new_from_socket(),
the Nightly stops executing everything while this function returns
an error fd. 

I strongly suspect this happens due to the permission issue while Nightly does 
not allow me to gain root privileges.

However, this is necessary for me to complete my experiment. How can I obtain a 
decent permission while I do this?

Thanks
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Firefox build (Nightly) thread with root permission

2014-03-31 Thread Paul
Hi,

I have created a new thread in Nightly and the function can be launched while I 
executed the script: 

./mach run


Q1:
Because my function is related to kernel, root privilege is necessary.
Hence, I got the error message as shown in the following:

root privileges needed to run this function---

Q2:
By running the function with sudo
sudo ./mach run

Things seem running well. 

However, the browser can not be launched and it ended without any notice.
The following log shown on my terminal

root privileges obtained...
myDesktop$


Any feedback will be highly appreciated.

Thanks



 
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Firefox build (Nightly) thread with root permission

2014-03-31 Thread Benjamin Smedberg

On 3/31/14 4:56 AM, Paul wrote:


Q1:
Because my function is related to kernel, root privilege is necessary.
Hence, I got the error message as shown in the following:

root privileges needed to run this function---
What function are you talking about? Something in Firefox already, or 
new code that you are adding?




Q2:
By running the function with sudo
sudo ./mach run

Things seem running well.

However, the browser can not be launched and it ended without any notice.
Firefox is not meant to run with root privileges, and I actually thought 
we checked and refused to launch in that case. I can't find the bug 
about it now, though. In any case I strongly discourage running Firefox 
as root.


--BDS

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Firefox build (Nightly) thread with root permission

2014-03-31 Thread Paul
Hey BDS,

Thanks for your reply.

1.
The function I mentioned is the new code I added.

2.
I understand that running Firefox with root privileges is not encouraged. 

However, due to my experiment is related to kernel, root privileges will be 
necessary to my program.

I wiped out my code which was added in Nightly and run
sudo ./mach run  ---This runs well and Nightly can be launched.

However, when I added my code back to Nightly and rebuilt the code,
It ended without Nightly launched.

I am still confused by this. Please let me know if you have any comment.

Thanks

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform