Lines Matching refs:path

45 smb_is_executable(char *path)
48 int len = strlen(path);
50 if ((len >= 4) && (path[len - 4] == '.')) {
51 (void) strcpy(extension, &path[len - 3]);
73 * smb_pathname_reduce() takes a path and returns the smb_node for the
74 * second-to-last component of the path. It also returns the name of the last
89 * *path (in)
97 * (e.g. the call from smbsr_setup_share()). (Such callers will have path
112 * Directory for the penultimate component of the original path.
122 * The last component of the path. (This may be different from the name of any
128 * The CIFS server lookup path needs to have logic equivalent to that of
147 const char *path,
181 if (path == NULL)
184 if (*path == '\0')
189 len = strlcpy(usepath, path, SMB_MAXPATHLEN);
265 * If a path does not have a trailing slash, strip off the
294 * Note that we disregard whether the traversal of the path went
335 * If any component but the last in the path is not found, ENOTDIR instead of
358 smb_pathname(smb_request_t *sr, char *path, int flags,
374 if (path == NULL)
388 if ((err = pn_set(&upn, path)) != 0) {
620 * path - non mangled path needed to be looked up from the startvp
623 * returns the vnode found when starting at startvp and using the path
625 * Finds a vnode starting at startvp and parsing the non mangled path
629 smb_lookuppathvptovp(smb_request_t *sr, char *path, vnode_t *startvp,
641 if (pn_set(&pn, path) == 0) {
660 * Parse path: pname\\fname:sname:stype
674 smb_pathname_init(smb_request_t *sr, smb_pathname_t *pn, char *path)
680 pn->pn_path = smb_pathname_strdup(sr, path);
755 /* treat empty path as "\\" */
818 * Convert any path with share name "C$" or "c$" (Admin share) in to lower case.
872 * - If first component of pn->path is ".." -> PATH_SYNTAX_BAD
891 char *path = pn->pn_path;
894 path += strspn(path, "\\");
896 /* If first component of path is ".." -> PATH_SYNTAX_BAD */
897 if ((strcmp(path, "..") == 0) || (strncmp(path, "..\\", 3) == 0)) {
925 * Very basic directory name validation: checks for colons in a path.
935 char *path = pn->pn_path;
937 if ((name = path) != 0) {
985 * smb_stream_parse_name should only be called for a path that
989 * Find the last component of path and split it into filename
997 smb_stream_parse_name(char *path, char *filename, char *stream)
1001 ASSERT(path);
1005 fname = strrchr(path, '\\');
1006 fname = (fname == NULL) ? path : fname + 1;
1023 * Determines if 'path' specifies a named stream.
1025 * path is a NULL terminated string which could be a stream path.
1028 * - If there is no colon in the path or it's the last char
1035 smb_is_stream_name(char *path)
1039 if (path == NULL)
1042 colonp = strchr(path, ':');
1046 if (strstr(path, "::"))
1056 * - the path is not a stream name
1057 * - a path is specified but the fname is ommitted.
1097 * valid DFS I/O path:
1100 * \server-or-domain\share\path
1106 smb_pathname_dfs_preprocess(smb_request_t *sr, char *path, size_t pathsz)
1115 if ((rc = smb_unc_init(path, &unc)) != 0)
1124 (void) snprintf(path, pathsz, "/%s", (linkpath) ? linkpath : "");