12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- $Id$
- cf. http://sourceforge.net/tracker/index.php?func=detail&aid=1594808&group_id=26275&atid=386747
- --- davfs2-1.3.3.orig/src/webdav.c 2008-06-28 19:20:07.000000000 +0200
- +++ davfs2-1.3.3/src/webdav.c 2008-12-08 00:37:23.000000000 +0100
- @@ -23,7 +23,6 @@
-
- #include "config.h"
-
- -#include <argz.h>
- #include <errno.h>
- #include <error.h>
- #include <fcntl.h>
- @@ -34,6 +33,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <syslog.h>
- +#include <regex.h>
- #include <time.h>
- #include <unistd.h>
-
- @@ -406,6 +406,11 @@ void dav_init_webdav(const char *scheme,
- suri = (ne_uri *) ne_calloc(sizeof(ne_uri));
- ne_fill_server_uri(session, suri);
-
- + /* begin of GMX hack */
- + ne_server_capabilities caps;
- + ne_options(session, "/", &caps);
- + /* end of GMX hack */
- +
- if (use_locks) {
- locks = ne_lockstore_create();
- if (lock_owner == NULL) {
- @@ -1859,13 +1864,18 @@ static int ssl_verify(void *userdata, in
- "or there might be a man-in-the-middle-attack.\n"));
- printf(_("Accept certificate for this session? [y,N] "));
- char *s = NULL;
- + regex_t *re;
- size_t n = 0;
- ssize_t len = 0;
- len = getline(&s, &n, stdin);
- if (len < 0)
- abort();
- - if (rpmatch(s) < 1)
- - ret = -1;
- + if (regcomp(&re, "^[yY]", REG_EXTENDED) != 0) {
- + if (regexec(&re, s, (size_t)0, NULL, 0) < 1) {
- + regfree(&re);
- + ret = -1;
- + }
- + }
- free(s);
- }
- }
|