SoW-2019-0002: Dynamic Snapshot
[lttng-tools.git] / src / common / credentials.c
diff --git a/src/common/credentials.c b/src/common/credentials.c
new file mode 100644 (file)
index 0000000..c7d621f
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2020 - Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+#include <assert.h>
+#include <stdbool.h>
+#include "credentials.h"
+
+bool lttng_credentials_is_equal(const struct lttng_credentials *a,
+               const struct lttng_credentials *b)
+{
+       assert(a);
+       assert(b);
+       if ((a->uid != b->uid) || (a->gid != b->gid)) {
+               return false;
+       }
+       return true;
+};
This page took 0.024004 seconds and 5 git commands to generate.