[ 
https://issues.apache.org/jira/browse/TRAFODION-2709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16123085#comment-16123085
 ] 

ASF GitHub Bot commented on TRAFODION-2709:
-------------------------------------------

GitHub user Weixin-Xu opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/1201

    [TRAFODION-2709] getpwuid is not a Thread-safe function

    Using multi-threads app with linux-odbc to connect trafodion will make dcs 
down

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/Weixin-Xu/incubator-trafodion master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/1201.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1201
    
----
commit ba880338077efa5a1c6753ab5fe16888e98df1c9
Author: Weixin-Xu <xwx@weixin-1.novalocal>
Date:   2017-08-11T09:21:17Z

    [TRAFODION-2709] getpwuid is not a Thread-safe function

----


> Using multi-threads app with linux-odbc to connect trafodion will make dcs 
> down
> -------------------------------------------------------------------------------
>
>                 Key: TRAFODION-2709
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2709
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: client-odbc-linux
>    Affects Versions: 2.1-incubating, 2.2-incubating
>         Environment: centos 6.7
> centos 7.2
>            Reporter: XuWeixin
>             Fix For: 2.2-incubating
>
>
> getpwuid is not a Thread-safe function
>     // Get client user name.
>     struct passwd *passwd;           /* man getpwuid */
>     passwd = getpwuid (getuid());   /* Get the uid of the running processand 
> use it to get a record from /etc/passwd */
>     if (strlen(passwd->pw_name) > 0)
>     {
>             inContext.clientUserName = passwd->pw_name;
>             inContext.inContextOptions1 = inContext.inContextOptions1 | 
> INCONTEXT_OPT1_CLIENT_USERNAME;
>     }
>     else
>             inContext.clientUserName = NULL;



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to