2

The man page for setfsuid() says:

On success, the previous value of fsuid is returned. On error, the current value of fsuid is returned.

If I'm not wrong one could simply say "setfsuid() always returns the fsuid value that was set before calling setfsuid() - whether it was successful or not."

Is my assumption correct?

If so, and noting that there is no getfsuid() function, how am I supposed to check if the call succeeded?

As a quick, ugly hack I can only think of calling setfsuid() twice and use the return value of the second call...

Udo G
  • 12,572
  • 13
  • 56
  • 89

0 Answers0