Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-27 Thread Henry Vermaak
On 26/02/12 13:29, Mark Morgan Lloyd wrote: Martin wrote: On 26/02/2012 12:38, ik wrote: Hello, I'm trying to debug a program that I'm writing with Lazarus, and it require root privileges, but I do not want Lazarus to run as root, only the program itself for debug. How can I do that ? I

Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-27 Thread Mark Morgan Lloyd
Henry Vermaak wrote: On 26/02/12 13:29, Mark Morgan Lloyd wrote: I've had this sort of requirement in the past, specifically when using libusb (i.e. the program needed sufficient privilege to grab the device). You need udev rules that set the user/group permissions for the devices that you

Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-27 Thread ik
On Mon, Feb 27, 2012 at 12:07, Mark Morgan Lloyd markmll.laza...@telemetry.co.uk wrote: Henry Vermaak wrote: On 26/02/12 13:29, Mark Morgan Lloyd wrote: I've had this sort of requirement in the past, specifically when using libusb (i.e. the program needed sufficient privilege to grab the

Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-27 Thread Sven Barth
Am 27.02.2012 11:07, schrieb Mark Morgan Lloyd: Henry Vermaak wrote: On 26/02/12 13:29, Mark Morgan Lloyd wrote: I've had this sort of requirement in the past, specifically when using libusb (i.e. the program needed sufficient privilege to grab the device). You need udev rules that set the

Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-27 Thread Henry Vermaak
On 27/02/12 10:07, Mark Morgan Lloyd wrote: Henry Vermaak wrote: On 26/02/12 13:29, Mark Morgan Lloyd wrote: I've had this sort of requirement in the past, specifically when using libusb (i.e. the program needed sufficient privilege to grab the device). You need udev rules that set the

Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-27 Thread Mark Morgan Lloyd
Sven Barth wrote: Am 27.02.2012 11:07, schrieb Mark Morgan Lloyd: I'd be happy to be proven wrong, but my understanding is that you do since there is one specific kernel call (in effect, telling the kernel to release an unrecognised device to an unprivileged program) that won't work

Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-27 Thread Mark Morgan Lloyd
Henry Vermaak wrote: On 27/02/12 10:07, Mark Morgan Lloyd wrote: I'd be happy to be proven wrong, but my understanding is that you do since there is one specific kernel call (in effect, telling the kernel to release an unrecognised device to an unprivileged program) that won't work otherwise.

Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-27 Thread Henry Vermaak
On 27/02/12 11:13, Mark Morgan Lloyd wrote: The reason it didn't work as expected might have been because the insertion of otherwise-unrecognised devices in /dev/usb is a comparatively recent feature. Checking, it's not in 2.6.18 (Debian Etch) but is in 2.6.32 (Debian Lenny). Allow for a few

Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-27 Thread Henry Vermaak
On 27/02/12 11:34, Mark Morgan Lloyd wrote: Henry Vermaak wrote: On 27/02/12 11:13, Mark Morgan Lloyd wrote: The reason it didn't work as expected might have been because the insertion of otherwise-unrecognised devices in /dev/usb is a comparatively recent feature. Checking, it's not in 2.6.18

Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-27 Thread ik
On Sun, Feb 26, 2012 at 14:38, ik ido...@gmail.com wrote: Hello, I'm trying to debug a program that I'm writing with Lazarus, and it require root privileges, but I do not want Lazarus to run as root, only the program itself for debug. How can I do that ? Working with gdbserver can solve

Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-27 Thread Sven Barth
Am 27.02.2012 12:13, schrieb Mark Morgan Lloyd: Sven Barth wrote: Am 27.02.2012 11:07, schrieb Mark Morgan Lloyd: I'd be happy to be proven wrong, but my understanding is that you do since there is one specific kernel call (in effect, telling the kernel to release an unrecognised device to

Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-27 Thread ik
On Mon, Feb 27, 2012 at 15:56, Mark Morgan Lloyd markmll.laza...@telemetry.co.uk wrote: ik wrote: On Sun, Feb 26, 2012 at 14:38, ik ido...@gmail.com wrote: Hello, I'm trying to debug a program that I'm writing with Lazarus, and it require root privileges, but I do not want Lazarus to run

Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-27 Thread waldo kitty
On 2/27/2012 05:11, Sven Barth wrote: I'd be happy to be proven wrong, but my understanding is that you do since there is one specific kernel call (in effect, telling the kernel to release an unrecognised device to an unprivileged program) that won't work otherwise. I already managed the

Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-27 Thread Sven Barth
Am 27.02.2012 16:06, schrieb waldo kitty: On 2/27/2012 05:11, Sven Barth wrote: I'd be happy to be proven wrong, but my understanding is that you do since there is one specific kernel call (in effect, telling the kernel to release an unrecognised device to an unprivileged program) that won't

Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-27 Thread waldo kitty
On 2/27/2012 10:09, Sven Barth wrote: Am 27.02.2012 16:06, schrieb waldo kitty: why not just add your user(s) to that group the device was in? this would/should give the same access capabilities... or am i missing something else? The USB device files are by default created with root:root. I

Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-26 Thread zeljko
On Sunday 26 of February 2012 13:49:08 Martin wrote: On 26/02/2012 12:38, ik wrote: Hello, I'm trying to debug a program that I'm writing with Lazarus, and it require root privileges, but I do not want Lazarus to run as root, only the program itself for debug. How can I do that ?

Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-26 Thread ik
On Sun, Feb 26, 2012 at 15:05, zeljko zel...@holobit.net wrote: On Sunday 26 of February 2012 13:49:08 Martin wrote: On 26/02/2012 12:38, ik wrote: Hello, I'm trying to debug a program that I'm writing with Lazarus, and it require root privileges, but I do not want Lazarus to run as

Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-26 Thread Mark Morgan Lloyd
Martin wrote: On 26/02/2012 12:38, ik wrote: Hello, I'm trying to debug a program that I'm writing with Lazarus, and it require root privileges, but I do not want Lazarus to run as root, only the program itself for debug. How can I do that ? I have not tried it, but maybe if you replace

Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-26 Thread ik
On Sun, Feb 26, 2012 at 15:29, Mark Morgan Lloyd markmll.laza...@telemetry.co.uk wrote: Martin wrote: On 26/02/2012 12:38, ik wrote: Hello, I'm trying to debug a program that I'm writing with Lazarus, and it require root privileges, but I do not want Lazarus to run as root, only the

Re: [Lazarus] run program in ide with sudo for debug purpose

2012-02-26 Thread zeljko
On Sunday 26 of February 2012 14:56:19 ik wrote: That's scars me a lot. Because it means that every program that is using gdb can raise it's privileges to root. I think that a better way, will be to set per project if the program should have different privileges for running inside Lazarus,