mirror of
https://git.freebsd.org/ports.git
synced 2025-05-29 09:26:27 -04:00
- Allow to use GNU dbm for storage of virtual password tables - Define LICENSE and install the usual set of documentation files - Remove useless .if defined(PREFIX) check added back in r205864 Reported by: pkg-fallout
14 lines
646 B
C++
14 lines
646 B
C++
--- lib/vpwtable/gdbm_put.cc.orig 2002-11-20 15:54:44 UTC
|
|
+++ lib/vpwtable/gdbm_put.cc
|
|
@@ -25,9 +25,9 @@ bool vpwtable::put(const vpwentry* vpw, bool onlyadd)
|
|
if(!db)
|
|
return false;
|
|
mystring name = vpw->name.lower();
|
|
- datum key = { (char*)name.c_str(), name.length() };
|
|
+ datum key = { (char*)name.c_str(), static_cast<int>(name.length()) };
|
|
mystring binary = vpw->to_record();
|
|
- datum data = { (char*)binary.c_str(), binary.length() };
|
|
+ datum data = { (char*)binary.c_str(), static_cast<int>(binary.length()) };
|
|
bool result = gdbm_store(db, key, data,
|
|
onlyadd ? GDBM_INSERT : GDBM_REPLACE) == 0;
|
|
gdbm_close(db);
|