Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-07

port access as simple user

10 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Balázs Csaba

Hi!
I like to access ports as a simple user. Only root user can do it. So i like to run a program with root user and first fork or execve to the same program with setuid(). So how can i run a program with root user whene i logged in with a simple one? Can i fork port access rights?

Best reg.
#Tsch : Balázs Csaba

Reply by email

Balázs Csaba

Hi!
I like to access ports as a simple user. Only root user can do it. So i like to run a program with root user and first fork or execve to the same program with setuid(). So how can i run a program with root user whene i logged in with a simple one? Can i fork port access rights?

Best reg.
#Tsch : Balázs Csaba

Reply by email

Michael Van Canneyt
to Balázs Csaba: Hi! I like to access ports as a simple user. Only root user can do it. So i like to run a…
Show quoted text 5 lines
Hi! I like to access ports as a simple user. Only root user can do it. So i like to run a program with root user and first fork or execve to the same program with setuid(). So how can i run a program with root user whene i logged in with a simple one? Can i fork port access rights?

You must make your program "setuid root".

i.e. compile and install as root, and then run
"chmod 4755 yourprogram"

The program will then be run with root permissions.

Michael.

Reply by email

Balázs Csaba
to L D Blake

http://www.users.on.net/johnson/resourcehacker/

It can handle all exe files, that compiled with resources. Can get or edit menus, dialogs, icons and not only text mode. You can see menus and dialogs in wyswyg mode.

#Tsch : Balázs Csaba

Show quoted text 5 lines
Does anyone know where I can get some documentation and examples on Windows resource files? I'm mostly interested in imbedding icons, menus, dialogs gadgets and version info.

Reply by email

Ivan Shikhalev
to L D Blake: Does anyone know where I can get some documentation and examples on Windows resource…

Hello, L!
You wrote to ""
on Tue, 29 Jul 2003 09:55:38 -0400:

LB> Does anyone know where I can get some documentation and examples on LB> Windows resource files?

LB> I'm mostly interested in imbedding icons, menus, dialogs gadgets and LB> version info.

This is a documentation page of the resource compiler GoRC^ http://www.jorgon.freeserve.co.uk/ResourceFrame.htm

------------
Ivan Shikhalev
http://fpc.by.ru/

Reply by email

L D Blake
to Balázs Csaba: http://www.users.on.net/johnson/resourcehacker/ It can handle all exe files, that…

In reply to your message of July 29, 2003

Show quoted text 5 lines
http://www.users.on.net/johnson/resourcehacker/ It can handle all exe files, that compiled with resources. Can get or edit menus, dialogs, icons and not only text mode. You can see menus and dialogs in wyswyg mode.

Yeah I looked at that, and it works great if the .RES stuff is already in the file... I don't want to get stuff out <Grin> the idea is to add stuff in.

-----
L D Blake

Reply by email

L D Blake
to Ivan Shikhalev: Hello, L! You wrote to "" on Tue, 29 Jul 2003 09:55:38 -0400: LB> Does anyone know where…

In reply to your message of July 29, 2003

This is a documentation page of the resource compiler GoRC^ http://www.jorgon.freeserve.co.uk/ResourceFrame.htm

Now THAT was helpful! Thank you.

I also found out I was missing a couple of help files from WinSDK I "borrowed" from Delphi7... one of them was the documentation on the resource stings.

Between the two, I should be on the way!
(Well, until my next dumb question, that is...)

-----
L D Blake

Reply by email

L D Blake
to Michael Van Canneyt: You must make your program "setuid root". i.e. compile and install as root, and then run…

Ok guys I've got something of a mystery going on at this end and I sure could use some suggestions...

My system: Amd 1800xp, 256mb ram, gigabyte motherboard, TNT 64 video, no overclocks or other "enhancements"... Wind2000 sp4 with free pascal on it's own partition.

I'm working on a piece of software here that uses some MCI calls as part of it's secondary functions. If I start it playing a song then put it into the background it will play the song perfectly, but the rest of the window goes strange on me... When it comes back to foreground the title bars are missing from all the application's windows and from any window I open through the software (open file dialog, for example). If I try to move one of the application windows it will draw the frame of one of the application's other windows in the top left of the screen and all the menu context numbers for the buttons etc pop up onto the display. Moving the main window around will result in it drawing the frames of all the other windows, one at a time in the upper left of the screen. These images are not active, they just pop up and disappear depending on the location of the main window. Sometimes it grabs bits of other application wndows and draws them in random locations on the screen... But... so long as I never put the application into the background it will work perfectly for hours on end.

I compiled it with stack checking and range checking turned on, no errors. I tried debug mode through the FP-IDE, no errors. I've tried setting memory and stack sizes, which makes no difference. I also tried re-declaring all my variables using the Win-api syntax, same problem.

I'm stumped... HELP!

-----
L D Blake

Reply by email