Skip to contentSkip to conversation

getfscreatecon(3)

DISCUSSION Russell Coker 3 participants 3 messages Apr 26, 2006 SELinux security module

lore
Share & tools
lore
#0 lore raw

RETURN VALUE
On error -1 is returned.

On success getfscreatecon returns the length of the context (not including the trailing zero byte). On success setfscreatecon returns 0.

Currently getfscreatecon() returns 0 on success. Should we change the man page or change the library?

I think that it would be best to change the library.

Signature · 9 lines
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#1 lore raw
Quoted 8 lines · Russell Coker

RETURN VALUE
On error -1 is returned.

On success getfscreatecon returns the length of the context (not including the trailing zero byte). On success setfscreatecon returns 0.

Quoted 4 lines

Currently getfscreatecon() returns 0 on success. Should we change the man page or change the library?

I think that it would be best to change the library.

The man page should be fixed. Or you'd have to change all of the process-oriented get*con functions. As the string is NUL-terminated, you don't need the length.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#2 lore raw
Quoted 10 lines · Stephen Smalley
Quoted 8 lines · Russell Coker

RETURN VALUE
On error -1 is returned.

On success getfscreatecon returns the length of the context (not including the trailing zero byte). On success setfscreatecon returns 0.

Quoted 10 lines
Quoted 4 lines

Currently getfscreatecon() returns 0 on success. Should we change the man page or change the library?

I think that it would be best to change the library.

The man page should be fixed. Or you'd have to change all of the process-oriented get*con functions. As the string is NUL-terminated, you don't need the length.

man/man3/getfscreatecon.3 +1 -3
diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/getfscreatecon.3 libselinux-1.30.3/man/man3/getfscreatecon.3
@@ -32,9 +32,7 @@
 save, reset, and restore the fscreate context to avoid unexpected behaviors.
 .SH "RETURN VALUE"
 On error -1 is returned.
-
-On success getfscreatecon returns the length of the context (not including
-the trailing zero byte).  On success setfscreatecon returns 0.
+On success 0 is returned.
 
 .SH "SEE ALSO"
 .BR freecon "(3), " getcon "(3), " getexeccon "(3)"