X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fcredentials.c;fp=src%2Fcommon%2Fcredentials.c;h=c7d621fbcef8c3e84bd61af2627043166d84d0a0;hp=0000000000000000000000000000000000000000;hb=1831ae68b70dece8e9b847081526495adbbf05e5;hpb=25357057de5ae4dd2a572e8f9b893c1b90cbd60a diff --git a/src/common/credentials.c b/src/common/credentials.c new file mode 100644 index 000000000..c7d621fbc --- /dev/null +++ b/src/common/credentials.c @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2020 - Jonathan Rajotte-Julien + * + * 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 +#include +#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; +};