… | |
… | |
450 | _exit (EXIT_FAILURE); |
450 | _exit (EXIT_FAILURE); |
451 | } |
451 | } |
452 | |
452 | |
453 | /*----------------------------------------------------------------------*/ |
453 | /*----------------------------------------------------------------------*/ |
454 | bool |
454 | bool |
455 | rxvt_term::init (int argc, const char *const *argv) |
455 | rxvt_term::init (int argc, const char *const *argv, stringvec *envv) |
456 | { |
456 | { |
|
|
457 | this->envv = envv; |
|
|
458 | |
457 | SET_R (this); |
459 | SET_R (this); |
458 | set_locale (""); |
460 | set_locale (""); |
459 | set_environ (envv); // few things in X do not call setlocale :( |
461 | set_environ (envv); // few things in X do not call setlocale :( |
460 | |
462 | |
461 | if (!init_vars ()) |
463 | if (!init_vars ()) |
… | |
… | |
472 | #ifdef HAVE_SCROLLBARS |
474 | #ifdef HAVE_SCROLLBARS |
473 | if (OPTION (Opt_scrollBar)) |
475 | if (OPTION (Opt_scrollBar)) |
474 | scrollBar.setIdle (); /* set existence for size calculations */ |
476 | scrollBar.setIdle (); /* set existence for size calculations */ |
475 | #endif |
477 | #endif |
476 | |
478 | |
477 | pty = rxvt_new_ptytty (); |
479 | pty = ptytty_new (); |
478 | |
480 | |
479 | create_windows (argc, argv); |
481 | create_windows (argc, argv); |
480 | |
482 | |
481 | dDisp; |
483 | dDisp; |
482 | |
484 | |
… | |
… | |
557 | // start the helper process and drop privileges |
559 | // start the helper process and drop privileges |
558 | if (uid != geteuid () |
560 | if (uid != geteuid () |
559 | || gid != getegid ()) |
561 | || gid != getegid ()) |
560 | { |
562 | { |
561 | #if PTYTTY_HELPER |
563 | #if PTYTTY_HELPER |
562 | rxvt_ptytty_server (); |
564 | ptytty_server (); |
563 | #else |
565 | #else |
564 | rxvt_warn ("running setuid/setgid without pty helper compiled in, continuing unprivileged.\n"); |
566 | rxvt_warn ("running setuid/setgid without pty helper compiled in, continuing unprivileged.\n"); |
565 | #endif |
567 | #endif |
566 | |
568 | |
567 | // drop privileges |
569 | // drop privileges |