Skip to content

Commit

Permalink
Disble futimes() calls in hopes of fixing #122
Browse files Browse the repository at this point in the history
This should keep sudo from thinking that the tty has changed as part of its tty_tickets feature.
  • Loading branch information
ridiculousfish committed Jun 16, 2012
1 parent 6dd0013 commit 1d54bff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,10 @@ static int room_for_usec(struct stat *st)
static void s_save_status( screen_t *s)
{

// PCA Let's not do this futimes stuff, because sudo dumbly uses the
// tty's ctime as part of its tty_tickets feature
// Disabling this should fix https://github.com/fish-shell/fish-shell/issues/122
#if 0
/*
This futimes call tries to trick the system into using st_mtime
as a tampering flag. This of course only works on systems where
Expand Down Expand Up @@ -354,6 +358,7 @@ static void s_save_status( screen_t *s)
*/
futimes( 1, t );
futimes( 2, t );
#endif

fstat( 1, &s->prev_buff_1 );
fstat( 2, &s->prev_buff_2 );
Expand Down

0 comments on commit 1d54bff

Please sign in to comment.