X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fcompat%2Fsocket.h;h=a510473c35fbdeb4e78e245b35732c7f52e1dca9;hb=40fd2ccf9faa3e8b6d67d40c8ee52a2b3d1f07bd;hp=8a1cef157bb35d72c227e59a2e535addf5843486;hpb=d05d6fe165c27f077445d1c213becd077173adab;p=lttng-tools.git diff --git a/src/common/compat/socket.h b/src/common/compat/socket.h index 8a1cef157..a510473c3 100644 --- a/src/common/compat/socket.h +++ b/src/common/compat/socket.h @@ -1,18 +1,8 @@ /* - * Copyright (C) 2011 - David Goulet + * Copyright (C) 2011 David Goulet * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: GPL-2.0-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. */ #ifndef _COMPAT_SOCKET_H @@ -38,7 +28,7 @@ ssize_t lttng_recvmsg_nosigpipe(int sockfd, struct msghdr *msg) #else #include -#include +#include static inline ssize_t lttng_recvmsg_nosigpipe(int sockfd, struct msghdr *msg) @@ -131,6 +121,10 @@ struct lttng_sock_cred { typedef struct lttng_sock_cred lttng_sock_cred; +#define LTTNG_SOCK_SET_UID_CRED(c, u) LTTNG_REF(c)->uid = u +#define LTTNG_SOCK_SET_GID_CRED(c, g) LTTNG_REF(c)->gid = g +#define LTTNG_SOCK_SET_PID_CRED(c, p) + #define LTTNG_SOCK_GET_UID_CRED(c) LTTNG_REF(c)->uid #define LTTNG_SOCK_GET_GID_CRED(c) LTTNG_REF(c)->gid #define LTTNG_SOCK_GET_PID_CRED(c) -1