From: Marco van Wieringen Date: Sat, 26 Dec 2009 19:06:17 +0000 (+0100) Subject: Lets use a xattr specific constant and not the stdio BUFSIZ which is kind of platform... X-Git-Tag: Release-7.0.0~2434 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6229e71709fb739b845cdc702fff16a73bbfb8d0;p=bacula%2Fbacula Lets use a xattr specific constant and not the stdio BUFSIZ which is kind of platform dependend. --- diff --git a/bacula/src/filed/xattr.c b/bacula/src/filed/xattr.c index 6a839d201b..24c75c5e2b 100644 --- a/bacula/src/filed/xattr.c +++ b/bacula/src/filed/xattr.c @@ -649,7 +649,7 @@ static bxattr_exit_code bsd_build_xattr_streams(JCR *jcr, FF_PKT *ff_pkt) unsigned int namespace_index; int attrnamespace; char *current_attrnamespace = NULL; - char current_attrname[BUFSIZ], current_attrtuple[BUFSIZ]; + char current_attrname[XATTR_BUFSIZ], current_attrtuple[XATTR_BUFSIZ]; xattr_t *current_xattr; alist *xattr_value_list = NULL; bxattr_exit_code retval = bxattr_exit_error; @@ -1382,7 +1382,7 @@ static bxattr_exit_code solaris_save_xattr(JCR *jcr, int fd, const char *xattr_n char link_source[PATH_MAX]; char *acl_text = NULL; char attribs[MAXSTRING]; - char buffer[BUFSIZ]; + char buffer[XATTR_BUFSIZ]; bxattr_exit_code retval = bxattr_exit_error; berrno be; diff --git a/bacula/src/filed/xattr.h b/bacula/src/filed/xattr.h index 329c32dec0..ff2587ed9d 100644 --- a/bacula/src/filed/xattr.h +++ b/bacula/src/filed/xattr.h @@ -70,4 +70,9 @@ struct xattr_data_t { */ #define MAX_XATTR_STREAM (1 * 1024 * 1024) /* 1 Mb */ +/* + * Upperlimit on a xattr internal buffer + */ +#define XATTR_BUFSIZ 1024 + #endif