mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-11-30 11:47:47 +01:00
commit bash-20200501 snapshot
This commit is contained in:
1 parent
c6c7ae81bb
commit
e33aa28191
10 files changed
+100
-28
No files matched your search
@@ -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