Github user stanlyxiang commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1079#discussion_r95510088
  
    --- Diff: src/backend/tcop/postgres.c ---
    @@ -4626,6 +4630,24 @@ PostgresMain(int argc, char *argv[], const char 
*username)
        if (!ignore_till_sync)
                send_ready_for_query = true;    /* initially, or after error */
     
    +   /* for enable ranger*/
    +   if (enable_ranger && !curl_context.hasInited)
    +   {
    +           memset(&curl_context, 0, sizeof(curl_context_t));
    +           curl_global_init(CURL_GLOBAL_ALL);
    +           /* init the curl session */
    +           curl_context.curl_handle = curl_easy_init();
    +           if (curl_context.curl_handle == NULL) {
    +                   /* cleanup curl stuff */
    +                   /* no need to cleanup curl_handle since it's null. just 
cleanup curl global.*/
    +                   curl_global_cleanup();
    +           }
    +           curl_context.hasInited = true;
    +           curl_context.response.buffer = palloc0(CURL_RES_BUFFER_SIZE);
    +           curl_context.response.buffer_size = CURL_RES_BUFFER_SIZE;
    +           elog(LOG, "when enable ranger, init global struct for 
privileges check.");
    --- End diff --
    
    fixed. thks


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to