diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ypldap/ldapclient.c | 10 | ||||
-rw-r--r-- | usr.sbin/ypldap/yp.c | 16 | ||||
-rw-r--r-- | usr.sbin/ypldap/ypldap.c | 4 | ||||
-rw-r--r-- | usr.sbin/ypldap/ypldap_dns.c | 4 |
4 files changed, 17 insertions, 17 deletions
diff --git a/usr.sbin/ypldap/ldapclient.c b/usr.sbin/ypldap/ldapclient.c index 4b21803ab19..02cd4616acf 100644 --- a/usr.sbin/ypldap/ldapclient.c +++ b/usr.sbin/ypldap/ldapclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ldapclient.c,v 1.36 2016/04/10 09:59:21 jmatthew Exp $ */ +/* $OpenBSD: ldapclient.c,v 1.37 2016/11/29 17:15:27 mestre Exp $ */ /* * Copyright (c) 2008 Alexander Schrijver <aschrijver@openbsd.org> @@ -362,7 +362,7 @@ ldapclient(int pipe_main2client[2]) return (pid); } - bzero(&env, sizeof(env)); + memset(&env, 0, sizeof(env)); TAILQ_INIT(&env.sc_idms); if ((pw = getpwnam(YPLDAP_USER)) == NULL) @@ -439,7 +439,7 @@ client_build_req(struct idm *idm, struct idm_req *ir, struct aldap_message *m, char **ldap_attrs; int i, k; - bzero(ir, sizeof(*ir)); + memset(ir, 0, sizeof(*ir)); for (i = min_attr; i < max_attr; i++) { if (idm->idm_flags & F_FIXED_ATTR(i)) { if (strlcat(ir->ir_line, idm->idm_attrs[i], @@ -598,7 +598,7 @@ client_try_idm(struct env *env, struct idm *idm) aldap_freemsg(m); } - bzero(attrs, sizeof(attrs)); + memset(attrs, 0, sizeof(attrs)); for (i = 0, j = 0; i < ATTR_MAX; i++) { if (idm->idm_flags & F_FIXED_ATTR(i)) continue; @@ -615,7 +615,7 @@ client_try_idm(struct env *env, struct idm *idm) idm->idm_filters[FILTER_USER], 0, ATTR_MAX, IMSG_PW_ENTRY) == -1) goto bad; - bzero(attrs, sizeof(attrs)); + memset(attrs, 0, sizeof(attrs)); for (i = ATTR_GR_MIN, j = 0; i < ATTR_GR_MAX; i++) { if (idm->idm_flags & F_FIXED_ATTR(i)) continue; diff --git a/usr.sbin/ypldap/yp.c b/usr.sbin/ypldap/yp.c index 349b04b6855..c17e1bca67f 100644 --- a/usr.sbin/ypldap/yp.c +++ b/usr.sbin/ypldap/yp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: yp.c,v 1.17 2016/01/24 08:33:27 matthieu Exp $ */ +/* $OpenBSD: yp.c,v 1.18 2016/11/29 17:15:27 mestre Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> * @@ -342,7 +342,7 @@ ypproc_match_2_svc(ypreq_key *arg, struct svc_req *req) log_debug("argument too long"); return (NULL); } - bzero(key, sizeof(key)); + memset(key, 0, sizeof(key)); (void)strncpy(key, arg->key.keydat_val, arg->key.keydat_len); if (strcmp(arg->map, "passwd.byname") == 0 || @@ -486,7 +486,7 @@ ypproc_next_2_svc(ypreq_key *arg, struct svc_req *req) if (strcmp(arg->map, "passwd.byname") == 0 || strcmp(arg->map, "master.passwd.byname") == 0) { - bzero(key, sizeof(key)); + memset(key, 0, sizeof(key)); (void)strncpy(key, arg->key.keydat_val, arg->key.keydat_len); ukey.ue_line = key; @@ -517,7 +517,7 @@ ypproc_next_2_svc(ypreq_key *arg, struct svc_req *req) } else if (strcmp(arg->map, "group.byname") == 0) { - bzero(key, sizeof(key)); + memset(key, 0, sizeof(key)); (void)strncpy(key, arg->key.keydat_val, arg->key.keydat_len); @@ -567,7 +567,7 @@ ypproc_master_2_svc(ypreq_nokey *arg, struct svc_req *req) static struct ypresp_master res; static char master[YPMAXPEER + 1]; - bzero(&res, sizeof(res)); + memset(&res, 0, sizeof(res)); if (yp_valid_domain(arg->domain, (struct ypresp_val *)&res) == -1) return (&res); if (gethostname(master, sizeof(master)) == 0) { @@ -618,7 +618,7 @@ yp_make_val(struct ypresp_val *res, char *line, int replacecolon) { static char buf[LINE_WIDTH]; - bzero(buf, sizeof(buf)); + memset(buf, 0, sizeof(buf)); if (replacecolon) line[strlen(line)] = ':'; @@ -638,8 +638,8 @@ yp_make_keyval(struct ypresp_key_val *res, char *key, char *line) static char keybuf[YPMAXRECORD+1]; static char buf[LINE_WIDTH]; - bzero(keybuf, sizeof(keybuf)); - bzero(buf, sizeof(buf)); + memset(keybuf, 0, sizeof(keybuf)); + memset(buf, 0, sizeof(buf)); (void)strlcpy(keybuf, key, sizeof(keybuf)); res->key.keydat_len = strlen(keybuf); diff --git a/usr.sbin/ypldap/ypldap.c b/usr.sbin/ypldap/ypldap.c index 1da7da77e9f..c478532bf80 100644 --- a/usr.sbin/ypldap/ypldap.c +++ b/usr.sbin/ypldap/ypldap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ypldap.c,v 1.19 2016/04/28 22:28:36 schwarze Exp $ */ +/* $OpenBSD: ypldap.c,v 1.20 2016/11/29 17:15:27 mestre Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -610,7 +610,7 @@ main(int argc, char *argv[]) if (pledge("stdio inet", NULL) == -1) fatal("pledge"); - bzero(&tv, sizeof(tv)); + memset(&tv, 0, sizeof(tv)); evtimer_set(&ev_timer, main_init_timer, &env); evtimer_add(&ev_timer, &tv); diff --git a/usr.sbin/ypldap/ypldap_dns.c b/usr.sbin/ypldap/ypldap_dns.c index ced711a67c2..f92b0537cc4 100644 --- a/usr.sbin/ypldap/ypldap_dns.c +++ b/usr.sbin/ypldap/ypldap_dns.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ypldap_dns.c,v 1.11 2016/04/10 09:59:21 jmatthew Exp $ */ +/* $OpenBSD: ypldap_dns.c,v 1.12 2016/11/29 17:15:27 mestre Exp $ */ /* * Copyright (c) 2003-2008 Henning Brauer <henning@openbsd.org> @@ -213,7 +213,7 @@ host_dns(const char *s, struct ypldap_addr_list *hn) struct sockaddr_in6 *sa_in6; struct ypldap_addr *h; - bzero(&hints, sizeof(hints)); + memset(&hints, 0, sizeof(hints)); hints.ai_family = PF_UNSPEC; hints.ai_socktype = SOCK_DGRAM; /* DUMMY */ error = getaddrinfo(s, NULL, &hints, &res0); |