Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.unix.programmer > #8291
| Newsgroups | comp.unix.programmer |
|---|---|
| Date | 2016-04-01 04:42 -0700 |
| References | <ncucac$9ke$1@gioia.aioe.org> <ed114e77-047a-4c12-804a-6634339ed45f@googlegroups.com> <nd0cml$1iq6$1@gioia.aioe.org> <6hudsc-q2f.ln1@wilbur.25thandClement.com> |
| Message-ID | <02167dc4-c010-48b0-ad2e-059794456005@googlegroups.com> (permalink) |
| Subject | Re: Getting the saved set uid |
| From | boon <fred900rbc@gmail.com> |
On Thursday, March 24, 2016 at 9:30:07 PM UTC+1, wil...@wilbur.25thandclement.com wrote: > spud@potato.field wrote: > > On Wed, 23 Mar 2016 10:01:14 -0700 (PDT) > > Philip Guenther <guenther@gmail.com> wrote: > >>On Wednesday, March 23, 2016 at 8:21:55 AM UTC-7, sp...@potato.field wrote: > >>> Is there a way in C of getting the current saved set user id (as set by > >>> seteuid()) ? > >> > >>Does your system have useful manpages? If so, "man -k" (also called > >>"apropos") can be a quick start to these questions: > > > > $ man getresgid > > No manual entry for getresgid > > $ man getresuid > > No manual entry for getresuid > > > > So, hows that sarcasm working out for you? > > > > Turns out those functions are non standard. Supported on Linux and hp-ux > > but thats about it. Not OS/X as you can see above. > > > > Are there posix functions that do the same? And yes I have googled already > > otherwise I wouldn't asking. > > You can download the POSIX specification for free from > > https://www2.opengroup.org/ogsys/catalog/c138 > > or just visit it online at > > http://pubs.opengroup.org/onlinepubs/9699919799/ > > The index of system interfaces is incomparably useful. Select "System > Interfaces" from the top-left frame, then "System Interfaces" in the > bottom-left frame. That gives you the full list of system interfaces (aka > syscalls and libc routines), and AFAICT there's nothing like getreuid > available. > > The history and rationale sections of related interface definitions often > provide useful information. As do other chapters in the Base Definitions and > System Interfaces volumes. For example, section 3.331 Saved Set-User-ID > directs you to the setuid and exec-family definitions for more information, > and indeed the rationale section of setuid contains much information about > the semantics of uids. > > If you're serious about C or Unix programming it would be prudent to have > local copies of the POSIX and C standards.[1] Once you become familiar with > them I think you'll find them much more convenient and reliable in general > than either man pages (especially the inconsistent Linux man pages), > Googling, or technical forums. Only once I know or suspect I'm dealing with > vendor extensions do I bother with anything else, and by then the standards > have framed things such that I'm much more productive when searching and > analyzing other sources. > > > [1] The draft C99 and C11 standards are freely available, and but for > inconsequential typos identical to the published standards. See > > http://www.open-std.org/jtc1/sc22/wg14/www/standards According to my manual page, sendto() conforms to POSIX.1-2001. Is this normal?
Back to comp.unix.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Getting the saved set uid spud@potato.field - 2016-03-23 15:21 +0000
Re: Getting the saved set uid Philip Guenther <guenther@gmail.com> - 2016-03-23 10:01 -0700
Re: Getting the saved set uid spud@potato.field - 2016-03-24 09:40 +0000
Re: Getting the saved set uid Philip Guenther <guenther@gmail.com> - 2016-03-24 09:10 -0700
Re: Getting the saved set uid spud-u-dont-like@potato.field - 2016-03-25 12:50 +0000
Re: Getting the saved set uid Barry Margolin <barmar@alum.mit.edu> - 2016-03-25 10:28 -0400
Sarcasm in Usenet posts (Was: Getting the saved set uid) gazelle@shell.xmission.com (Kenny McCormack) - 2016-03-25 14:29 +0000
Re: Sarcasm in Usenet posts (Was: Getting the saved set uid) Barry Margolin <barmar@alum.mit.edu> - 2016-03-25 11:49 -0400
Re: Sarcasm in Usenet posts (Was: Getting the saved set uid) Ian Zimmerman <itz@buug.org> - 2016-03-26 09:41 -0700
Re: Sarcasm in Usenet posts (Was: Getting the saved set uid) Philip Guenther <guenther@gmail.com> - 2016-03-25 10:10 -0700
Re: Getting the saved set uid <william@wilbur.25thandClement.com> - 2016-03-24 13:16 -0700
Re: Getting the saved set uid boon <fred900rbc@gmail.com> - 2016-04-01 04:42 -0700
Re: Getting the saved set uid Noob <root@127.0.0.1> - 2016-04-01 19:16 +0200
Re: Getting the saved set uid Barry Margolin <barmar@alum.mit.edu> - 2016-04-01 17:23 -0400
Re: Getting the saved set uid boon <fred900rbc@gmail.com> - 2016-04-01 17:27 -0700
Re: Getting the saved set uid boon <root@127.10.10.1> - 2016-03-24 12:08 +0100
Re: Getting the saved set uid spud@potato.field - 2016-03-24 11:59 +0000
Re: Getting the saved set uid boon <root@127.10.10.1> - 2016-03-24 13:19 +0100
csiph-web