Index: ossp-pkg/sa/TODO RCS File: /v/ossp/cvs/ossp-pkg/sa/TODO,v rcsdiff -q -kk '-r1.14' '-r1.15' -u '/v/ossp/cvs/ossp-pkg/sa/TODO,v' 2>/dev/null --- TODO 2001/10/08 15:17:47 1.14 +++ TODO 2001/10/09 18:26:12 1.15 @@ -10,7 +10,6 @@ SA_BUFFER_KREAD SA_BUFFER_KWRITE SA_BUFFER_WRITEF -- support for relative pathnames in unix:path - test suite: - inet://0.0.0.0:0 -> inet://0.0.0.0:514 Index: ossp-pkg/sa/sa.c RCS File: /v/ossp/cvs/ossp-pkg/sa/sa.c,v rcsdiff -q -kk '-r1.17' '-r1.18' -u '/v/ossp/cvs/ossp-pkg/sa/sa.c,v' 2>/dev/null --- 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;