freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Proposed patch to datacopy to allow passwords to be read from stdin
- From: Frediano Ziglio <freddy77 AT gmail.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Proposed patch to datacopy to allow passwords to be read from stdin
- Date: Tue, 11 Sep 2012 09:21:06 +0100
2012/9/11 James K. Lowden <jklowden AT freetds.org>:
> On Mon, 10 Sep 2012 18:19:26 +0100
> Frediano Ziglio <freddy77 AT gmail.com> wrote:
>
>> If I remember just using empty username and password will do so just
>> replacing strtok with strsep should work.
>
> strtok(3) is standard and OK to use here. Command-line parsing isn't
> re-entrant or multithreaded.
>
Well, you could use strtok_r if you just need re-entrancy and
multihreading. However there is another difference between strtok and
strsep. If you try to split a string like "a//b" with "/" with strtok
you get "a", "b" while with strsep you get "a", "", "b". So passing
server/username/password if username and password are empty (something
like "server//") with strsep you get empty username and password (that
is Kerberos!).
Frediano
-
Re: [freetds] Proposed patch to datacopy to allow passwords to be read from stdin,
Frediano Ziglio, 09/07/2012
-
Re: [freetds] Proposed patch to datacopy to allow passwords to be read from stdin,
James K. Lowden, 09/09/2012
-
Re: [freetds] Proposed patch to datacopy to allow passwords to be read from stdin,
Frediano Ziglio, 09/09/2012
-
Re: [freetds] Proposed patch to datacopy to allow passwords to be read from stdin,
James K. Lowden, 09/09/2012
-
Re: [freetds] Proposed patch to datacopy to allow passwords to be read from stdin,
Frediano Ziglio, 09/10/2012
-
Re: [freetds] Proposed patch to datacopy to allow passwords to be read from stdin,
James K. Lowden, 09/10/2012
- Re: [freetds] Proposed patch to datacopy to allow passwords to be read from stdin, Frediano Ziglio, 09/11/2012
-
Re: [freetds] Proposed patch to datacopy to allow passwords to be read from stdin,
James K. Lowden, 09/10/2012
-
Re: [freetds] Proposed patch to datacopy to allow passwords to be read from stdin,
Frediano Ziglio, 09/10/2012
-
Re: [freetds] Proposed patch to datacopy to allow passwords to be read from stdin,
James K. Lowden, 09/09/2012
-
Re: [freetds] Proposed patch to datacopy to allow passwords to be read from stdin,
Frediano Ziglio, 09/09/2012
-
Re: [freetds] Proposed patch to datacopy to allow passwords to be read from stdin,
James K. Lowden, 09/09/2012
Archive powered by MHonArc 2.6.24.