Skip to content

Commit

Permalink
Issue 5356 - Update Cargo.lock and bootstrap PBKDF2-SHA512 (#5480)
Browse files Browse the repository at this point in the history
Description: We've changed our default password storage scheme to
PBKDF2-SHA512. Change the bootstrap logic to use the scheme when
Rust is enabled.

Related: #5356

Reviewed by: @mreynolds389 (Thanks!)
  • Loading branch information
droideck committed Oct 8, 2022
1 parent a929745 commit 41c8e41
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 80 deletions.
21 changes: 15 additions & 6 deletions ldap/servers/slapd/config.c
Expand Up @@ -40,16 +40,16 @@ char *rel2abspath(char *);
* see fedse.c instead!
*/
static char *bootstrap_plugins[] = {
"dn: cn=PBKDF2_SHA256,cn=Password Storage Schemes,cn=plugins,cn=config\n"
#ifdef RUST_ENABLE
"dn: cn=PBKDF2-SHA512,cn=Password Storage Schemes,cn=plugins,cn=config\n"
"objectclass: top\n"
"objectclass: nsSlapdPlugin\n"
"cn: PBKDF2_SHA256\n"
"nsslapd-pluginpath: libpwdstorage-plugin\n"
"nsslapd-plugininitfunc: pbkdf2_sha256_pwd_storage_scheme_init\n"
"cn: PBKDF2-SHA512\n"
"nsslapd-pluginpath: libpwdchan-plugin\n"
"nsslapd-plugininitfunc: pwdchan_pbkdf2_sha512_plugin_init\n"
"nsslapd-plugintype: pwdstoragescheme\n"
"nsslapd-pluginenabled: on",
"nsslapd-pluginenabled: on\n",

#ifdef RUST_ENABLE
"dn: cn=entryuuid_syntax,cn=plugins,cn=config\n"
"objectclass: top\n"
"objectclass: nsSlapdPlugin\n"
Expand All @@ -62,6 +62,15 @@ static char *bootstrap_plugins[] = {
"nsslapd-pluginVersion: none\n"
"nsslapd-pluginVendor: 389 Project\n"
"nsslapd-pluginDescription: entryuuid_syntax\n",
#else
"dn: cn=PBKDF2_SHA256,cn=Password Storage Schemes,cn=plugins,cn=config\n"
"objectclass: top\n"
"objectclass: nsSlapdPlugin\n"
"cn: PBKDF2_SHA256\n"
"nsslapd-pluginpath: libpwdstorage-plugin\n"
"nsslapd-plugininitfunc: pbkdf2_sha256_pwd_storage_scheme_init\n"
"nsslapd-plugintype: pwdstoragescheme\n"
"nsslapd-pluginenabled: on",
#endif

NULL
Expand Down
13 changes: 0 additions & 13 deletions ldap/servers/slapd/fedse.c
Expand Up @@ -256,19 +256,6 @@ static const char *internal_entries[] =
"nsslapd-pluginVersion: none\n"
"nsslapd-pluginVendor: 389 Project\n"
"nsslapd-pluginDescription: PBKDF2-SHA256\n",

"dn: cn=PBKDF2-SHA512,cn=Password Storage Schemes,cn=plugins,cn=config\n"
"objectclass: top\n"
"objectclass: nsSlapdPlugin\n"
"cn: PBKDF2-SHA512\n"
"nsslapd-pluginpath: libpwdchan-plugin\n"
"nsslapd-plugininitfunc: pwdchan_pbkdf2_sha512_plugin_init\n"
"nsslapd-plugintype: pwdstoragescheme\n"
"nsslapd-pluginenabled: on\n"
"nsslapd-pluginId: PBKDF2-SHA512\n"
"nsslapd-pluginVersion: none\n"
"nsslapd-pluginVendor: 389 Project\n"
"nsslapd-pluginDescription: PBKDF2-SHA512\n",
#endif
};

Expand Down
119 changes: 58 additions & 61 deletions src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 41c8e41

Please sign in to comment.