Loading server_side/c/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ SET(CPACK_RPM_PACKAGE_MAINTAINER "ORNL") set(CPACK_PACKAGE_VERSION_MAJOR "0") set(CPACK_PACKAGE_VERSION_MINOR "2") set(CPACK_PACKAGE_VERSION_PATCH "0") set(CPACK_PACKAGE_VERSION_PATCH "1") set(CPACK_DEBIAN_PACKAGE_DEPENDS "curl") set(CPACK_RPM_PACKAGE_DEPENDS "curl") Loading server_side/c/run_as_user.c +6 −6 Original line number Diff line number Diff line Loading @@ -44,7 +44,8 @@ int main(int argc, char *argv[]) { exit(1); } if (strcmp(argv[3], "-c") == 0) { return system(argv[4]); int res = system(argv[4]); exit(res == 0 ? 0 : 1); } else if (strcmp(argv[3], "-f") == 0) { int fd = open(argv[4], O_RDONLY); if (fd == -1) { Loading @@ -54,8 +55,7 @@ int main(int argc, char *argv[]) { char buf[1024]; int buflen; while((buflen = read(fd, buf, 1024)) > 0) { while ((buflen = read(fd, buf, 1024)) > 0) { write(1, buf, buflen); } close(fd); Loading Loading
server_side/c/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ SET(CPACK_RPM_PACKAGE_MAINTAINER "ORNL") set(CPACK_PACKAGE_VERSION_MAJOR "0") set(CPACK_PACKAGE_VERSION_MINOR "2") set(CPACK_PACKAGE_VERSION_PATCH "0") set(CPACK_PACKAGE_VERSION_PATCH "1") set(CPACK_DEBIAN_PACKAGE_DEPENDS "curl") set(CPACK_RPM_PACKAGE_DEPENDS "curl") Loading
server_side/c/run_as_user.c +6 −6 Original line number Diff line number Diff line Loading @@ -44,7 +44,8 @@ int main(int argc, char *argv[]) { exit(1); } if (strcmp(argv[3], "-c") == 0) { return system(argv[4]); int res = system(argv[4]); exit(res == 0 ? 0 : 1); } else if (strcmp(argv[3], "-f") == 0) { int fd = open(argv[4], O_RDONLY); if (fd == -1) { Loading @@ -54,8 +55,7 @@ int main(int argc, char *argv[]) { char buf[1024]; int buflen; while((buflen = read(fd, buf, 1024)) > 0) { while ((buflen = read(fd, buf, 1024)) > 0) { write(1, buf, buflen); } close(fd); Loading