Page 1 of 1

Posted: Tue Oct 03, 2006 11:28 am
by freak

Code: Select all

If getuid_() = 0
  ; mighty root
Else
  ; somebody else
EndIf

Posted: Tue Oct 03, 2006 12:26 pm
by thamarok
That's good code freak! Compliment, with this I can do programs that are limited for normal users but fully functional for superusers :)

By the way, when I did a search for getuid_ on Google, I found this page on IBM which is the command reference for Fortran for Linux:
http://publib.boulder.ibm.com/infocente ... getuid.htm

That's a good reference for API calls for Linux :D

Posted: Tue Oct 03, 2006 1:07 pm
by freak
I suggest to use the glibc documentation, as that is what PB links to.
It is a very complete and well written manual:
http://www.gnu.org/software/libc/manual ... index.html
(downloadable versions here)

It even is a funny read at times... :D
At this point in time this mystery should not be revealed, unless you have the relevant spell-casting materials: ashes from an original DOS 6.2 boot disk burnt in effigy, a crucifix blessed by St. Emacs, assorted herbal roots from Central America, sand from Cebu, etc. Sorry! The part of the implementation where this is used is not yet finished. For now please simply follow the existing examples. It'll become clearer once it is. –drepper
Oh btw, do not seach for "getuid_". The real function name is "getuid". PB just has
the convention of the _ at the end for external commands.

Posted: Tue Oct 03, 2006 1:08 pm
by DarkDragon
I like this Linux-API reference more than any other: http://www.mkssoftware.com/docs/api_index.asp

Posted: Tue Oct 03, 2006 1:19 pm
by freak
> I like this Linux-API reference more than any other: http://www.mkssoftware.com/docs/api_index.asp

There is no such thing as a "linux api" in general. There are several standards, but the
actual implementations may vary. Thats why i suggest to use the documentation
of the library that is actually used, which is the glibc.

Posted: Tue Oct 03, 2006 4:02 pm
by Straker
Thanks for all the info. Exactly what I was looking for.