test-acl-util.c revision 5bb5b236fe8c663b7d4db5ccaf3e3e7942bf6abd
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright 2015 Zbigniew Jędrzejewski-Szmek
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#include "acl-util.h"
#include "fd-util.h"
#include "fileio.h"
#include "string-util.h"
#include "user-util.h"
static void test_add_acls_for_user(void) {
char fn[] = "/tmp/test-empty.XXXXXX";
char *cmd;
int r;
/* Use the mode that user journal files use */
if (getuid() == 0) {
const char *nobody = "nobody";
if (r < 0)
uid = 0;
} else
assert_se(r >= 0);
/* set the acls again */
assert_se(r >= 0);
}
}