X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust-ctl%2Fustctl.c;h=cfe2cc960a8e52c580982c09815b8ac681204ac1;hb=c0c0989ab70574e09b2f7e8b48c2da6af664a849;hp=0272d9b9331c6750c276993b14552bbeb6e565f2;hpb=a834901f2890deadb815d7f9e3ab79c3ba673994;p=lttng-ust.git diff --git a/liblttng-ust-ctl/ustctl.c b/liblttng-ust-ctl/ustctl.c index 0272d9b9..cfe2cc96 100644 --- a/liblttng-ust-ctl/ustctl.c +++ b/liblttng-ust-ctl/ustctl.c @@ -1,19 +1,8 @@ /* - * Copyright (C) 2011 - Julien Desfossez - * Copyright (C) 2011-2013 - Mathieu Desnoyers + * SPDX-License-Identifier: GPL-2.0-only * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License only. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * Copyright (C) 2011 Julien Desfossez + * Copyright (C) 2011-2013 Mathieu Desnoyers */ #include @@ -2067,6 +2056,7 @@ int get_cred(int sock, } #elif defined(__FreeBSD__) #include +#include /* * Override application uid/gid with unix socket credentials. Use the @@ -2094,11 +2084,11 @@ int get_cred(int sock, } DBG("Unix socket peercred [ uid: %u, gid: %u ], " "application registered claiming [ pid: %d, ppid: %d, uid: %u, gid: %u ]", - xucred.uid, xucred.cr_groups[0], + xucred.cr_uid, xucred.cr_groups[0], reg_msg->pid, reg_msg->ppid, reg_msg->uid, reg_msg->gid); *pid = reg_msg->pid; *ppid = reg_msg->ppid; - *uid = xucred.uid; + *uid = xucred.cr_uid; *gid = xucred.cr_groups[0]; return 0; }