diff --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/Makefile policycoreutils-2.0.57/Makefile --- nsapolicycoreutils/Makefile 2008-08-28 09:34:24.000000000 -0400 +++ policycoreutils-2.0.57/Makefile 2008-10-10 16:04:46.000000000 -0400 @@ -1,4 +1,4 @@ -SUBDIRS = setfiles semanage load_policy newrole run_init secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps setsebool po +SUBDIRS = setfiles semanage load_policy newrole run_init secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps setsebool po gui INOTIFYH = $(shell ls /usr/include/sys/inotify.h 2>/dev/null) diff --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/newrole/newrole.c policycoreutils-2.0.57/newrole/newrole.c --- nsapolicycoreutils/newrole/newrole.c 2008-08-28 09:34:24.000000000 -0400 +++ policycoreutils-2.0.57/newrole/newrole.c 2008-10-17 16:43:52.000000000 -0400 @@ -553,7 +553,7 @@ new_caps = cap_init(); tmp_caps = cap_init(); if (!new_caps || !tmp_caps) { - fprintf(stderr, _("Error initing capabilities, aborting.\n")); + fprintf(stderr, _("Error initializing capabilities, aborting.\n")); return -1; } rc |= cap_set_flag(new_caps, CAP_PERMITTED, 1, cap_list, CAP_SET); @@ -631,7 +631,7 @@ /* Non-root caller, suid root path */ new_caps = cap_init(); if (!new_caps) { - fprintf(stderr, _("Error initing capabilities, aborting.\n")); + fprintf(stderr, _("Error initializing capabilities, aborting.\n")); return -1; } rc |= cap_set_flag(new_caps, CAP_PERMITTED, 6, cap_list, CAP_SET); Binary files nsapolicycoreutils/semodule/semodule and policycoreutils-2.0.57/semodule/semodule differ diff --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semodule/semodule.c policycoreutils-2.0.57/semodule/semodule.c --- nsapolicycoreutils/semodule/semodule.c 2008-08-28 09:34:24.000000000 -0400 +++ policycoreutils-2.0.57/semodule/semodule.c 2008-10-10 16:04:46.000000000 -0400 @@ -60,24 +60,6 @@ free(commands); } -/* mmap() a file to '*data', returning the total number of bytes in - * the file. Returns 0 if file could not be opened or mapped. */ -static size_t map_file(char *filename, char **data) -{ - int fd; - struct stat sb; - if ((fd = open(filename, O_RDONLY)) == -1) { - return 0; - } - if (fstat(fd, &sb) == -1 || - (*data = mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0)) == - MAP_FAILED) { - sb.st_size = 0; - } - close(fd); - return sb.st_size; -} - /* Signal handlers. */ static void handle_signal(int sig_num) { @@ -339,16 +321,6 @@ for (i = 0; i < num_commands; i++) { enum client_modes mode = commands[i].mode; char *mode_arg = commands[i].arg; - char *data = NULL; - size_t data_len = 0; - if (mode == INSTALL_M || mode == UPGRADE_M || mode == BASE_M) { - if ((data_len = map_file(mode_arg, &data)) == 0) { - fprintf(stderr, - "%s: Could not read file '%s': %s\n", - argv[0], mode_arg, errno ? strerror(errno) : ""); - goto cleanup; - } - } switch (mode) { case INSTALL_M:{ if (verbose) { @@ -357,7 +329,7 @@ mode_arg); } result = - semanage_module_install(sh, data, data_len); + semanage_module_install_file(sh, mode_arg); break; } case UPGRADE_M:{ @@ -367,7 +339,7 @@ mode_arg); } result = - semanage_module_upgrade(sh, data, data_len); + semanage_module_upgrade_file(sh, mode_arg); break; } case BASE_M:{ @@ -377,8 +349,7 @@ mode_arg); } result = - semanage_module_install_base(sh, data, - data_len); + semanage_module_install_base_file(sh, mode_arg); break; } case REMOVE_M:{ @@ -429,9 +400,6 @@ } } commit += do_commit[mode]; - if (mode == INSTALL_M || mode == UPGRADE_M || mode == BASE_M) { - munmap(data, data_len); - } if (result < 0) { fprintf(stderr, "%s: Failed on %s!\n", argv[0], mode_arg ? : "list"); Binary files nsapolicycoreutils/semodule/semodule.o and policycoreutils-2.0.57/semodule/semodule.o differ