blob: e0f2a5dfc89a06b2a289fa729c86a3b8e365f9b7 [file] [log] [blame]
// Copyright 2023 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
// File opener utility to assist in Landlock tests.
int main(int argc, char *argv[]) {
if (argc != 3) {
fprintf(stderr, "Usage: %s <filename> <mode>\n", argv[0] );
return 1;
}
FILE *file = fopen(argv[1], argv[2]);
if (file == 0) {
return errno;
}
return 0;
}