diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2003-11-15 03:34:58 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2003-11-15 03:34:58 +0000 |
| commit | 6e07ce26f9f26e41adc5e8ad4570d3e109894b08 (patch) | |
| tree | b934fb881281e4f08365f1f7472375631174c86e | |
| parent | 3bfa61d2211399850f899a4fbb7894c2e6526fc8 (diff) | |
Notes
| -rw-r--r-- | lib/libc/posix1e/mac.c | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/lib/libc/posix1e/mac.c b/lib/libc/posix1e/mac.c index d8a1b2ddc814..07755e683338 100644 --- a/lib/libc/posix1e/mac.c +++ b/lib/libc/posix1e/mac.c @@ -358,9 +358,15 @@ int mac_prepare_type(struct mac **mac, const char *name) { struct label_default *ld; + int error; + + error = mac_maybe_init_internal(); + if (error != 0) + return (error); for (ld = LIST_FIRST(&label_default_head); ld != NULL; ld = LIST_NEXT(ld, ld_entries)) { + printf("%s\n", ld->ld_name); if (strcmp(name, ld->ld_name) == 0) return (mac_prepare(mac, ld->ld_labels)); } @@ -372,11 +378,6 @@ mac_prepare_type(struct mac **mac, const char *name) int mac_prepare_ifnet_label(struct mac **mac) { - int error; - - error = mac_maybe_init_internal(); - if (error != 0) - return (error); return (mac_prepare_type(mac, "ifnet")); } @@ -384,11 +385,6 @@ mac_prepare_ifnet_label(struct mac **mac) int mac_prepare_file_label(struct mac **mac) { - int error; - - error = mac_maybe_init_internal(); - if (error != 0) - return (error); return (mac_prepare_type(mac, "file")); } @@ -396,11 +392,6 @@ mac_prepare_file_label(struct mac **mac) int mac_prepare_packet_label(struct mac **mac) { - int error; - - error = mac_maybe_init_internal(); - if (error != 0) - return (error); return (mac_prepare_type(mac, "packet")); } @@ -408,11 +399,6 @@ mac_prepare_packet_label(struct mac **mac) int mac_prepare_process_label(struct mac **mac) { - int error; - - error = mac_maybe_init_internal(); - if (error != 0) - return (error); return (mac_prepare_type(mac, "process")); } |
