public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: xfs@oss.sgi.com
Subject: [patch 4/4] acl: fix setfacl for long utf8 filenames
Date: Tue, 30 Dec 2008 12:14:17 -0600	[thread overview]
Message-ID: <20081230181447.028003436@sandeen.net> (raw)
In-Reply-To: 20081230181413.518122170@sandeen.net

[-- Attachment #1: acl-2.2.39-path_max.patch --]
[-- Type: text/plain, Size: 1093 bytes --]

Resolves Red Hat bugs:
 Bug 183181 -  Bad: utf8 long filenames - invalid argument
 Bug 287701 -  PATH_MAX patch seems incomplete

From: Andrey <afletdinov@dc.baikal.ru>
From: Thomas Woerner <twoerner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

Index: xfs-cmds/acl/setfacl/parse.c
===================================================================
--- xfs-cmds.orig/acl/setfacl/parse.c
+++ xfs-cmds/acl/setfacl/parse.c
@@ -24,6 +24,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
+#include <limits.h>
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -412,7 +413,12 @@ read_acl_comments(
 	gid_t *gid_p)
 {
 	int c;
-	char linebuf[1024];
+	/*
+	  Max PATH_MAX bytes even for UTF-8 path names and additional 9 
+	  bytes for "# file: ".Not a good solution but for now it is the 
+	  best I can do without too much impact on the code. [tw]
+	*/
+	char linebuf[(4*PATH_MAX)+9];
 	char *cp;
 	char *p;
 	int comments_read = 0;

-- 

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2008-12-30 18:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-30 18:14 [patch 0/4] acl patches from Fedora / Red Hat rpm Eric Sandeen
2008-12-30 18:14 ` [patch 1/4] acl: add short option support to the acl commands Eric Sandeen
2008-12-30 18:14 ` [patch 2/4] acl: fix setfacl segfault when using only "--" as parameter Eric Sandeen
2008-12-30 18:14 ` [patch 3/4] acl: Return error status on setfacl failures Eric Sandeen
2008-12-30 18:14 ` Eric Sandeen [this message]
2009-01-04 18:20 ` [patch 0/4] acl patches from Fedora / Red Hat rpm Andreas Gruenbacher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081230181447.028003436@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox