[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 10/17: Check for a return value in netfs_make_peropen before usin
From: |
Samuel Thibault |
Subject: |
[hurd] 10/17: Check for a return value in netfs_make_peropen before using it in netfs_make_protid. |
Date: |
Mon, 15 Feb 2016 09:10:03 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit da578dac78504aa00d0b0bc1d929c4df63dcf5cd
Author: Flavio Cruz <address@hidden>
Date: Sun Feb 7 09:51:24 2016 -0500
Check for a return value in netfs_make_peropen before using it in
netfs_make_protid.
* libnetfs/trans-callback.c: Add check for netfs_make_peropen.
---
libnetfs/trans-callback.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libnetfs/trans-callback.c b/libnetfs/trans-callback.c
index f4f0c62..3f1aee6 100644
--- a/libnetfs/trans-callback.c
+++ b/libnetfs/trans-callback.c
@@ -58,14 +58,18 @@ _netfs_translator_callback2_fn (void *cookie1, void
*cookie2, int flags,
struct protid *cred;
struct node *node = cookie1;
struct iouser *user;
+ struct peropen *po;
err = iohelp_create_simple_iouser (&user, node->nn_stat.st_uid,
node->nn_stat.st_gid);
if (err)
return err;
- cred = netfs_make_protid (netfs_make_peropen (node, flags, cookie2),
- user);
+ po = netfs_make_peropen (node, flags, cookie2);
+ if (! po)
+ return errno;
+
+ cred = netfs_make_protid (po, user);
if (cred)
{
*underlying = ports_get_right (cred);
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 14/17: Make sure to complete auth_server_authenticate, (continued)
- [hurd] 14/17: Make sure to complete auth_server_authenticate, Samuel Thibault, 2016/02/15
- [hurd] 15/17: Fix hang on reauthentication, Samuel Thibault, 2016/02/15
- [hurd] 05/17: utils/settrans: improve --chroot functionality, Samuel Thibault, 2016/02/15
- [hurd] 08/17: mach-defpager: link dynamically, Samuel Thibault, 2016/02/15
- [hurd] 09/17: devnode: fix falling back to the kernel driver, Samuel Thibault, 2016/02/15
- [hurd] 01/17: Also build exec.static, Samuel Thibault, 2016/02/15
- [hurd] 12/17: utils/vmallocate: new utility, Samuel Thibault, 2016/02/15
- [hurd] 17/17: Merge remote-tracking branch 'upstream/master' into upstream, Samuel Thibault, 2016/02/15
- [hurd] 06/17: Use refcount_t for peropen reference counting in libnetfs., Samuel Thibault, 2016/02/15
- [hurd] 07/17: Remove libfshelp/trans.h and libfshelp/locks.h., Samuel Thibault, 2016/02/15
- [hurd] 10/17: Check for a return value in netfs_make_peropen before using it in netfs_make_protid.,
Samuel Thibault <=
- [hurd] 13/17: Use libihash to store directory entries in ftpfs., Samuel Thibault, 2016/02/15