Mercurial > illumos > illumos-gate
comparison usr/src/uts/common/fs/zfs/zfs_vfsops.c @ 14046:6a5a2f4a47db
3742 zfs comments need cleaner, more consistent style
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Eric Schrock <eric.schrock@delphix.com>
Approved by: Christopher Siden <christopher.siden@delphix.com>
author | Will Andrews <will@firepipe.net> |
---|---|
date | Tue, 11 Jun 2013 09:13:33 -0800 |
parents | d7059eb1884c |
children | 3ca4e9e72fe7 |
comparison
equal
deleted
inserted
replaced
14045:9475b3fef59d | 14046:6a5a2f4a47db |
---|---|
1346 | 1346 |
1347 return (error); | 1347 return (error); |
1348 } | 1348 } |
1349 | 1349 |
1350 /* | 1350 /* |
1351 * zfs_check_global_label: | 1351 * Check that the hex label string is appropriate for the dataset being |
1352 * Check that the hex label string is appropriate for the dataset | 1352 * mounted into the global_zone proper. |
1353 * being mounted into the global_zone proper. | |
1354 * | 1353 * |
1355 * Return an error if the hex label string is not default or | 1354 * Return an error if the hex label string is not default or |
1356 * admin_low/admin_high. For admin_low labels, the corresponding | 1355 * admin_low/admin_high. For admin_low labels, the corresponding |
1357 * dataset must be readonly. | 1356 * dataset must be readonly. |
1358 */ | 1357 */ |
1359 int | 1358 int |
1360 zfs_check_global_label(const char *dsname, const char *hexsl) | 1359 zfs_check_global_label(const char *dsname, const char *hexsl) |
1361 { | 1360 { |
1362 if (strcasecmp(hexsl, ZFS_MLSLABEL_DEFAULT) == 0) | 1361 if (strcasecmp(hexsl, ZFS_MLSLABEL_DEFAULT) == 0) |
1374 } | 1373 } |
1375 return (SET_ERROR(EACCES)); | 1374 return (SET_ERROR(EACCES)); |
1376 } | 1375 } |
1377 | 1376 |
1378 /* | 1377 /* |
1379 * zfs_mount_label_policy: | 1378 * Determine whether the mount is allowed according to MAC check. |
1380 * Determine whether the mount is allowed according to MAC check. | 1379 * by comparing (where appropriate) label of the dataset against |
1381 * by comparing (where appropriate) label of the dataset against | 1380 * the label of the zone being mounted into. If the dataset has |
1382 * the label of the zone being mounted into. If the dataset has | 1381 * no label, create one. |
1383 * no label, create one. | |
1384 * | 1382 * |
1385 * Returns: | 1383 * Returns 0 if access allowed, error otherwise (e.g. EACCES) |
1386 * 0 : access allowed | |
1387 * >0 : error code, such as EACCES | |
1388 */ | 1384 */ |
1389 static int | 1385 static int |
1390 zfs_mount_label_policy(vfs_t *vfsp, char *osname) | 1386 zfs_mount_label_policy(vfs_t *vfsp, char *osname) |
1391 { | 1387 { |
1392 int error, retv; | 1388 int error, retv; |