search for: credlen

Displaying 3 results from an estimated 3 matches for "credlen".

Did you mean: cradle
2007 Oct 18
0
[PATCH] Use credentials and permissions on control socket where available
...lsocketname, strerror(errno)); + fprintf(stderr, _("Cannot connect to %s: %s\n"), addr.sun_path, strerror(errno)); return 1; } @@ -525,16 +528,43 @@ int main(int argc, char *argv[], char *envp[]) { return 1; } +#if defined(HAVE_STRUCT_UCRED) struct ucred cred; socklen_t credlen = sizeof cred; if(getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &cred, &credlen) < 0) { - fprintf(stderr, _("Could not obtain PID: %s\n"), strerror(errno)); + fprintf(stderr, _("Could not establish peer credentials: %s\n"), strerror(errno)); return 1; } + if(cred...
2007 Oct 18
0
[PATCH] Use a control socket directory to restrict access
...wd_fd); + } + if(fullread(fd, &greeting, sizeof greeting) == -1) { fprintf(stderr, _("Cannot read greeting from control socket: %s\n"), strerror(errno)); @@ -525,16 +574,8 @@ int main(int argc, char *argv[], char *envp[]) { return 1; } - struct ucred cred; - socklen_t credlen = sizeof cred; - - if(getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &cred, &credlen) < 0) { - fprintf(stderr, _("Could not obtain PID: %s\n"), strerror(errno)); - return 1; - } - if(!strcasecmp(argv[optind], "pid")) { - printf("%d\n", cred.pid); + printf(&qu...
2007 Jul 21
2
tincctl patches
(Second try to send this. I wonder if the first one gotten eaten by a spam filter; I'll link to patches instead of attaching them.) Here are the tincctl patches I've been working on. They apply to http://www.tinc-vpn.org/svn/tinc/branches/1.1@1545. I intend to commit them once the crypto stuff's fixed. Since they're basically done, I'm emailing them now for review and in case