The ZFS update to onnv_141 brought with it support for a
security label attribute called mlslabel. This feature
depends on zones to work correctly and thus I am disabling
it under Linux. Equivilant functionality could be added
at some point in the future.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
case ZFS_PROP_MLSLABEL:
{
case ZFS_PROP_MLSLABEL:
{
/*
* Verify the mlslabel string and convert to
* internal hex label string.
/*
* Verify the mlslabel string and convert to
* internal hex label string.
(void) zfs_error(hdl, EZFS_BADPROP, errbuf);
m_label_free(new_sl); /* OK if null */
goto error;
(void) zfs_error(hdl, EZFS_BADPROP, errbuf);
m_label_free(new_sl); /* OK if null */
goto error;
+#else
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "mlslabels are unsupported"));
+ (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
+ goto error;
+#endif /* HAVE_MLSLABEL */
}
case ZFS_PROP_MOUNTPOINT:
}
case ZFS_PROP_MOUNTPOINT:
case ZFS_PROP_MLSLABEL:
{
case ZFS_PROP_MLSLABEL:
{
m_label_t *new_sl = NULL;
char *ascii = NULL; /* human readable label */
m_label_t *new_sl = NULL;
char *ascii = NULL; /* human readable label */
(void) strlcpy(propbuf, ascii, proplen);
free(ascii);
(void) strlcpy(propbuf, ascii, proplen);
free(ascii);
+#else
+ (void) strlcpy(propbuf,
+ getprop_string(zhp, prop, &source), proplen);
+#endif /* HAVE_MLSLABEL */
static int
zfs_set_slabel_policy(const char *name, char *strval, cred_t *cr)
{
static int
zfs_set_slabel_policy(const char *name, char *strval, cred_t *cr)
{
char ds_hexsl[MAXNAMELEN];
bslabel_t ds_sl, new_sl;
boolean_t new_default = FALSE;
char ds_hexsl[MAXNAMELEN];
bslabel_t ds_sl, new_sl;
boolean_t new_default = FALSE;
if (needed_priv != -1)
return (PRIV_POLICY(cr, needed_priv, B_FALSE, EPERM, NULL));
return (0);
if (needed_priv != -1)
return (PRIV_POLICY(cr, needed_priv, B_FALSE, EPERM, NULL));
return (0);
+#else
+ return ENOTSUP;
+#endif /* HAVE_MLSLABEL */