hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmcc...@apache.org
Subject hadoop git commit: HDFS-10193. fuse_dfs segfaults if uid cannot be resolved to a username (John Thiltges via cmccabe)
Date Wed, 23 Mar 2016 18:20:03 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 76602161c -> 7ad3162df


HDFS-10193. fuse_dfs segfaults if uid cannot be resolved to a username (John Thiltges via
cmccabe)

(cherry picked from commit 0d19a0ce98053572447bdadf88687ec55f2f1f46)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/7ad3162d
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/7ad3162d
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/7ad3162d

Branch: refs/heads/branch-2
Commit: 7ad3162df421ee1104c90de08235af467d08e76b
Parents: 7660216
Author: Colin Patrick Mccabe <cmccabe@cloudera.com>
Authored: Wed Mar 23 11:19:18 2016 -0700
Committer: Colin Patrick Mccabe <cmccabe@cloudera.com>
Committed: Wed Mar 23 11:19:55 2016 -0700

----------------------------------------------------------------------
 .../src/main/native/fuse-dfs/fuse_connect.c                     | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/7ad3162d/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_connect.c
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_connect.c
b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_connect.c
index e696072..6ee4ad5 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_connect.c
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_connect.c
@@ -570,6 +570,11 @@ int fuseConnectAsThreadUid(struct hdfsConn **conn)
   
   ctx = fuse_get_context();
   usrname = getUsername(ctx->uid);
+  if (!usrname) {
+    ERROR("fuseConnectAsThreadUid(): failed to get username for uid %"PRId64
+          "\n", (uint64_t)ctx->uid);
+    return EIO;
+  }
   ret = fuseConnect(usrname, ctx, conn);
   free(usrname);
   return ret;


Mime
View raw message