From: Michael Jeanson Date: Tue, 6 Apr 2021 23:17:41 +0000 (-0400) Subject: Move creds.h to 'src/common/' X-Git-Tag: v2.13.0-rc1~118 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6abdf6dc5a8a53ed53398c81d68a9f4be9036f1c;p=lttng-ust.git Move creds.h to 'src/common/' Change-Id: Ifbb7f9a1af76f1f2ae2bcaa9d7d625ffc2299bfa Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/src/common/Makefile.am b/src/common/Makefile.am index b847001e..d80172dd 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -11,6 +11,7 @@ noinst_HEADERS = \ bitfield.h \ bitmap.h \ clock.h \ + creds.h \ dynamic-type.h \ elf.h \ events.h \ diff --git a/src/common/creds.h b/src/common/creds.h new file mode 100644 index 00000000..758e1b40 --- /dev/null +++ b/src/common/creds.h @@ -0,0 +1,17 @@ +/* + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (C) 2019 Michael Jeanson + */ + +#ifndef _UST_COMMON_CREDS_H +#define _UST_COMMON_CREDS_H + +/* + * This is used in the kernel as an invalid value. + */ + +#define INVALID_UID (uid_t) -1 +#define INVALID_GID (gid_t) -1 + +#endif /* _UST_COMMON_CREDS_H */ diff --git a/src/lib/lttng-ust/Makefile.am b/src/lib/lttng-ust/Makefile.am index 5612cb64..ef035a18 100644 --- a/src/lib/lttng-ust/Makefile.am +++ b/src/lib/lttng-ust/Makefile.am @@ -91,7 +91,6 @@ liblttng_ust_runtime_la_SOURCES = \ string-utils.h \ event-notifier-notification.c \ ns.h \ - creds.h \ rculfhash.c \ rculfhash.h \ rculfhash-internal.h \ diff --git a/src/lib/lttng-ust/creds.h b/src/lib/lttng-ust/creds.h deleted file mode 100644 index f82b9b8a..00000000 --- a/src/lib/lttng-ust/creds.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-only - * - * Copyright (C) 2019 Michael Jeanson - */ - -#ifndef _LTTNG_CREDS_H -#define _LTTNG_CREDS_H - -/* - * This is used in the kernel as an invalid value. - */ - -#define INVALID_UID (uid_t) -1 -#define INVALID_GID (gid_t) -1 - -#endif /* _LTTNG_CREDS_H */ diff --git a/src/lib/lttng-ust/lttng-context-vegid.c b/src/lib/lttng-ust/lttng-context-vegid.c index 97618ce0..0f481783 100644 --- a/src/lib/lttng-ust/lttng-context-vegid.c +++ b/src/lib/lttng-ust/lttng-context-vegid.c @@ -18,7 +18,7 @@ #include #include "context-internal.h" -#include "creds.h" +#include "common/creds.h" /* diff --git a/src/lib/lttng-ust/lttng-context-veuid.c b/src/lib/lttng-ust/lttng-context-veuid.c index 5c2a1d83..cb532be1 100644 --- a/src/lib/lttng-ust/lttng-context-veuid.c +++ b/src/lib/lttng-ust/lttng-context-veuid.c @@ -18,7 +18,7 @@ #include #include "context-internal.h" -#include "creds.h" +#include "common/creds.h" /* diff --git a/src/lib/lttng-ust/lttng-context-vgid.c b/src/lib/lttng-ust/lttng-context-vgid.c index e43d5bc2..9bf02abe 100644 --- a/src/lib/lttng-ust/lttng-context-vgid.c +++ b/src/lib/lttng-ust/lttng-context-vgid.c @@ -18,7 +18,7 @@ #include #include "context-internal.h" -#include "creds.h" +#include "common/creds.h" /* diff --git a/src/lib/lttng-ust/lttng-context-vsgid.c b/src/lib/lttng-ust/lttng-context-vsgid.c index 92785420..8034a024 100644 --- a/src/lib/lttng-ust/lttng-context-vsgid.c +++ b/src/lib/lttng-ust/lttng-context-vsgid.c @@ -18,7 +18,7 @@ #include #include "context-internal.h" -#include "creds.h" +#include "common/creds.h" /* diff --git a/src/lib/lttng-ust/lttng-context-vsuid.c b/src/lib/lttng-ust/lttng-context-vsuid.c index fa7f3a10..7d400969 100644 --- a/src/lib/lttng-ust/lttng-context-vsuid.c +++ b/src/lib/lttng-ust/lttng-context-vsuid.c @@ -18,7 +18,7 @@ #include #include "context-internal.h" -#include "creds.h" +#include "common/creds.h" /* diff --git a/src/lib/lttng-ust/lttng-context-vuid.c b/src/lib/lttng-ust/lttng-context-vuid.c index 775f2cbf..7153c130 100644 --- a/src/lib/lttng-ust/lttng-context-vuid.c +++ b/src/lib/lttng-ust/lttng-context-vuid.c @@ -18,7 +18,7 @@ #include #include "context-internal.h" -#include "creds.h" +#include "common/creds.h" /*