mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-31 15:33:37 +02:00
commit bash-20200501 snapshot
This commit is contained in:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user