X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audiod_command.c;h=2d5bb79917b760f117997d42a7752dba6da82da0;hp=77a0a1ee32bb7a1b3241afc549d999f124a6073e;hb=ae0e4594c6a0312c5b4b4c0bde86f9c12253d11b;hpb=3bcbbeb2728a1362e27d80e059830e4aeb8007cb diff --git a/audiod_command.c b/audiod_command.c index 77a0a1ee..2d5bb799 100644 --- a/audiod_command.c +++ b/audiod_command.c @@ -426,6 +426,7 @@ int handle_connect(int accept_fd) int i, argc, ret, clifd = -1; char *cmd = NULL, *p, *buf = para_calloc(MAXLINE), **argv = NULL; struct sockaddr_un unix_addr; + uid_t uid; ret = para_accept(accept_fd, &unix_addr, sizeof(struct sockaddr_un)); if (ret < 0) @@ -434,8 +435,9 @@ int handle_connect(int accept_fd) ret = recv_cred_buffer(clifd, buf, MAXLINE - 1); if (ret < 0) goto out; + uid = ret; PARA_INFO_LOG("connection from user %i, buf: %s\n", ret, buf); - ret = check_perms(ret); + ret = check_perms(uid); if (ret < 0) goto out; ret = -E_INVALID_AUDIOD_CMD;