/[hurdextras]/libfuse/netfs.c
ViewVC logotype

Diff of /libfuse/netfs.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.39 by stesie, Fri Dec 9 15:28:24 2005 UTC revision 1.40 by stesie, Fri Dec 9 15:50:04 2005 UTC
# Line 367  netfs_check_open_permissions (struct iou Line 367  netfs_check_open_permissions (struct iou
367  {  {
368    (void) newnode;    (void) newnode;
369    
370    FUNC_PROLOGUE_NODE("netfs_check_open_permissions", node);    FUNC_PROLOGUE_FMT("netfs_check_open_permissions", "node=%s, flags=%d",
371                        node->nn->path, flags);
372    error_t err = 0;    error_t err = 0;
373    
374    if((err = netfs_validate_stat(node, user)))    if((err = netfs_validate_stat(node, user)))
# Line 382  netfs_check_open_permissions (struct iou Line 383  netfs_check_open_permissions (struct iou
383    if (!err && (flags & O_EXEC))    if (!err && (flags & O_EXEC))
384      err = fshelp_access (&node->nn_stat, S_IEXEC, user);      err = fshelp_access (&node->nn_stat, S_IEXEC, user);
385    
386    /* store provided flags for later open/read/write/release operation call */    /* store provided flags for later open/read/write/release operation call.
387       *
388       * If O_EXEC is set, make sure O_RDONLY is set, this is, if you want to
389       * execute a binary, only O_EXEC is set, but we want to read the binary
390       * into memory. */
391    node->nn->info.flags = flags;    node->nn->info.flags = flags;
392      if(flags & O_EXEC) node->nn->info.flags |= O_RDONLY;
393      
394   out:   out:
395    FUNC_EPILOGUE(err);    FUNC_EPILOGUE(err);
396  }  }

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26