Ignore:
Timestamp:
Feb 25, 2011, 9:26:54 PM (13 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi-busybox/selinux/load_policy.c

    r1765 r2725  
    11/*
    22 * load_policy
    3  * This implementation is based on old load_policy to be small.
    43 * Author: Yuichi Nakamura <ynakam@hitachisoft.jp>
     4 *
     5 * Licensed under GPLv2, see file LICENSE in this source tree.
    56 */
    67#include "libbb.h"
    78
    8 int load_policy_main(int argc, char **argv);
    9 int load_policy_main(int argc, char **argv)
     9int load_policy_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
     10int load_policy_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
    1011{
    11     int fd;
    12     struct stat st;
    13     void *data;
    14     if (argc != 2) {
     12    int rc;
     13
     14    if (argv[1]) {
    1515        bb_show_usage();
    1616    }
    1717
    18     fd = xopen(argv[1], O_RDONLY);
    19     if (fstat(fd, &st) < 0) {
    20         bb_perror_msg_and_die("can't fstat");
    21     }
    22     data = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
    23     if (data == MAP_FAILED) {
    24         bb_perror_msg_and_die("can't mmap");
    25     }
    26     if (security_load_policy(data, st.st_size) < 0) {
     18    rc = selinux_mkload_policy(1);
     19    if (rc < 0) {
    2720        bb_perror_msg_and_die("can't load policy");
    2821    }
Note: See TracChangeset for help on using the changeset viewer.