… | |
… | |
334 | } ttyconf; |
334 | } ttyconf; |
335 | |
335 | |
336 | void |
336 | void |
337 | rxvt_ptytty::privileges (rxvt_privaction action) |
337 | rxvt_ptytty::privileges (rxvt_privaction action) |
338 | { |
338 | { |
|
|
339 | if (tty < 0) |
|
|
340 | return; |
|
|
341 | |
339 | rxvt_privileges (RESTORE); |
342 | rxvt_privileges (RESTORE); |
340 | |
343 | |
341 | if (action == SAVE) |
344 | if (action == SAVE) |
342 | { |
345 | { |
343 | //next_tty_action = RESTORE; |
346 | //next_tty_action = RESTORE; |
… | |
… | |
345 | /* store original tty status for restoration rxvt_clean_exit () -- rgg 04/12/95 */ |
348 | /* store original tty status for restoration rxvt_clean_exit () -- rgg 04/12/95 */ |
346 | if (lstat (name, &savestat) < 0) /* you lose out */ |
349 | if (lstat (name, &savestat) < 0) /* you lose out */ |
347 | ;//next_tty_action = IGNORE; |
350 | ;//next_tty_action = IGNORE; |
348 | else |
351 | else |
349 | # endif |
352 | # endif |
350 | |
|
|
351 | { |
353 | { |
352 | chown (name, getuid (), ttyconf.gid); /* fail silently */ |
354 | chown (name, getuid (), ttyconf.gid); /* fail silently */ |
353 | chmod (name, ttyconf.mode); |
355 | chmod (name, ttyconf.mode); |
354 | # ifdef HAVE_REVOKE |
356 | # ifdef HAVE_REVOKE |
355 | revoke (name); |
357 | revoke (name); |
356 | # endif |
358 | # endif |
357 | |
|
|
358 | } |
359 | } |
359 | } |
360 | } |
360 | else |
361 | else |
361 | { /* action == RESTORE */ |
362 | { /* action == RESTORE */ |
362 | //next_tty_action = IGNORE; |
363 | //next_tty_action = IGNORE; |