-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
Even if you are root, getsockopt() fails with option SCTP_HMAC_IDENT : Permission denied. Following code shows this:
#include <stdio.h>
#include <unistd.h>
#include <netinet/sctp.h>
int
main(void)
{
int sock;
char optval[1024];
socklen_t optlen = sizeof(optval);
if (geteuid() != 0) { /* to be sure we're root */
fprintf(stderr, "You are not root\n");
return 1;
}
sock = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP);
if (getsockopt(sock, IPPROTO_SCTP, SCTP_HMAC_IDENT, optval, &optlen) < 0) {
perror("getsockopt()");
return 1;
}
return 0;
}
Execution of program above, as root, outputs:
getsockopt(): Permission denied
My version of lksctp-tools: 1.0.19+dfsg-2
Regards,
Yves.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels