diff options
author | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> | 2008-05-16 15:08:31 -0400 |
---|---|---|
committer | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> | 2008-05-16 15:08:31 -0400 |
commit | 956a85c69a76ed595f08223a208dca9ef47606bd (patch) | |
tree | 05a3f07cd99be76107aa0c87b49d820d88707e5d /src/nis.c | |
parent | 5298ebf02a99d54271c10a5bf333bbba58bbc4af (diff) | |
download | slapi-nis-956a85c69a76ed595f08223a208dca9ef47606bd.tar.gz slapi-nis-956a85c69a76ed595f08223a208dca9ef47606bd.tar.xz slapi-nis-956a85c69a76ed595f08223a208dca9ef47606bd.zip |
- switch to using virtual attributes
- read the name of the master for a map from "cn=config"'s nsslapd-localhost
attribute, which is a virtual attribute
Diffstat (limited to 'src/nis.c')
-rw-r--r-- | src/nis.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -285,11 +285,15 @@ nis_master(struct plugin_state *state, struct ypresp_master *reply_master) { struct ypreq_nokey req_nokey; + const char *master; memset(&req_nokey, 0, sizeof(req_nokey)); memset(reply_master, 0, sizeof(*reply_master)); if (xdr_ypreq_nokey(request_xdrs, &req_nokey)) { reply_master->status = YP_TRUE; - reply_master->master = "me, right here"; /* XXX */ + if (map_master_name(state, &master) != 0) { + master = "localhost"; + } + reply_master->master = (char *) master; slapi_log_error(SLAPI_LOG_PLUGIN, state->plugin_desc->spd_id, "master(%s/%s) -> %s\n", |