#
PKG_MAJOR=2
PKG_MINOR=6
-PKG_REVISION=2
+PKG_REVISION=3
PKG_BUILD=0
#
-# Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
+# Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of version 2 of the GNU General Public License as
LSRCFILES = changelog control copyright rules
DEV_DOC_DIR = $(PKG_DOC_DIR)/../xfslibs-dev
-BOOT_DOC_DIR = $(PKG_DOC_DIR)/../xfsprogs-bf
-BOOT_MAN_DIR = $(PKG_MAN_DIR)/man8
-BOOT_MKFS_BIN = $(TOPDIR)/mkfs/mkfs.xfs-xfsprogs-bf
-BOOT_MKFS_MAN = $(TOPDIR)/man/man8/mkfs.xfs.8
+BOOT_MKFS_BIN = $(TOPDIR)/mkfs/mkfs.xfs-xfsprogs-udeb
default:
$(INSTALL) -m 644 changelog $(DEV_DOC_DIR)/changelog.Debian
endif
-install-boot: default
+install-d-i: default
ifeq ($(PKG_DISTRIBUTION), debian)
- $(INSTALL) -m 755 -d $(PKG_DOC_DIR)
$(INSTALL) -m 755 -d $(PKG_SBIN_DIR)
- $(INSTALL) -m 755 -d $(BOOT_DOC_DIR)
- $(INSTALL) -m 755 -d $(BOOT_MAN_DIR)
- $(INSTALL) -m 644 copyright $(BOOT_DOC_DIR)
- $(INSTALL) -m 644 changelog $(BOOT_DOC_DIR)/changelog.Debian
$(INSTALL) -m 755 $(BOOT_MKFS_BIN) $(PKG_SBIN_DIR)/mkfs.xfs
- $(INSTALL) -m 644 $(BOOT_MKFS_MAN) $(BOOT_MAN_DIR)/mkfs.xfs.8
endif
-xfsprogs (2.6.2-1) unstable; urgency=low
+xfsprogs (2.6.3-1) unstable; urgency=low
* New upstream release.
+ * Add support for debian-installer. (closes: #225444)
+ Author: Steve Langasek.
+ * Use debhelper instead of debmake, for proper udeb building.
+ Author: Steve Langasek.
+ * Drop boot-floppies support. (closes: #112715)
+ Author: Steve Langasek.
+ * Add support for the security attribute namespace.
- -- Nathan Scott <nathans@debian.org> Wed, 17 Dec 2003 21:16:53 +1100
-
-xfsprogs (2.6.1-1) unstable; urgency=low
-
- * New upstream release.
-
- -- Nathan Scott <nathans@debian.org> Thu, 27 Nov 2003 13:47:17 +1100
+ -- Nathan Scott <nathans@debian.org> Mon, 19 Jan 2004 10:08:59 +1100
xfsprogs (2.6.0-1) unstable; urgency=low
xfsprogs (2.5.4-1) unstable; urgency=low
* New upstream release, includes xfs_copy command
- * Fix shell quoting in xfs_bmap, from Kai S. Juse (closes: 202588)
+ * Fix shell quoting in xfs_bmap, from Kai S. Juse (closes: #202588)
-- Nathan Scott <nathans@debian.org> Wed, 23 Jul 2003 10:36:28 +1000
Section: admin
Priority: optional
Maintainer: Nathan Scott <nathans@debian.org>
-Build-Depends: uuid-dev, autoconf, debmake, gettext, libtool, libreadline4-dev
+Build-Depends: uuid-dev, autoconf, debhelper, gettext, libtool, libreadline4-dev
Standards-Version: 3.5.9
Package: xfsprogs
Description: XFS filesystem-specific static libraries and headers
xfslibs-dev contains the libraries and header files needed to
develop XFS filesystem-specific programs.
-
-Package: xfsprogs-bf
-Section: devel
-Priority: extra
-Depends: ${shlibs:Depends}
-Conflicts: e2fsprogs, xfsprogs
+
+Package: xfsprogs-udeb
+Section: debian-installer
+Priority: standard
Architecture: any
-Description: A stripped-down versions of xfsprogs, for boot-floppies
- This package is an xfsprogs package built for a reduced size, so that
- it can help to save space on installation boot-floppies.
+Depends: ${shlibs:Depends}
+Description: A stripped-down version of xfsprogs, for debian-installer
+ This package is an xfsprogs package built for reduced size, so that it
+ can help to save space in debian-installer.
.
Don't attempt to install this package, it has no support for a couple of
- features you surely want. Anyway it should refuse to install.
-
+ features you surely want. Anyway, it should fail to install.
package = xfsprogs
develop = xfslibs-dev
-bootpkg = xfsprogs-bf
+bootpkg = xfsprogs-udeb
+
+version = $(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
+target ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+udebpkg = $(bootpkg)_$(version)_$(target).udeb
dirtmp = debian/tmp
dirdev = debian/$(develop)
-dirbfs = debian/$(bootpkg)
+dirdi = debian/$(bootpkg)
pkgtmp = DIST_ROOT=`pwd`/$(dirtmp); export DIST_ROOT;
pkgdev = DIST_ROOT=`pwd`/$(dirdev); export DIST_ROOT;
-pkgbfs = DIST_ROOT=`pwd`/$(dirbfs); export DIST_ROOT;
+pkgdi = DIST_ROOT=`pwd`/$(dirdi); export DIST_ROOT;
stdenv = @GZIP=-q; export GZIP;
options = DEBUG=-DNDEBUG; DISTRIBUTION=debian; LOCAL_CONFIGURE_OPTIONS=--enable-readline=yes; export DEBUG DISTRIBUTION LOCAL_CONFIGURE_OPTIONS;
-bfsopts = $(options) OPTIMIZER=-Os; LOCAL_CONFIGURE_OPTIONS="--enable-shared-uuid=yes --enable-gettext=no"; export OPTIMIZER LOCAL_CONFIGURE_OPTIONS;
+diopts = $(options) OPTIMIZER=-Os; LOCAL_CONFIGURE_OPTIONS="--enable-shared-uuid=yes --enable-gettext=no"; export OPTIMIZER LOCAL_CONFIGURE_OPTIONS;
checkdir = test -f debian/rules
build: built
-built: bfbuild config
+built: dibuild config
@echo "== dpkg-buildpackage: build" 1>&2
$(MAKE) default
touch built
$(options) $(MAKE) configure
touch .census
-bfbuild:
+dibuild:
$(checkdir)
@echo "== dpkg-buildpackage: bootfloppies" 1>&2
if [ ! -f mkfs/mkfs.xfs-$(bootpkg) ]; then \
- $(bfsopts) $(MAKE) configure; \
+ $(diopts) $(MAKE) configure; \
for dir in include libxfs libdisk mkfs; do \
$(MAKE) -C $$dir; \
done; \
$(checkdir)
-rm -f built .census mkfs/mkfs.xfs-$(bootpkg)
$(MAKE) distclean
- -rm -rf $(dirtmp) $(dirdev) $(dirbfs) debian/*substvars debian/files*
+ -rm -rf $(dirtmp) $(dirdev) $(dirdi) debian/*substvars debian/files*
binary-indep:
-# Note1: dev pkg with .so symlinks to base pkg confuses debstd;
-# so the .so 'Dangling symlink' message is benign.
-# Note2: absolute symlinks (required by policy) confuse debstd;
-# so we'll filter out symlink messages entirely now.
-#
binary-arch: checkroot built
@echo "== dpkg-buildpackage: binary-arch" 1>&2
$(checkdir)
- -rm -rf $(dirtmp) $(dirdev) $(dirbfs)
+ -rm -rf $(dirtmp) $(dirdev) $(dirdi)
$(pkgtmp) $(MAKE) -C . install
$(pkgdev) $(MAKE) -C . install-dev
- $(pkgbfs) $(MAKE) -C debian install-boot
+ $(pkgdi) $(MAKE) -C debian install-d-i
$(pkgtmp) $(MAKE) -C build src-manifest
- @echo "== dpkg-buildpackage: debstd" 1>&2
- $(stdenv) debstd -m | grep -v 'Dangling symlink'
- dpkg-gencontrol -isp -p$(package) -P$(dirtmp)
- dpkg-gencontrol -isp -p$(develop) -P$(dirdev)
- dpkg-gencontrol -isp -p$(bootpkg) -P$(dirbfs)
- chown -R root.root $(dirtmp) $(dirdev) $(dirbfs)
- chmod -R go=rX $(dirtmp) $(dirdev) $(dirbfs)
- dpkg --build $(dirtmp) ..
- dpkg --build $(dirdev) ..
- dpkg --build $(dirbfs) ..
+
+ dh_installdocs -p$(package) -p$(develop)
+ dh_installchangelogs -N$(bootpkg)
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_makeshlibs -p$(package)
+ dh_installdeb -N$(bootpkg)
+ dh_shlibdeps
+ dh_gencontrol -N$(bootpkg)
+ dh_gencontrol -p$(bootpkg) -- -n$(udebpkg)
+
+ dh_md5sums -N$(bootpkg)
+ dh_builddeb -N$(bootpkg)
+ dh_builddeb -p$(bootpkg) --filename=$(udebpkg)
binary: binary-indep binary-arch
+xfsprogs-2.6.3 (19 January 2003)
+ - Merge Steve Langasek's work on the Debian installer
+ support for xfsprogs.
+ - Add knowledge to xfs_db about the security namespace in
+ its extended attributes commands.
+ - Sync up user/kernel source in libxfs and headers.
+ - Fix a couple of compilation warnings.
+ - Workaround for some versions of autoconf mishandling the
+ AC_CHECK_SIZEOF macro.
+ - Fix a memory leak in libxfs, most noticable in xfs_repair.
+
xfsprogs-2.6.2 (17 December 2003)
- Fix dev_t sizing issues in user tools - glibc uses a 64
bit number and XFS has a 32 device bit number, confusion
#
-# Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
+# Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of version 2 of the GNU General Public License as
xfs_log.h xfs_log_priv.h xfs_log_recover.h xfs_mount.h xfs_quota.h \
xfs_rtalloc.h xfs_sb.h xfs_trans.h xfs_trans_space.h xfs_types.h
-LHFILES = xfs_acl.h xfs_cap.h xfs_mac.h
DKHFILES = volume.h fstyp.h dvh.h
-LSRCFILES = platform_defs.h.in builddefs.in buildmacros buildrules \
- $(LHFILES) $(DKHFILES)
+LSRCFILES = platform_defs.h.in builddefs.in buildmacros buildrules $(DKHFILES)
LDIRT = xfs disk
default install :
#
-# Copyright (c) 2002-2003 Silicon Graphics, Inc. All Rights Reserved.
+# Copyright (c) 2002-2004 Silicon Graphics, Inc. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of version 2 of the GNU General Public License as
cd $(TOPDIR)/$(LIBNAME)/.libs; \
../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
../$(INSTALL) -m 644 -T so_dot_version $(LIBNAME).lai $(PKG_LIB_DIR); \
- test "$(PKG_DISTRIBUTION)" = debian || \
../$(INSTALL) -T so_dot_current $(LIBNAME).lai $(PKG_LIB_DIR)
endif
/*
- * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
extern void libxfs_trans_inode_alloc_buf (xfs_trans_t *, xfs_buf_t *);
extern void libxfs_idata_realloc (xfs_inode_t *, int, int);
-extern void libxfs_idestroy_fork (xfs_inode_t *, int);
+extern void libxfs_idestroy_fork (xfs_inode_t *, int);
extern int libxfs_iread (xfs_mount_t *, xfs_trans_t *, xfs_ino_t,
xfs_inode_t **, xfs_daddr_t);
extern void libxfs_ichgtime (xfs_inode_t *, int);
+++ /dev/null
-/*
- * Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
- */
-#ifndef __XFS_ACL_H__
-#define __XFS_ACL_H__
-
-/*
- * Access Control Lists
- */
-typedef __uint16_t xfs_acl_perm_t;
-typedef __int32_t xfs_acl_type_t;
-typedef __int32_t xfs_acl_tag_t;
-typedef __int32_t xfs_acl_id_t;
-
-#define XFS_ACL_MAX_ENTRIES 25
-#define XFS_ACL_NOT_PRESENT (-1)
-
-typedef struct xfs_acl_entry {
- xfs_acl_tag_t ae_tag;
- xfs_acl_id_t ae_id;
- xfs_acl_perm_t ae_perm;
-} xfs_acl_entry_t;
-
-typedef struct xfs_acl {
- __int32_t acl_cnt;
- xfs_acl_entry_t acl_entry[XFS_ACL_MAX_ENTRIES];
-} xfs_acl_t;
-
-/* On-disk XFS extended attribute names */
-#define SGI_ACL_FILE "SGI_ACL_FILE"
-#define SGI_ACL_DEFAULT "SGI_ACL_DEFAULT"
-#define SGI_ACL_FILE_SIZE (sizeof(SGI_ACL_FILE)-1)
-#define SGI_ACL_DEFAULT_SIZE (sizeof(SGI_ACL_DEFAULT)-1)
-
-
-#ifdef __KERNEL__
-
-#ifdef CONFIG_XFS_POSIX_ACL
-
-struct vattr;
-struct vnode;
-struct xfs_inode;
-
-extern int xfs_acl_inherit(struct vnode *, struct vattr *, xfs_acl_t *);
-extern int xfs_acl_iaccess(struct xfs_inode *, mode_t, cred_t *);
-extern int xfs_acl_get(struct vnode *, xfs_acl_t *, xfs_acl_t *);
-extern int xfs_acl_set(struct vnode *, xfs_acl_t *, xfs_acl_t *);
-extern int xfs_acl_vtoacl(struct vnode *, xfs_acl_t *, xfs_acl_t *);
-extern int xfs_acl_vhasacl_access(struct vnode *);
-extern int xfs_acl_vhasacl_default(struct vnode *);
-extern int xfs_acl_vset(struct vnode *, void *, size_t, int);
-extern int xfs_acl_vget(struct vnode *, void *, size_t, int);
-extern int xfs_acl_vremove(struct vnode *vp, int);
-
-extern struct kmem_zone *xfs_acl_zone;
-
-#define _ACL_TYPE_ACCESS 1
-#define _ACL_TYPE_DEFAULT 2
-#define _ACL_PERM_INVALID(perm) ((perm) & ~(ACL_READ|ACL_WRITE|ACL_EXECUTE))
-
-#define _ACL_DECL(a) xfs_acl_t *(a) = NULL
-#define _ACL_ALLOC(a) ((a) = kmem_zone_alloc(xfs_acl_zone, KM_SLEEP))
-#define _ACL_FREE(a) ((a)? kmem_zone_free(xfs_acl_zone, (a)) : 0)
-#define _ACL_ZONE_INIT(z,name) ((z) = kmem_zone_init(sizeof(xfs_acl_t), name))
-#define _ACL_ZONE_DESTROY(z) (kmem_cache_destroy(z))
-#define _ACL_INHERIT(c,v,d) (xfs_acl_inherit(c,v,d))
-#define _ACL_GET_ACCESS(pv,pa) (xfs_acl_vtoacl(pv,pa,NULL) == 0)
-#define _ACL_GET_DEFAULT(pv,pd) (xfs_acl_vtoacl(pv,NULL,pd) == 0)
-#define _ACL_ACCESS_EXISTS xfs_acl_vhasacl_access
-#define _ACL_DEFAULT_EXISTS xfs_acl_vhasacl_default
-#define _ACL_XFS_IACCESS(i,m,c) (XFS_IFORK_Q(i) ? xfs_acl_iaccess(i,m,c) : -1)
-
-#else
-#define xfs_acl_vset(v,p,sz,t) (-EOPNOTSUPP)
-#define xfs_acl_vget(v,p,sz,t) (-EOPNOTSUPP)
-#define xfs_acl_vremove(v,t) (-EOPNOTSUPP)
-#define _ACL_DECL(a) ((void)0)
-#define _ACL_ALLOC(a) (1) /* successfully allocate nothing */
-#define _ACL_FREE(a) ((void)0)
-#define _ACL_ZONE_INIT(z,name) ((void)0)
-#define _ACL_ZONE_DESTROY(z) ((void)0)
-#define _ACL_INHERIT(c,v,d) (0)
-#define _ACL_GET_ACCESS(pv,pa) (0)
-#define _ACL_GET_DEFAULT(pv,pd) (0)
-#define _ACL_ACCESS_EXISTS (NULL)
-#define _ACL_DEFAULT_EXISTS (NULL)
-#define _ACL_XFS_IACCESS(i,m,c) (-1)
-#endif
-
-#endif /* __KERNEL__ */
-
-#endif /* __XFS_ACL_H__ */
/*
- * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
xfs_perag_busy_t *pagb_list; /* unstable blocks */
} xfs_perag_t;
-#define XFS_AG_BYTES(bblog) ((long long)BBSIZE << (bblog))
-#define XFS_AG_MIN_BYTES ((XFS_AG_BYTES(15))) /* 16 MB */
-#define XFS_AG_MIN_BLOCKS(blog) ((XFS_AG_BYTES(15)) >> (blog))
-#define XFS_AG_MAX_BLOCKS(blog) ((XFS_AG_BYTES(31) - 1) >> (blog))
-
-#define XFS_MAX_AGNUMBER ((xfs_agnumber_t)(NULLAGNUMBER - 1))
-
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AG_MAXLEVELS)
int xfs_ag_maxlevels(struct xfs_mount *mp);
#define XFS_AG_MAXLEVELS(mp) xfs_ag_maxlevels(mp)
/*
- * Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2000, 2002-2004 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
struct attrlist;
struct attrlist_cursor_kern;
+struct attrnames;
struct xfs_dabuf;
struct xfs_da_args;
struct xfs_da_state;
* to work "forw"ard. If none matches, continue with the "forw"ard leaf
* nodes until the hash key changes or the attribute name is found.
*
- * We store the fact that an attribute is a ROOT versus USER attribute in
+ * We store the fact that an attribute is a ROOT/USER/SECURE attribute in
* the leaf_entry. The namespaces are independent only because we also look
- * at the root/user bit when we are looking for a matching attribute name.
+ * at the namespace bit when we are looking for a matching attribute name.
*
* We also store a "incomplete" bit in the leaf_entry. It shows that an
* attribute is in the middle of being created and should not be shown to
struct xfs_attr_leaf_entry { /* sorted on key, not name */
xfs_dahash_t hashval; /* hash value of name */
__uint16_t nameidx; /* index into buffer of name/value */
- __uint8_t flags; /* LOCAL, ROOT and INCOMPLETE flags */
+ __uint8_t flags; /* LOCAL/ROOT/SECURE/INCOMPLETE flag */
__uint8_t pad2; /* unused pad byte */
} entries[1]; /* variable sized array */
struct xfs_attr_leaf_name_local {
* on the system call, they are "or"ed together for various operations.
*/
#define XFS_ATTR_LOCAL_BIT 0 /* attr is stored locally */
-#define XFS_ATTR_ROOT_BIT 1 /* limit access to attr to userid 0 */
+#define XFS_ATTR_ROOT_BIT 1 /* limit access to trusted attrs */
+#define XFS_ATTR_SECURE_BIT 2 /* limit access to secure attrs */
#define XFS_ATTR_INCOMPLETE_BIT 7 /* attr in middle of create/delete */
#define XFS_ATTR_LOCAL (1 << XFS_ATTR_LOCAL_BIT)
#define XFS_ATTR_ROOT (1 << XFS_ATTR_ROOT_BIT)
+#define XFS_ATTR_SECURE (1 << XFS_ATTR_SECURE_BIT)
#define XFS_ATTR_INCOMPLETE (1 << XFS_ATTR_INCOMPLETE_BIT)
/*
int *local);
int xfs_attr_leaf_entsize(struct xfs_attr_leafblock *leaf, int index);
int xfs_attr_put_listent(struct xfs_attr_list_context *context,
- int ns, char *name, int namelen, int valuelen);
+ struct attrnames *, char *name, int namelen,
+ int valuelen);
int xfs_attr_rolltrans(struct xfs_trans **transp, struct xfs_inode *dp);
#endif /* __XFS_ATTR_LEAF_H__ */
+++ /dev/null
-/*
- * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
- */
-#ifndef __XFS_CAP_H__
-#define __XFS_CAP_H__
-
-/*
- * Capabilities
- */
-typedef __uint64_t xfs_cap_value_t;
-
-typedef struct xfs_cap_set {
- xfs_cap_value_t cap_effective; /* use in capability checks */
- xfs_cap_value_t cap_permitted; /* combined with file attrs */
- xfs_cap_value_t cap_inheritable;/* pass through exec */
-} xfs_cap_set_t;
-
-/* On-disk XFS extended attribute names */
-#define SGI_CAP_FILE "SGI_CAP_FILE"
-#define SGI_CAP_FILE_SIZE (sizeof(SGI_CAP_FILE)-1)
-#define SGI_CAP_LINUX "SGI_CAP_LINUX"
-#define SGI_CAP_LINUX_SIZE (sizeof(SGI_CAP_LINUX)-1)
-
-/*
- * For Linux, we take the bitfields directly from capability.h
- * and no longer attempt to keep this attribute ondisk compatible
- * with IRIX. Since this attribute is only set on exectuables,
- * it just doesn't make much sense to try. We do use a different
- * named attribute though, to avoid confusion.
- */
-
-#ifdef __KERNEL__
-
-#ifdef CONFIG_FS_POSIX_CAP
-
-#include <linux/posix_cap_xattr.h>
-
-struct vnode;
-
-extern int xfs_cap_vhascap(struct vnode *);
-extern int xfs_cap_vset(struct vnode *, void *, size_t);
-extern int xfs_cap_vget(struct vnode *, void *, size_t);
-extern int xfs_cap_vremove(struct vnode *vp);
-
-#define _CAP_EXISTS xfs_cap_vhascap
-
-#else
-#define xfs_cap_vset(v,p,sz) (-EOPNOTSUPP)
-#define xfs_cap_vget(v,p,sz) (-EOPNOTSUPP)
-#define xfs_cap_vremove(v) (-EOPNOTSUPP)
-#define _CAP_EXISTS (NULL)
-#endif
-
-#endif /* __KERNEL__ */
-
-#endif /* __XFS_CAP_H__ */
+++ /dev/null
-/*
- * Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
- */
-#ifndef __XFS_MAC_H__
-#define __XFS_MAC_H__
-
-/*
- * Mandatory Access Control
- *
- * Layout of a composite MAC label:
- * ml_list contains the list of categories (MSEN) followed by the list of
- * divisions (MINT). This is actually a header for the data structure which
- * will have an ml_list with more than one element.
- *
- * -------------------------------
- * | ml_msen_type | ml_mint_type |
- * -------------------------------
- * | ml_level | ml_grade |
- * -------------------------------
- * | ml_catcount |
- * -------------------------------
- * | ml_divcount |
- * -------------------------------
- * | category 1 |
- * | . . . |
- * | category N | (where N = ml_catcount)
- * -------------------------------
- * | division 1 |
- * | . . . |
- * | division M | (where M = ml_divcount)
- * -------------------------------
- */
-#define XFS_MAC_MAX_SETS 250
-typedef struct xfs_mac_label {
- __uint8_t ml_msen_type; /* MSEN label type */
- __uint8_t ml_mint_type; /* MINT label type */
- __uint8_t ml_level; /* Hierarchical level */
- __uint8_t ml_grade; /* Hierarchical grade */
- __uint16_t ml_catcount; /* Category count */
- __uint16_t ml_divcount; /* Division count */
- /* Category set, then Division set */
- __uint16_t ml_list[XFS_MAC_MAX_SETS];
-} xfs_mac_label_t;
-
-/* MSEN label type names. Choose an upper case ASCII character. */
-#define XFS_MSEN_ADMIN_LABEL 'A' /* Admin: low<admin != tcsec<high */
-#define XFS_MSEN_EQUAL_LABEL 'E' /* Wildcard - always equal */
-#define XFS_MSEN_HIGH_LABEL 'H' /* System High - always dominates */
-#define XFS_MSEN_MLD_HIGH_LABEL 'I' /* System High, multi-level dir */
-#define XFS_MSEN_LOW_LABEL 'L' /* System Low - always dominated */
-#define XFS_MSEN_MLD_LABEL 'M' /* TCSEC label on a multi-level dir */
-#define XFS_MSEN_MLD_LOW_LABEL 'N' /* System Low, multi-level dir */
-#define XFS_MSEN_TCSEC_LABEL 'T' /* TCSEC label */
-#define XFS_MSEN_UNKNOWN_LABEL 'U' /* unknown label */
-
-/* MINT label type names. Choose a lower case ASCII character. */
-#define XFS_MINT_BIBA_LABEL 'b' /* Dual of a TCSEC label */
-#define XFS_MINT_EQUAL_LABEL 'e' /* Wildcard - always equal */
-#define XFS_MINT_HIGH_LABEL 'h' /* High Grade - always dominates */
-#define XFS_MINT_LOW_LABEL 'l' /* Low Grade - always dominated */
-
-/* On-disk XFS extended attribute names */
-#define SGI_MAC_FILE "SGI_MAC_FILE"
-#define SGI_MAC_FILE_SIZE (sizeof(SGI_MAC_FILE)-1)
-
-
-#ifdef __KERNEL__
-
-#ifdef CONFIG_FS_POSIX_MAC
-
-/* NOT YET IMPLEMENTED */
-
-#define MACEXEC 00100
-#define MACWRITE 00200
-#define MACREAD 00400
-
-struct xfs_inode;
-extern int xfs_mac_iaccess(struct xfs_inode *, mode_t, cred_t *);
-
-#define _MAC_XFS_IACCESS(i,m,c) (xfs_mac_iaccess(i,m,c))
-#define _MAC_VACCESS(v,c,m) (xfs_mac_vaccess(v,c,m))
-#define _MAC_EXISTS xfs_mac_vhaslabel
-
-#else
-#define _MAC_XFS_IACCESS(i,m,c) (0)
-#define _MAC_VACCESS(v,c,m) (0)
-#define _MAC_EXISTS (NULL)
-#endif
-
-#endif /* __KERNEL__ */
-
-#endif /* __XFS_MAC_H__ */
/*
- * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
XFS_BTNUM_MAX
} xfs_btnum_t;
-
-/*
- * Juggle IRIX device numbers - still used in ondisk structures
- */
-#define XFS_DEV_BITSMAJOR 14
-#define XFS_DEV_BITSMINOR 18
-#define XFS_DEV_MAXMAJ 0x1ff
-#define XFS_DEV_MAXMIN 0x3ffff
-#define XFS_DEV_MAJOR(dev) ((int)(((unsigned)(dev)>>XFS_DEV_BITSMINOR) \
- & XFS_DEV_MAXMAJ))
-#define XFS_DEV_MINOR(dev) ((int)((dev)&XFS_DEV_MAXMIN))
-#define XFS_MKDEV(major,minor) ((xfs_dev_t)(((major)<<XFS_DEV_BITSMINOR) \
- | (minor&XFS_DEV_MAXMIN)))
-
-#define XFS_DEV_TO_KDEVT(dev) MKDEV(XFS_DEV_MAJOR(dev),XFS_DEV_MINOR(dev))
-
#endif /* __XFS_TYPES_H__ */
/*
- * Copyright (c) 2003 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2003-2004 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
cvtstr((double)total, s1, sizeof(s1));
cvtstr(tdiv((double)total, t2), s2, sizeof(s2));
timestr(&t2, ts, sizeof(ts));
- printf(_("---- %s, %d ops; %s (%s/sec and %.f ops/sec)\n"),
+ printf(_("---- %s, %d ops; %s (%s/sec and %.4f ops/sec)\n"),
s1, c, ts, s2, tdiv((double)c, t2));
return 0;
}
/*
- * Copyright (c) 2003 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2003-2004 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
cvtstr((double)total, s1, sizeof(s1));
cvtstr(tdiv((double)total, t2), s2, sizeof(s2));
timestr(&t2, ts, sizeof(ts));
- printf(_("----- %s, %d ops; %s (%s/sec and %.f ops/sec)\n"),
+ printf(_("----- %s, %d ops; %s (%s/sec and %.4f ops/sec)\n"),
s1, c, ts, s2, tdiv((double)c, t2));
close(fd);
return 0;
/*
- * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
#define xfs_iread libxfs_iread
#define xfs_ialloc libxfs_ialloc
#define xfs_idata_realloc libxfs_idata_realloc
-#define xfs_idestroy_fork libxfs_idestroy_fork
+#define xfs_idestroy_fork libxfs_idestroy_fork
#define xfs_itobp libxfs_itobp
#define xfs_ichgtime libxfs_ichgtime
#define xfs_bmapi libxfs_bmapi
#define NBPP getpagesize()
#define STATIC
#define ATTR_ROOT 0x0002 /* use attrs in root namespace */
+#define ATTR_SECURE 0x0008 /* use attrs in security namespace */
#define ktrace_t void
#define m_ddev_targp m_dev
#define unlikely(x) (x)
/*
- * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
+ INT_GET(map->size, ARCH_CONVERT));
INT_SET(entry->hashval, ARCH_CONVERT, args->hashval);
entry->flags = tmp ? XFS_ATTR_LOCAL : 0;
- entry->flags |= (args->flags & ATTR_ROOT) ? XFS_ATTR_ROOT : 0;
+ entry->flags |= (args->flags & ATTR_SECURE) ? XFS_ATTR_SECURE :
+ ((args->flags & ATTR_ROOT) ? XFS_ATTR_ROOT : 0);
if (args->rename) {
entry->flags |= XFS_ATTR_INCOMPLETE;
if ((args->blkno2 == args->blkno) &&
/*
- * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
"%llu needed freesp block %lld for\n"
" data block %lld, got %lld\n"
" ifbno %llu lastfbno %d\n",
- dp->i_ino,
- XFS_DIR2_DB_TO_FDB(mp, dbno),
- dbno, fbno,
- ifbno, lastfbno);
+ (unsigned long long)dp->i_ino,
+ (long long)XFS_DIR2_DB_TO_FDB(mp, dbno),
+ (long long)dbno, (long long)fbno,
+ (unsigned long long)ifbno, lastfbno);
if (fblk) {
cmn_err(CE_ALERT,
- " fblk 0x%llu blkno %llu "
+ " fblk 0x%p blkno %llu "
"index %d magic 0x%x\n",
- fblk, fblk->blkno,
+ fblk,
+ (unsigned long long)fblk->blkno,
fblk->index,
fblk->magic);
} else {
/*
- * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2000-2001,2004 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* accept w/o warnings
*/
+#define XFS_AG_BYTES(bblog) ((long long)BBSIZE << (bblog))
+#define XFS_AG_MIN_BYTES ((XFS_AG_BYTES(15))) /* 16 MB */
+#define XFS_AG_MIN_BLOCKS(blog) ((XFS_AG_BYTES(15)) >> (blog))
+#define XFS_AG_MAX_BLOCKS(blog) ((XFS_AG_BYTES(31) - 1) >> (blog))
+
+#define XFS_MAX_AGNUMBER ((xfs_agnumber_t)(NULLAGNUMBER - 1))
+
+
/* xfs_mkfs.c */
extern void usage (void);
extern int isdigits (char *str);
/*
- * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2000-2002,2004 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
*/
#include <libxfs.h>
-#include <xfs_acl.h>
-#include <xfs_cap.h>
-#include <xfs_mac.h>
#include "globals.h"
#include "err_protos.h"
#include "attr_repair.h"
/*
- * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2000-2002,2004 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
#ifndef _XR_ATTRREPAIR_H
#define _XR_ATTRREPAIR_H
+/*
+ * Access Control Lists
+ */
#define ACL_USER_OBJ 0x01 /* owner */
#define ACL_USER 0x02 /* additional users */
#define ACL_GROUP_OBJ 0x04 /* group */
#define ACL_WRITE 02
#define ACL_EXECUTE 01
+typedef __uint16_t xfs_acl_perm_t;
+typedef __int32_t xfs_acl_type_t;
+typedef __int32_t xfs_acl_tag_t;
+typedef __int32_t xfs_acl_id_t;
+
+typedef struct xfs_acl_entry {
+ xfs_acl_tag_t ae_tag;
+ xfs_acl_id_t ae_id;
+ xfs_acl_perm_t ae_perm;
+} xfs_acl_entry_t;
+
+#define XFS_ACL_MAX_ENTRIES 25
+typedef struct xfs_acl {
+ __int32_t acl_cnt;
+ xfs_acl_entry_t acl_entry[XFS_ACL_MAX_ENTRIES];
+} xfs_acl_t;
+
+#define SGI_ACL_FILE "SGI_ACL_FILE"
+#define SGI_ACL_DEFAULT "SGI_ACL_DEFAULT"
+#define SGI_ACL_FILE_SIZE (sizeof(SGI_ACL_FILE)-1)
+#define SGI_ACL_DEFAULT_SIZE (sizeof(SGI_ACL_DEFAULT)-1)
+
+
+/*
+ * Mandatory Access Control Labels (IRIX)
+ */
+#define XFS_MAC_MAX_SETS 250
+typedef struct xfs_mac_label {
+ __uint8_t ml_msen_type; /* MSEN label type */
+ __uint8_t ml_mint_type; /* MINT label type */
+ __uint8_t ml_level; /* Hierarchical level */
+ __uint8_t ml_grade; /* Hierarchical grade */
+ __uint16_t ml_catcount; /* Category count */
+ __uint16_t ml_divcount; /* Division count */
+ /* Category set, then Division set */
+ __uint16_t ml_list[XFS_MAC_MAX_SETS];
+} xfs_mac_label_t;
+
+/* MSEN label type names. Choose an upper case ASCII character. */
+#define XFS_MSEN_ADMIN_LABEL 'A' /* Admin: low<admin != tcsec<high */
+#define XFS_MSEN_EQUAL_LABEL 'E' /* Wildcard - always equal */
+#define XFS_MSEN_HIGH_LABEL 'H' /* System High - always dominates */
+#define XFS_MSEN_MLD_HIGH_LABEL 'I' /* System High, multi-level dir */
+#define XFS_MSEN_LOW_LABEL 'L' /* System Low - always dominated */
+#define XFS_MSEN_MLD_LABEL 'M' /* TCSEC label on a multi-level dir */
+#define XFS_MSEN_MLD_LOW_LABEL 'N' /* System Low, multi-level dir */
+#define XFS_MSEN_TCSEC_LABEL 'T' /* TCSEC label */
+#define XFS_MSEN_UNKNOWN_LABEL 'U' /* unknown label */
+
+/* MINT label type names. Choose a lower case ASCII character. */
+#define XFS_MINT_BIBA_LABEL 'b' /* Dual of a TCSEC label */
+#define XFS_MINT_EQUAL_LABEL 'e' /* Wildcard - always equal */
+#define XFS_MINT_HIGH_LABEL 'h' /* High Grade - always dominates */
+#define XFS_MINT_LOW_LABEL 'l' /* Low Grade - always dominated */
+
+#define SGI_MAC_FILE "SGI_MAC_FILE"
+#define SGI_MAC_FILE_SIZE (sizeof(SGI_MAC_FILE)-1)
+
+
+/*
+ * Capabilities (IRIX)
+ */
+typedef __uint64_t xfs_cap_value_t;
+
+typedef struct xfs_cap_set {
+ xfs_cap_value_t cap_effective; /* use in capability checks */
+ xfs_cap_value_t cap_permitted; /* combined with file attrs */
+ xfs_cap_value_t cap_inheritable;/* pass through exec */
+} xfs_cap_set_t;
+
+#define SGI_CAP_FILE "SGI_CAP_FILE"
+#define SGI_CAP_FILE_SIZE (sizeof(SGI_CAP_FILE)-1)
+
+
+/*
+ * External functions
+ */
struct blkmap;
extern int process_attributes (xfs_mount_t *, xfs_ino_t, xfs_dinode_t *,
struct blkmap *, int *);