diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2003-06-23 01:26:34 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2003-06-23 01:26:34 +0000 |
| commit | f51e58036ebe3a3e75527325e659d7ba02b129ed (patch) | |
| tree | 92d01b6fe3965640d61d19263fdb1f40b50d0183 /sys/security/mac_partition/mac_partition.c | |
| parent | 156bc71b92b60cb5ed4fa9de0f2e7dd552b0fa10 (diff) | |
Notes
Diffstat (limited to 'sys/security/mac_partition/mac_partition.c')
| -rw-r--r-- | sys/security/mac_partition/mac_partition.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/security/mac_partition/mac_partition.c b/sys/security/mac_partition/mac_partition.c index 5c68399a2837..ed5bc2eca710 100644 --- a/sys/security/mac_partition/mac_partition.c +++ b/sys/security/mac_partition/mac_partition.c @@ -46,6 +46,7 @@ #include <sys/mac.h> #include <sys/mount.h> #include <sys/proc.h> +#include <sys/sbuf.h> #include <sys/systm.h> #include <sys/sysproto.h> #include <sys/sysent.h> @@ -102,15 +103,18 @@ mac_partition_destroy_label(struct label *label) static int mac_partition_externalize_label(struct label *label, char *element_name, - char *element_data, size_t size, size_t *len, int *claimed) + struct sbuf *sb, int *claimed) { if (strcmp(MAC_PARTITION_LABEL_NAME, element_name) != 0) return (0); (*claimed)++; - *len = snprintf(element_data, size, "%ld", SLOT(label)); - return (0); + + if (sbuf_printf(sb, "%ld", SLOT(label)) == -1) + return (EINVAL); + else + return (0); } static int |
