pid_t pid;
uid_t uid;
gid_t gid;
- struct ucred ucred;
char proc_name[WL_CLIENT_NAME_MAX];
int error;
struct wl_priv_signal resource_created_signal;
if (mask & WL_EVENT_HANGUP) {
wl_log("Mask has hangup flag set, client_proc(%s) PID(%d) mask[%x]\n",
- client->proc_name, client->ucred.pid, mask);
+ client->proc_name, client->pid, mask);
wl_client_destroy(client);
return 1;
}
len = wl_connection_flush(connection);
if (len < 0)
wl_log("client_proc(%s) PID(%d) flush failed: len(%d) errno(%d)\n",
- client->proc_name, client->ucred.pid, len, errno);
+ client->proc_name, client->pid, len, errno);
if (len < 0 && errno != EAGAIN) {
destroy_client_with_error(
client, "failed to flush client connection");
len = wl_connection_read(connection);
if (len <= 0)
wl_log("client_proc(%s) PID(%d) read failed: len(%d) errno(%d)\n",
- client->proc_name, client->ucred.pid, len, errno);
+ client->proc_name, client->pid, len, errno);
if (len == 0 || (len < 0 && errno != EAGAIN)) {
destroy_client_with_error(
client, "failed to read client connection");
if (!client->display->super_user)
goto no_name;
- if (client->ucred.pid <= 0)
+ if (client->pid <= 0)
goto no_name;
- snprintf(proc, WL_CLIENT_NAME_MAX, "/proc/%d/cmdline", client->ucred.pid);
+ snprintf(proc, WL_CLIENT_NAME_MAX, "/proc/%d/cmdline", client->pid);
h = fopen(proc, "r");
if (!h)
goto no_name;
ret = wl_connection_flush(client->connection);
if (ret < 0)
wl_log("client_proc(%s) PID(%d) flush failed: ret(%d) errno(%d)\n",
- client->proc_name, client->ucred.pid, ret, errno);
+ client->proc_name, client->pid, ret, errno);
if (ret < 0 && errno == EAGAIN) {
wl_event_source_fd_update(client->source,
WL_EVENT_WRITABLE |