uint32_t share_access = 0;
share_access_check(token,
- lp_servicename(talloc_tos(), snum),
+ lp_const_servicename(snum),
MAXIMUM_ALLOWED_ACCESS,
&share_access);
if ((share_access & (FILE_READ_DATA|FILE_WRITE_DATA)) == 0) {
/* No access, read or write. */
- DEBUG(3,("user %s connection to %s denied due to share "
+ DBG_NOTICE("user %s connection to %s denied due to share "
"security descriptor.\n",
session_info->unix_info->unix_name,
- lp_servicename(talloc_tos(), snum)));
+ lp_const_servicename(snum));
return NT_STATUS_ACCESS_DENIED;
}
!(share_access & FILE_WRITE_DATA)) {
/* smb.conf allows r/w, but the security descriptor denies
* write. Fall back to looking at readonly. */
- readonly_share = True;
- DEBUG(5,("falling back to read-only access-evaluation due to "
- "security descriptor\n"));
+ readonly_share = true;
+ DBG_INFO("falling back to read-only access-evaluation due to "
+ "security descriptor\n");
}
*p_share_access = share_access;
ok = check_user_ok(conn, vuid, session_info, snum);
if (!ok) {
- DEBUG(2,("SMB user %s (unix user %s) "
+ DBG_WARNING("SMB user %s (unix user %s) "
"not permitted access to share %s.\n",
session_info->unix_info->sanitized_username,
session_info->unix_info->unix_name,
- lp_servicename(talloc_tos(), snum)));
+ lp_const_servicename(snum));
return false;
}
vuser = get_valid_user_struct(conn->sconn, vuid);
if (vuser == NULL) {
/* Invalid vuid sent */
- DEBUG(2,("Invalid vuid %llu used on share %s.\n",
- (unsigned long long)vuid, lp_servicename(talloc_tos(),
- snum)));
+ DBG_WARNING("Invalid vuid %llu used on share %s.\n",
+ (unsigned long long)vuid,
+ lp_const_servicename(snum));
return false;
}