SECURITY: make “unset HISTFILE” really work
additionally, make “HISTFILE=” the same, document the truncation and re-reading process’ further and already-known bugs; this needs work
This commit is contained in:
7
var.c
7
var.c
@@ -28,7 +28,7 @@
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.186 2015/02/06 10:56:49 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.187 2015/03/07 20:46:31 tg Exp $");
|
||||
|
||||
/*-
|
||||
* Variables
|
||||
@@ -1351,6 +1351,11 @@ unsetspec(struct tbl *vp)
|
||||
*/
|
||||
|
||||
switch (special(vp->name)) {
|
||||
#if HAVE_PERSISTENT_HISTORY
|
||||
case V_HISTFILE:
|
||||
sethistfile(NULL);
|
||||
return;
|
||||
#endif
|
||||
case V_IFS:
|
||||
setctypes(TC_IFSWS, C_IFS);
|
||||
ifs0 = ' ';
|
||||
|
||||
Reference in New Issue
Block a user