about summary refs log tree commit diff
path: root/Src/Modules/db_gdbm.c
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2022-06-21 17:58:57 -0700
committerBart Schaefer <schaefer@zsh.org>2022-06-21 17:58:57 -0700
commitf7441b46456c3acee4a2bd500b8f6409c70f33a8 (patch)
treed2f517643aafeb32e775df079c9cc5dd3a447365 /Src/Modules/db_gdbm.c
parent123497b78e850b845d2054303612c25bccb887e3 (diff)
downloadzsh-f7441b46456c3acee4a2bd500b8f6409c70f33a8.tar.gz
zsh-f7441b46456c3acee4a2bd500b8f6409c70f33a8.tar.xz
zsh-f7441b46456c3acee4a2bd500b8f6409c70f33a8.zip
50368: adjust ztie'd bitflags so local variables cannot mess with database
Diffstat (limited to 'Src/Modules/db_gdbm.c')
-rw-r--r--Src/Modules/db_gdbm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Src/Modules/db_gdbm.c b/Src/Modules/db_gdbm.c
index 7e11ec939..3fefd412b 100644
--- a/Src/Modules/db_gdbm.c
+++ b/Src/Modules/db_gdbm.c
@@ -34,8 +34,8 @@
 #include "db_gdbm.mdh"
 #include "db_gdbm.pro"
 
-#ifndef PM_UPTODATE
-#define PM_UPTODATE     (1<<19) /* Parameter has up-to-date data (e.g. loaded from DB) */
+#ifndef PM_UPTODATE /* Parameter has up-to-date data (e.g. loaded from DB) */
+#define PM_UPTODATE     PM_DONTIMPORT_SUID	/* Safe PM_ bit to re-use */
 #endif
 
 static Param createhash( char *name, int flags );
@@ -111,7 +111,7 @@ bin_ztie(char *nam, char **args, Options ops, UNUSED(int func))
     struct gsu_scalar_ext *dbf_carrier;
     char *resource_name, *pmname;
     GDBM_FILE dbf = NULL;
-    int read_write = GDBM_SYNC, pmflags = PM_REMOVABLE;
+    int read_write = GDBM_SYNC, pmflags = PM_REMOVABLE|PM_SINGLE;
     Param tied_param;
 
     if(!OPT_ISSET(ops,'d')) {