Index: kpw.d/kpw.c ================================================================== --- kpw.d/kpw.c +++ kpw.d/kpw.c @@ -6,10 +6,15 @@ * - D_CLIPBOARD enables kpw to automatically * copy passwords to the clipboard. it does * this by attempting to execute a sequence * of binaries, and then writing the password * to STDIN of the binary that succeeds. + * - D_SAVEKEY enables kpw to store the database + * key in persistent memory between invocations, + * leading to quicker decryption and access + * times. only available on systems with SYSV + * shared memory. * ? generates passwords * → kpw is unlikely to be portable to non-POSIX * systems, but should run fine on Linux as well * as BSDs with getrandom() support. * → kpw has the following dependencies: @@ -809,11 +814,11 @@ bad d; if((d = dbnext(db, &rec, ctlen, pub, priv, ctbuf, ptbuf)) != ok) return d; - if(strncmp(target, rec.acct.ptr, rec.acct.len) == 0) { + if(strlen(target) == rec.acct.len && strncmp(target, rec.acct.ptr, rec.acct.len) == 0) { /* found a matching record; determine * what to do to the fucker */ alert(a_debug, "found target record"); found = true; if (op == delpw) continue; Index: makerules ================================================================== --- makerules +++ makerules @@ -19,14 +19,10 @@ sc-post = $(post) mc-post = $(post) os = $(shell uname -o) -ifeq ($(os),Android) - l-shmem = -landroid-shmem -endif - %: %.c $(cc) $< -o$@ $(cc-post) %: %.ml $(mc) $< -o $@ $(mc-post)