Bug 56038 - setresuid and setresgid not prototyped in unistd.h
setresuid and setresgid not prototyped in unistd.h
Product: Red Hat Linux
Classification: Retired
Component: man-pages (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
Aaron Brown
Depends On:
  Show dependency treegraph
Reported: 2001-11-11 10:42 EST by Richard Lloyd
Modified: 2007-04-18 12:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-11-13 15:47:52 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Richard Lloyd 2001-11-11 10:42:40 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; HP-UX B.11.00 9000/712; Nav)

Description of problem:
If I do a "man setresuid" on RH 7.2, I get told that the prototypes
for both setresuid and setresguid are in <unistd.h>. Sadly, they're
not ! I can't even find them in any file under /usr/include.

Also, the man page claims it's a "Linux-specific" function,
but it actually also exists on HP-UX (and maybe other non-Linux
machines too ?).

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. "man setresuid".
2. find /usr/include -exec grep setresuid {} \; -print

Actual Results:  Man page for setresuid indicates that <unistd.h> should
the function.

The find command searches down the /usr/include tree looking for
any reference to setresuid. It fails to find the prototype.

Expected Results:  I should have got the prototype defined in <unistd.h>
like the
man page says.

Additional info:

<unistd.h> is part of glibc-devel (which isn't listed as a
component in this Bugzilla interface !) - so this problem is actually
probably more in the realm of the glibc coders than Red Hat, but
I thought you'd like to know anyway...

The workaround is straightforward - just define the prototypes
yourself as the man page lists them:

       int setresuid(uid_t ruid, uid_t euid, uid_t suid);
       int setresgid(gid_t rgid, gid_t egid, gid_t sgid);

But really, I shouldn't have to do this myself...
Comment 1 Jakub Jelinek 2001-11-12 12:59:15 EST
According to Ulrich Drepper, this is intentional.
So instead the man pages should have #include <unistd.h> deleted.
What do you need it for?
Comment 2 Trond Eivind Glomsrxd 2001-11-13 15:47:46 EST
jakub: The prototypes can't be found in any header? You have to write them
yourself? That doesn't seem like a good thing....
Comment 3 Trond Eivind Glomsrxd 2001-11-15 12:19:03 EST
This information was added to man-pages-1.43-2, but I think the headers should
be available somewhere...

Note You need to log in before you can comment on or make changes to this bug.