Subject: mkpasswd: problem with (UNC-)paths including dollar sign
From: Ronny Buchmann <[email-masked]>
To: [email-masked]
Date: Mon, 2 Jul 2001 14:52:09 +0200

hi

mkpasswd has a problem with special paths like \\server\user$
it seems that windows quotes the $ with $ (so it gives $$)

below is a patch which changes the behaviour of mkpasswd, but it probably has to be fixed elsewhere
(it does of course only work with mkpasswd -m)

$ diff -up mkpasswd.c.orig mkpasswd.c
--- mkpasswd.c.orig     Mon Jul  2 11:35:07 2001
+++ mkpasswd.c  Mon Jul  2 12:19:07 2001
@@ -83,6 +83,11 @@ psx_dir (char *in, char *out)
     {
       if (*in == '\\')
        *out = '/';
+      else if (*in == '$')
+        if (*(in+1) == '$')
+          *out = '$';
+        else
+          out--;
       else
        *out = *in;
       in++;

-- 
thanks
ronny

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/