From: Adam Dickmeiss Date: Mon, 29 Oct 2007 09:16:32 +0000 (+0000) Subject: Extended auth command so that NULL User, pass may be set. X-Git-Tag: YAZ.3.0.16~39 X-Git-Url: http://lists.indexdata.com/cgi-bin?a=commitdiff_plain;h=c80d8f1c0245de69917debe3e918532491b87fac;p=yaz-moved-to-github.git Extended auth command so that NULL User, pass may be set. This is to solve bug #1820. --- diff --git a/client/client.c b/client/client.c index 59c48a0..53c241b 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2007, Index Data ApS * See the file LICENSE for details. * - * $Id: client.c,v 1.351 2007-08-24 13:25:14 adam Exp $ + * $Id: client.c,v 1.352 2007-10-29 09:16:32 adam Exp $ */ /** \file client.c * \brief yaz-client program @@ -844,8 +844,8 @@ int cmd_authentication(const char *arg) au.which = Z_IdAuthentication_idPass; au.u.idPass = &idPass; idPass.groupId = NULL; - idPass.userId = user; - idPass.password = group; + idPass.userId = !strcmp(user, "-") ? 0 : user; + idPass.password = !strcmp(group, "-") ? 0 : group; printf("Authentication set to User (%s), Pass (%s)\n", user, group); } if (r == 3)