X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=libatalk%2Fadouble%2Fad_write.c;h=35ebc222675f33787ca59ced3e7214ab9624db6c;hb=296eb8dfd48fb30bbc4b2371c3e1dabefe9d833d;hp=db542cb126f8bba07904c415e1f99478c5877ca9;hpb=f6a596fc1dcb60c6ebe9766d64b9c43347bd7232;p=netatalk.git diff --git a/libatalk/adouble/ad_write.c b/libatalk/adouble/ad_write.c index db542cb1..35ebc222 100644 --- a/libatalk/adouble/ad_write.c +++ b/libatalk/adouble/ad_write.c @@ -1,5 +1,5 @@ /* - * $Id: ad_write.c,v 1.10 2009-10-13 22:55:37 didg Exp $ + * $Id: ad_write.c,v 1.11 2010-03-30 12:55:26 franklahm Exp $ * * Copyright (c) 1990,1995 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -51,6 +51,12 @@ ssize_t ad_write(struct adouble *ad, const u_int32_t eid, off_t off, const int e { struct stat st; ssize_t cc; + + if (ad_data_fileno(ad) == -2) { + /* It's a symlink */ + errno = EACCES; + return -1; + } if ( eid == ADEID_DFORK ) { if ( end ) {