! Test that socket directory exists and is a directory * \Return * \li 1 on success * \li 0 on failure * \bug Does not check permissions or that it's a symbolic link * to another directory. */
| 52 | * to another directory. |
| 53 | */ |
| 54 | int tst_dir(char *dir) |
| 55 | { |
| 56 | char *dirtest; |
| 57 | int ret = 0; |
| 58 | |
| 59 | /* test for a directory */ |
| 60 | dirtest = dStrconcat(dir, "/", NULL); |
| 61 | if (access(dirtest, F_OK) == -1) { |
| 62 | ERRMSG("tst_dir", "access", errno); |
| 63 | MSG_ERR(" - %s\n", dirtest); |
| 64 | } else { |
| 65 | ret = 1; |
| 66 | } |
| 67 | dFree(dirtest); |
| 68 | |
| 69 | return ret; |
| 70 | } |
| 71 | |
| 72 | /*! Create socket directory |
| 73 | * \Return |
no test coverage detected