lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <12109484033095-git-send-email-hooanon05@yahoo.co.jp>
Date:	Fri, 16 May 2008 23:33:19 +0900
From:	hooanon05@...oo.co.jp
To:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	Junjiro Okajima <hooanon05@...oo.co.jp>
Subject: [PATCH 65/67] aufs pseudo-link helper for symlink

From: Junjiro Okajima <hooanon05@...oo.co.jp>

	initial commit
	aufs pseudo-link helper for symlink

Signed-off-by: Junjiro Okajima <hooanon05@...oo.co.jp>
---
 Documentation/filesystems/aufs/aulchown.c |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/Documentation/filesystems/aufs/aulchown.c b/Documentation/filesystems/aufs/aulchown.c
new file mode 100644
index 0000000..ca20584
--- /dev/null
+++ b/Documentation/filesystems/aufs/aulchown.c
@@ -0,0 +1,29 @@
+
+/*
+ * While this tool should be atomic, I choose loose/rough way.
+ * cf. auplink and aufs.5
+ * $Id: aulchown.c,v 1.1 2007/01/08 02:00:18 sfjro Exp $
+ */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <stdio.h>
+
+int main(int argc, char *argv[])
+{
+	int err, nerr;
+	struct stat st;
+
+	nerr = 0;
+	while (*++argv) {
+		err = lstat(*argv, &st);
+		if (!err && S_ISLNK(st.st_mode))
+			err = lchown(*argv, st.st_uid, st.st_gid);
+		if (!err)
+			continue;
+		perror(*argv);
+		nerr++;
+	}
+	return nerr;
+}
-- 
1.4.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ