X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fmodules%2Fvcard%2Fserv_vcard.c;fp=citadel%2Fmodules%2Fvcard%2Fserv_vcard.c;h=439a714a8d5b4d682f24c72b05b5d9077dd8c5f8;hp=dfd745255b7e31955a5ac035fe9bbe6eff484fe3;hb=ec3a9fd41d060931332bee674e856ce5265a1d8a;hpb=26eceb346b63ea936eb29535582d0d0a86d95545 diff --git a/citadel/modules/vcard/serv_vcard.c b/citadel/modules/vcard/serv_vcard.c index dfd745255..439a714a8 100644 --- a/citadel/modules/vcard/serv_vcard.c +++ b/citadel/modules/vcard/serv_vcard.c @@ -2,7 +2,7 @@ * A server-side module for Citadel which supports address book information * using the standard vCard format. * - * Copyright (c) 1999-2015 by the citadel.org team + * Copyright (c) 1999-2016 by the citadel.org team * * This program is open source software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3. @@ -1548,18 +1548,25 @@ CTDL_MODULE_INIT(vcard) * on this room even if we don't share it with any other nodes. * This allows the CANCEL messages (i.e. "Purge this vCard") to be * purged. + * + * FIXME this no longer works */ assoc_file_name(filename, sizeof filename, &qr, ctdl_netcfg_dir); fp = fopen(filename, "a"); - if (fp != NULL) fclose(fp); - rv = chown(filename, CTDLUID, (-1)); - if (rv == -1) - syslog(LOG_EMERG, "Failed to adjust ownership of: %s [%s]", - filename, strerror(errno)); - rv = chmod(filename, 0600); - if (rv == -1) - syslog(LOG_EMERG, "Failed to adjust ownership of: %s [%s]", - filename, strerror(errno)); + if (fp != NULL) { + fclose(fp); + rv = chown(filename, CTDLUID, (-1)); + if (rv == -1) { + syslog(LOG_ERR, "Failed to adjust ownership of %s: %s", filename, strerror(errno)); + } + rv = chmod(filename, 0600); + if (rv == -1) { + syslog(LOG_ERR, "Failed to adjust ownership of %s: %s", filename, strerror(errno)); + } + } + else { + syslog(LOG_ERR, "Cannot create %s: %s", filename, strerror(errno)); + } } /* for postfix tcpdict */