share_name,
now, &tcon);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0,("make_connection_smb1: Couldn't find free tcon for [%s] - %s\n",
- share_name, nt_errstr(status)));
+ DBG_ERR("Couldn't find free tcon for [%s] - %s\n",
+ share_name,
+ nt_errstr(status));
TALLOC_FREE(share_name);
*pstatus = status;
return NULL;
if (!conn) {
TALLOC_FREE(tcon);
- DEBUG(0,("make_connection_smb1: Couldn't find free connection.\n"));
+ DBG_ERR("Couldn't find free connection.\n");
*pstatus = NT_STATUS_INSUFFICIENT_RESOURCES;
return NULL;
}
/* This must ONLY BE CALLED AS ROOT. As it exits this function as
* root. */
if (!non_root_mode() && (euid = geteuid()) != 0) {
- DEBUG(0,("make_connection: PANIC ERROR. Called as nonroot "
- "(%u)\n", (unsigned int)euid ));
+ DBG_ERR("PANIC ERROR. Called as nonroot (%u)\n",
+ (unsigned int)euid);
smb_panic("make_connection: PANIC ERROR. Called as nonroot\n");
}
}
if (session == NULL) {
- DEBUG(1,("make_connection: refusing to connect with "
- "no session setup\n"));
+ DBG_WARNING("refusing to connect with no session setup\n");
*status = NT_STATUS_ACCESS_DENIED;
return NULL;
}
if (strequal(service_in,HOMES_NAME)) {
if (session->homes_snum == -1) {
- DEBUG(2, ("[homes] share not available for "
- "this user because it was not found "
- "or created at session setup "
- "time\n"));
+ DBG_NOTICE("[homes] share not available for "
+ "this user because it was not found "
+ "or created at session setup "
+ "time\n");
*status = NT_STATUS_BAD_NETWORK_NAME;
return NULL;
}
- DEBUG(5, ("making a connection to [homes] service "
- "created at session setup time\n"));
+ DBG_INFO("making a connection to [homes] service "
+ "created at session setup time\n");
return make_connection_smb1(req, now,
session->homes_snum,
dev, status);
} else if ((session->homes_snum != -1)
&& strequal(service_in,
lp_const_servicename(session->homes_snum))) {
- DEBUG(5, ("making a connection to 'homes' service [%s] "
- "created at session setup time\n", service_in));
+ DBG_INFO("making a connection to 'homes' service [%s] "
+ "created at session setup time\n",
+ service_in);
return make_connection_smb1(req, now,
session->homes_snum,
dev, status);
}
if (!strlower_m(service)) {
- DEBUG(2, ("strlower_m %s failed\n", service));
+ DBG_NOTICE("strlower_m %s failed\n", service);
*status = NT_STATUS_INVALID_PARAMETER;
return NULL;
}
if (snum < 0) {
if (strequal(service,"IPC$") ||
(lp_enable_asu_support() && strequal(service,"ADMIN$"))) {
- DEBUG(3,("refusing IPC connection to %s\n", service));
+ DBG_NOTICE("refusing IPC connection to %s\n", service);
*status = NT_STATUS_ACCESS_DENIED;
return NULL;
}
- DEBUG(3,("%s (%s) couldn't find service %s\n",
- get_remote_machine_name(),
- tsocket_address_string(
- sconn->remote_address, talloc_tos()),
- service));
+ DBG_NOTICE("%s (%s) couldn't find service %s\n",
+ get_remote_machine_name(),
+ tsocket_address_string(sconn->remote_address,
+ talloc_tos()),
+ service);
*status = NT_STATUS_BAD_NETWORK_NAME;
return NULL;
}
/* Handle non-Dfs clients attempting connections to msdfs proxy */
if (lp_host_msdfs() && (*lp_msdfs_proxy(talloc_tos(), lp_sub, snum) != '\0')) {
- DEBUG(3, ("refusing connection to dfs proxy share '%s' "
- "(pointing to %s)\n",
- service, lp_msdfs_proxy(talloc_tos(), lp_sub, snum)));
+ DBG_NOTICE("refusing connection to dfs proxy share '%s' "
+ "(pointing to %s)\n",
+ service,
+ lp_msdfs_proxy(talloc_tos(), lp_sub, snum));
*status = NT_STATUS_BAD_NETWORK_NAME;
return NULL;
}
- DEBUG(5, ("making a connection to 'normal' service %s\n", service));
+ DBG_INFO("making a connection to 'normal' service %s\n", service);
return make_connection_smb1(req, now, snum,
dev, status);
size_t fixed_portion;
NTSTATUS status = NT_STATUS_OK;
- DEBUG(3,("call_trans2qfilepathinfo %s (%s) level=%d call=%d "
- "total_data=%d\n", smb_fname_str_dbg(smb_fname),
- fsp_fnum_dbg(fsp),
- info_level,tran_call,total_data));
+ DBG_NOTICE("%s (%s) level=%" PRIu16 " call=%d total_data=%d\n",
+ smb_fname_str_dbg(smb_fname),
+ fsp_fnum_dbg(fsp),
+ info_level,
+ tran_call,
+ total_data);
/* Pull out any data sent here before we realloc. */
switch (info_level) {
ea_size = IVAL(pdata,0);
if (total_data > 0 && ea_size != total_data) {
- DEBUG(4,("call_trans2qfilepathinfo: Rejecting EA request with incorrect \
-total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pdata,0) ));
+ DBG_NOTICE("Rejecting EA request with "
+ "incorrect total_data=%d "
+ "(should be %" PRIu32 ")\n",
+ total_data,
+ ea_size);
reply_nterror(
req, NT_STATUS_INVALID_PARAMETER);
return;
entry_id = SMB_ACL_NEXT_ENTRY;
if (sys_acl_get_tag_type(entry, &tagtype) == -1) {
- DEBUG(0,("marshall_posix_acl: SMB_VFS_SYS_ACL_GET_TAG_TYPE failed.\n"));
+ DBG_ERR("SMB_VFS_SYS_ACL_GET_TAG_TYPE failed.\n");
return False;
}
if (sys_acl_get_permset(entry, &permset) == -1) {
- DEBUG(0,("marshall_posix_acl: SMB_VFS_SYS_ACL_GET_PERMSET failed.\n"));
+ DBG_ERR("SMB_VFS_SYS_ACL_GET_PERMSET failed.\n");
return False;
}
{
uid_t *puid = (uid_t *)sys_acl_get_qualifier(entry);
if (!puid) {
- DEBUG(0,("marshall_posix_acl: SMB_VFS_SYS_ACL_GET_QUALIFIER failed.\n"));
+ DBG_ERR("SMB_VFS_SYS_ACL_GET_"
+ "QUALIFIER failed.\n");
return False;
}
own_grp = (unsigned int)*puid;
{
gid_t *pgid= (gid_t *)sys_acl_get_qualifier(entry);
if (!pgid) {
- DEBUG(0,("marshall_posix_acl: SMB_VFS_SYS_ACL_GET_QUALIFIER failed.\n"));
+ DBG_ERR("SMB_VFS_SYS_ACL_GET_"
+ "QUALIFIER failed.\n");
return False;
}
own_grp = (unsigned int)*pgid;
SIVAL(pdata,6,0xFFFFFFFF);
break;
default:
- DEBUG(0,("marshall_posix_acl: unknown tagtype.\n"));
+ DBG_ERR("unknown tagtype.\n");
return False;
}
pdata += SMB_POSIX_ACL_ENTRY_SIZE;