Index: mac_partition.c =================================================================== RCS file: /home/ncvs/src/sys/security/mac_partition/mac_partition.c,v retrieving revision 1.7 diff -u -r1.7 mac_partition.c --- mac_partition.c 23 Jun 2003 01:26:34 -0000 1.7 +++ mac_partition.c 25 Sep 2003 16:26:14 -0000 @@ -1,6 +1,6 @@ /*- * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson - * Copyright (c) 2001, 2002 Networks Associates Technology, Inc. + * Copyright (c) 2001, 2002, 2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed by Robert Watson for the TrustedBSD Project. @@ -111,10 +111,15 @@ (*claimed)++; - if (sbuf_printf(sb, "%ld", SLOT(label)) == -1) - return (EINVAL); - else - return (0); + if (SLOT(label) == 0) { + if (sbuf_printf(sb, "none") == -1) + return (EINVAL); + } else { + if (sbuf_printf(sb, "%ld", SLOT(label)) == -1) + return (EINVAL); + } + + return (0); } static int @@ -126,7 +131,12 @@ return (0); (*claimed)++; - SLOT(label) = strtol(element_data, NULL, 10); + + if (strcmp(element_data, "none") == 0) + SLOT(label) = 0; + else + SLOT(label) = strtol(element_data, NULL, 10); + return (0); }