Commit 39a6bd33 authored by topjohnwu's avatar topjohnwu

Fix critical bug

parent 4672a5fa
...@@ -80,7 +80,7 @@ int cpio_commands(const char *command, int argc, char *argv[]) { ...@@ -80,7 +80,7 @@ int cpio_commands(const char *command, int argc, char *argv[]) {
parse_cpio(&v, incpio); parse_cpio(&v, incpio);
if (strcmp(command, "test") == 0) { if (strcmp(command, "test") == 0) {
return cpio_test(&v); exit(cpio_test(&v));
} else if (strcmp(command, "restore") == 0) { } else if (strcmp(command, "restore") == 0) {
ret = cpio_restore(&v); ret = cpio_restore(&v);
} else if (strcmp(command, "stocksha1") == 0) { } else if (strcmp(command, "stocksha1") == 0) {
......
...@@ -260,7 +260,7 @@ int getattrat(int dirfd, const char *pathname, struct file_attr *a) { ...@@ -260,7 +260,7 @@ int getattrat(int dirfd, const char *pathname, struct file_attr *a) {
} }
int fgetattr(int fd, struct file_attr *a) { int fgetattr(int fd, struct file_attr *a) {
#ifndef NO_SELINUX #ifdef SELINUX
char path[PATH_MAX]; char path[PATH_MAX];
fd_getpath(fd, path, sizeof(path)); fd_getpath(fd, path, sizeof(path));
return getattr(path, a); return getattr(path, a);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment