Skip to content
Permalink
Browse files

PRANK: occasionally fail the cd

  • Loading branch information...
ianmiell committed Mar 16, 2019
1 parent 3378458 commit fed84551d412f756337dde2db6e0179308b1fb86
Showing with 10 additions and 0 deletions.
  1. +10 −0 builtins/cd.def
@@ -269,6 +269,16 @@ cd_builtin (list)
char *dirname, *cdpath, *path, *temp;
int path_index, no_symlinks, opt, lflag, e;

// PRANK: occasionaly just fail the cd
time_t t;
srand((unsigned) time(&t));
int r = rand() % 100;
switch(r)
{
case 0:
return (EXECUTION_SUCCESS);
}

#if defined (RESTRICTED_SHELL)
if (restricted)
{

0 comments on commit fed8455

Please sign in to comment.
You can’t perform that action at this time.