HDFS-10193. fuse_dfs segfaults if uid cannot be resolved to a username (John Thiltges via cmccabe)
This commit is contained in:
parent
af1d125f9c
commit
0d19a0ce98
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user