X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fcommon%2Fcredentials.c;fp=src%2Fcommon%2Fcredentials.c;h=77447ca31a10a656e21742beb6c036eabbde83dd;hb=5024c2ac433f5c5feec034cb7d8d485d25cf14e7;hp=0000000000000000000000000000000000000000;hpb=e2d1190b9ea09c54e5d7373643d62e2034bc1531;p=deliverable%2Flttng-tools.git diff --git a/src/common/credentials.c b/src/common/credentials.c new file mode 100644 index 000000000..77447ca31 --- /dev/null +++ b/src/common/credentials.c @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2020 Jonathan Rajotte + * + * 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; +};