[Zrouter-src-freebsd] ZRouter.org: push to FreeBSD HEAD tree
zrouter-src-freebsd at zrouter.org
zrouter-src-freebsd at zrouter.org
Fri Mar 2 15:39:43 UTC 2012
details: http://zrouter.org/hg/FreeBSD/head//rev/3f34817ccfe8
changeset: 394:3f34817ccfe8
user: ray at terran.dlink.ua
date: Fri Mar 02 17:15:20 2012 +0200
description:
Update to FreeBSD-HEAD @232391
diffstat:
head/sys/security/mac_biba/mac_biba.c | 18 ++++++++++--------
head/sys/security/mac_lomac/mac_lomac.c | 20 +++++++++++---------
head/sys/security/mac_mls/mac_mls.c | 22 ++++++++++++----------
3 files changed, 33 insertions(+), 27 deletions(-)
diffs (127 lines):
diff -r 002c51375413 -r 3f34817ccfe8 head/sys/security/mac_biba/mac_biba.c
--- a/head/sys/security/mac_biba/mac_biba.c Fri Mar 02 17:15:10 2012 +0200
+++ b/head/sys/security/mac_biba/mac_biba.c Fri Mar 02 17:15:20 2012 +0200
@@ -38,7 +38,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: head/sys/security/mac_biba/mac_biba.c 227309 2011-11-07 15:43:11Z ed $
+ * $FreeBSD: head/sys/security/mac_biba/mac_biba.c 231378 2012-02-10 12:35:57Z ed $
*/
/*
@@ -948,18 +948,20 @@
struct cdev *dev, struct devfs_dirent *de, struct label *delabel)
{
struct mac_biba *mb;
+ const char *dn;
int biba_type;
mb = SLOT(delabel);
- if (strcmp(dev->si_name, "null") == 0 ||
- strcmp(dev->si_name, "zero") == 0 ||
- strcmp(dev->si_name, "random") == 0 ||
- strncmp(dev->si_name, "fd/", strlen("fd/")) == 0)
+ dn = devtoname(dev);
+ if (strcmp(dn, "null") == 0 ||
+ strcmp(dn, "zero") == 0 ||
+ strcmp(dn, "random") == 0 ||
+ strncmp(dn, "fd/", strlen("fd/")) == 0)
biba_type = MAC_BIBA_TYPE_EQUAL;
else if (ptys_equal &&
- (strncmp(dev->si_name, "ttyp", strlen("ttyp")) == 0 ||
- strncmp(dev->si_name, "pts/", strlen("pts/")) == 0 ||
- strncmp(dev->si_name, "ptyp", strlen("ptyp")) == 0))
+ (strncmp(dn, "ttyp", strlen("ttyp")) == 0 ||
+ strncmp(dn, "pts/", strlen("pts/")) == 0 ||
+ strncmp(dn, "ptyp", strlen("ptyp")) == 0))
biba_type = MAC_BIBA_TYPE_EQUAL;
else
biba_type = MAC_BIBA_TYPE_HIGH;
diff -r 002c51375413 -r 3f34817ccfe8 head/sys/security/mac_lomac/mac_lomac.c
--- a/head/sys/security/mac_lomac/mac_lomac.c Fri Mar 02 17:15:10 2012 +0200
+++ b/head/sys/security/mac_lomac/mac_lomac.c Fri Mar 02 17:15:20 2012 +0200
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: head/sys/security/mac_lomac/mac_lomac.c 229272 2012-01-02 12:12:10Z ed $
+ * $FreeBSD: head/sys/security/mac_lomac/mac_lomac.c 231378 2012-02-10 12:35:57Z ed $
*/
/*
@@ -1032,19 +1032,21 @@
struct cdev *dev, struct devfs_dirent *de, struct label *delabel)
{
struct mac_lomac *ml;
+ const char *dn;
int lomac_type;
ml = SLOT(delabel);
- if (strcmp(dev->si_name, "null") == 0 ||
- strcmp(dev->si_name, "zero") == 0 ||
- strcmp(dev->si_name, "random") == 0 ||
- strncmp(dev->si_name, "fd/", strlen("fd/")) == 0 ||
- strncmp(dev->si_name, "ttyv", strlen("ttyv")) == 0)
+ dn = devtoname(dev);
+ if (strcmp(dn, "null") == 0 ||
+ strcmp(dn, "zero") == 0 ||
+ strcmp(dn, "random") == 0 ||
+ strncmp(dn, "fd/", strlen("fd/")) == 0 ||
+ strncmp(dn, "ttyv", strlen("ttyv")) == 0)
lomac_type = MAC_LOMAC_TYPE_EQUAL;
else if (ptys_equal &&
- (strncmp(dev->si_name, "ttyp", strlen("ttyp")) == 0 ||
- strncmp(dev->si_name, "pts/", strlen("pts/")) == 0 ||
- strncmp(dev->si_name, "ptyp", strlen("ptyp")) == 0))
+ (strncmp(dn, "ttyp", strlen("ttyp")) == 0 ||
+ strncmp(dn, "pts/", strlen("pts/")) == 0 ||
+ strncmp(dn, "ptyp", strlen("ptyp")) == 0))
lomac_type = MAC_LOMAC_TYPE_EQUAL;
else
lomac_type = MAC_LOMAC_TYPE_HIGH;
diff -r 002c51375413 -r 3f34817ccfe8 head/sys/security/mac_mls/mac_mls.c
--- a/head/sys/security/mac_mls/mac_mls.c Fri Mar 02 17:15:10 2012 +0200
+++ b/head/sys/security/mac_mls/mac_mls.c Fri Mar 02 17:15:20 2012 +0200
@@ -38,7 +38,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: head/sys/security/mac_mls/mac_mls.c 227309 2011-11-07 15:43:11Z ed $
+ * $FreeBSD: head/sys/security/mac_mls/mac_mls.c 231378 2012-02-10 12:35:57Z ed $
*/
/*
@@ -908,21 +908,23 @@
struct cdev *dev, struct devfs_dirent *de, struct label *delabel)
{
struct mac_mls *mm;
+ const char *dn;
int mls_type;
mm = SLOT(delabel);
- if (strcmp(dev->si_name, "null") == 0 ||
- strcmp(dev->si_name, "zero") == 0 ||
- strcmp(dev->si_name, "random") == 0 ||
- strncmp(dev->si_name, "fd/", strlen("fd/")) == 0)
+ dn = devtoname(dev);
+ if (strcmp(dn, "null") == 0 ||
+ strcmp(dn, "zero") == 0 ||
+ strcmp(dn, "random") == 0 ||
+ strncmp(dn, "fd/", strlen("fd/")) == 0)
mls_type = MAC_MLS_TYPE_EQUAL;
- else if (strcmp(dev->si_name, "kmem") == 0 ||
- strcmp(dev->si_name, "mem") == 0)
+ else if (strcmp(dn, "kmem") == 0 ||
+ strcmp(dn, "mem") == 0)
mls_type = MAC_MLS_TYPE_HIGH;
else if (ptys_equal &&
- (strncmp(dev->si_name, "ttyp", strlen("ttyp")) == 0 ||
- strncmp(dev->si_name, "pts/", strlen("pts/")) == 0 ||
- strncmp(dev->si_name, "ptyp", strlen("ptyp")) == 0))
+ (strncmp(dn, "ttyp", strlen("ttyp")) == 0 ||
+ strncmp(dn, "pts/", strlen("pts/")) == 0 ||
+ strncmp(dn, "ptyp", strlen("ptyp")) == 0))
mls_type = MAC_MLS_TYPE_EQUAL;
else
mls_type = MAC_MLS_TYPE_LOW;
More information about the Zrouter-src-freebsd
mailing list