OSSP CVS Repository

ossp - Difference in ossp-pkg/sa/sa.c versions 1.17 and 1.18
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/sa/sa.c 1.17 -> 1.18

--- sa.c 2001/10/09 14:58:22     1.17
+++ sa.c 2001/10/09 18:26:12     1.18
@@ -481,8 +481,6 @@
     if (strncmp(uri, "unix:", 5) == 0) {
         /* parse URI */
         cpPath = uri+5;
-        if (cpPath[0] != '/')
-            return SA_ERR_ARG;
 
         /* mandatory(!) socket address structure initialization */
         memset(&un, 0, sizeof(un));
@@ -491,6 +489,13 @@
         n = strlen(cpPath);
         if ((n+1) > sizeof(un.sun_path))
             return SA_ERR_MEM;
+        if (cpPath[0] != '/') {
+            if (getcwd(un.sun_path, sizeof(un.sun_path)-(n+1)) == NULL)
+                return SA_ERR_MEM;
+            cp = un.sun_path + strlen(un.sun_path);
+        }
+        else
+            cp = un.sun_path;
         memcpy(un.sun_path, cpPath, n+1);
         un.sun_family = AF_LOCAL;
 

CVSTrac 2.0.1