/*
- * $OpenBSD: login_ldap.c,v 1.2 2020/09/12 17:14:23 martijn Exp $
+ * $OpenBSD: login_ldap.c,v 1.3 2021/09/02 20:57:58 deraadt Exp $
* Copyright (c) 2002 Institute for Open Systems Technology Australia (IFOST)
* Copyright (c) 2007 Michael Erdely <merdely@openbsd.org>
* Copyright (c) 2019 Martijn van Duren <martijn@openbsd.org>
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
+#include <limits.h>
#include <unistd.h>
#include <login_cap.h>
#include <stdarg.h>
usage();
}
- if (strlen(username) >= MAXLOGNAME) {
+ if (strlen(username) >= LOGIN_NAME_MAX) {
dlog(0, "username too long");
return 1;
}
/*
- * $OpenBSD: util.c,v 1.2 2020/09/14 08:00:57 martijn Exp $
+ * $OpenBSD: util.c,v 1.3 2021/09/02 20:57:58 deraadt Exp $
* Copyright (c) 2002 Institute for Open Systems Technology Australia (IFOST)
* Copyright (c) 2007 Michael Erdely <merdely@openbsd.org>
* Copyright (c) 2019 Martijn van Duren <martijn@openbsd.org>
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/param.h>
+
#include <sys/socket.h>
#include <limits.h>
#include <sys/time.h>
parse_filter(struct auth_ctx *ctx, const char *str)
{
char tmp[PATH_MAX];
- char hostname[MAXHOSTNAMELEN];
+ char hostname[HOST_NAME_MAX+1];
const char *p;
char *q;