Browse Source

Signed-off-by: Russ Whitehead <william.whitehead@lexisnexis.com>

Russ Whitehead 8 years ago
parent
commit
066c55c81a
1 changed files with 3 additions and 4 deletions
  1. 3 4
      plugins/fileservices/fileservices.cpp

+ 3 - 4
plugins/fileservices/fileservices.cpp

@@ -2147,22 +2147,21 @@ FILESERVICES_API char *  FILESERVICES_CALL fsfResolveHostName(const char *hostna
 
 static void checkExternalFileRights(ICodeContext *ctx, CDfsLogicalFileName &lfn, bool rd,bool wr)
 {
-    StringAttr extpath(lfn.get());
     Linked<IUserDescriptor> udesc = ctx->queryUserDescriptor();
     unsigned auditflags = 0;
     if (rd)
         auditflags |= (DALI_LDAP_AUDIT_REPORT|DALI_LDAP_READ_WANTED);
     if (wr)
         auditflags |= (DALI_LDAP_AUDIT_REPORT|DALI_LDAP_WRITE_WANTED);
-    int perm = queryDistributedFileDirectory().getFilePermissions(extpath.get(),udesc,auditflags);
+    int perm = queryDistributedFileDirectory().getFilePermissions(lfn.get(),udesc,auditflags);
     if (wr) {
         if (!HASWRITEPERMISSION(perm)) {
-            throw MakeStringException(-1,"Write permission denied for %s",extpath.get());
+            throw MakeStringException(-1,"Write permission denied for %s", lfn.get());
         }
     }
     if (rd) {
         if (!HASREADPERMISSION(perm)) {
-            throw MakeStringException(-1,"Read permission denied for %s",extpath.get());
+            throw MakeStringException(-1,"Read permission denied for %s", lfn.get());
         }
     }
 }