All of lore.kernel.org
 help / color / mirror / Atom feed
* Trouble with /lib/libselinux and linking
@ 2006-05-31  9:30 Mario Fanelli
  2006-05-31 10:23 ` Valdis.Kletnieks
  0 siblings, 1 reply; 3+ messages in thread
From: Mario Fanelli @ 2006-05-31  9:30 UTC (permalink / raw)
  To: SeLinux Mailing List

I have written a simple program that uses SELinux API but when I try to
compile it, gcc gives me an error says that it's unable to resolve reference
to getcon() function.
The program is like:

#include <selinux/selinux.h>
#include <stdio.h>

int main(int argc,char *argv[]){
	security_context_t scontext;
	if(getcon(&scontext))....
}

The only way is to link statically the library and thus if I use "gcc
-lselinux program.c" all works...
Moreover if I use nm on libselinux.so, I don't receive any output..Isn't it
unusual?  
Anyone can give me a explanation?


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-05-31 13:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-31  9:30 Trouble with /lib/libselinux and linking Mario Fanelli
2006-05-31 10:23 ` Valdis.Kletnieks
2006-05-31 13:01   ` Stephen Smalley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.