dovecot-2.2-pigeonhole: lib-sievestorage: Removed PATH_MAX limit...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Tue Jun 18 09:35:10 EEST 2013
details: http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/1b1a0c271383
changeset: 1782:1b1a0c271383
user: Stephan Bosch <stephan at rename-it.nl>
date: Tue Jun 18 08:34:26 2013 +0200
description:
lib-sievestorage: Removed PATH_MAX limitation for active symlink.
Fixes issue for GNU/Hurd.
diffstat:
src/lib-sievestorage/sieve-storage-script.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diffs (38 lines):
diff -r e439789e3211 -r 1b1a0c271383 src/lib-sievestorage/sieve-storage-script.c
--- a/src/lib-sievestorage/sieve-storage-script.c Tue Jun 18 08:24:40 2013 +0200
+++ b/src/lib-sievestorage/sieve-storage-script.c Tue Jun 18 08:34:26 2013 +0200
@@ -2,6 +2,7 @@
*/
#include "lib.h"
+#include "abspath.h"
#include "mempool.h"
#include "hostpid.h"
#include "ioloop.h"
@@ -118,14 +119,13 @@
static int sieve_storage_read_active_link
(struct sieve_storage *storage, const char **link_r)
{
- char linkbuf[PATH_MAX];
- int ret;
+ int ret;
- *link_r = NULL;
-
- ret = readlink(storage->active_path, linkbuf, sizeof(linkbuf));
+ ret = t_readlink(storage->active_path, link_r);
if ( ret < 0 ) {
+ *link_r = NULL;
+
if ( errno == EINVAL ) {
/* Our symlink is no symlink. Report 'no active script'.
* Activating a script will automatically resolve this, so
@@ -152,7 +152,6 @@
}
/* ret is now assured to be valid, i.e. > 0 */
- *link_r = t_strndup(linkbuf, ret);
return 1;
}
More information about the dovecot-cvs
mailing list