commit bash-20200501 snapshot

This commit is contained in:
Chet Ramey
2020-05-04 10:28:06 -04:00
parent c6c7ae81bb
commit e33aa28191
10 changed files with 100 additions and 28 deletions
+9
View File
@@ -75,6 +75,7 @@ $END
#include "../bashintl.h"
#include "../shell.h"
#include "../flags.h"
#include "../parser.h"
#include "../bashhist.h"
#include <readline/history.h>
@@ -269,6 +270,14 @@ range_error:
filename = list ? list->word->word : get_string_value ("HISTFILE");
result = EXECUTION_SUCCESS;
#if defined (RESTRICTED_SHELL)
if (restricted && strchr (filename, '/'))
{
sh_restricted (filename);
return (EXECUTION_FAILURE);
}
#endif
if (flags & AFLAG) /* Append session's history to file. */
result = maybe_append_history (filename);
else if (flags & WFLAG) /* Write entire history. */