backend = groupdb_tdb_init();
} else {
DEBUG(0,("Unknown groupdb backend '%s'\n", backend_string));
- smb_panic("Unknown groupdb backend\n");
+ smb_panic("Unknown groupdb backend");
}
return backend != NULL;
}
/* assert macros */
#ifdef DEVELOPER
#define SMB_ASSERT(b) ( (b) ? (void)0 : \
- (DEBUG(0,("PANIC: assert failed at %s(%d)\n", \
- __FILE__, __LINE__)), smb_panic("assert failed")))
+ (DEBUG(0,("PANIC: assert failed at %s(%d): %s\n", \
+ __FILE__, __LINE__, #b)), smb_panic("assert failed: " #b)))
#else
/* redefine the assert macro for non-developer builds */
#define SMB_ASSERT(b) ( (b) ? (void)0 : \
- (DEBUG(0,("PANIC: assert failed at %s(%d)\n", __FILE__, __LINE__))))
+ (DEBUG(0,("PANIC: assert failed at %s(%d): %s\n", \
+ __FILE__, __LINE__, #b))))
#endif
#define SMB_WARN(condition, message) \
conv_handles[c1][c2] = smb_iconv_open(n2,n1);
if (!conv_handles[c1][c2]) {
DEBUG(0,("init_iconv: Conversion from %s to %s failed", n1, n2));
- smb_panic("init_iconv: conv_handle initialization failed.");
+ smb_panic("init_iconv: conv_handle initialization failed");
}
}
}
if (p) {
ret.data = (uint8 *)TALLOC_MEMDUP(mem_ctx, p, length);
if (ret.data == NULL)
- smb_panic("data_blob_talloc: TALLOC_MEMDUP failed.\n");
+ smb_panic("data_blob_talloc: TALLOC_MEMDUP failed");
} else {
ret.data = (uint8 *)TALLOC(mem_ctx, length);
if (ret.data == NULL)
- smb_panic("data_blob_talloc: talloc failed.\n");
+ smb_panic("data_blob_talloc: TALLOC failed");
}
ret.length = length;
*/
if(set_blocking(select_pipe[0],0)==-1)
- smb_panic("select_pipe[0]: O_NONBLOCK failed.\n");
+ smb_panic("select_pipe[0]: O_NONBLOCK failed");
if(set_blocking(select_pipe[1],0)==-1)
- smb_panic("select_pipe[1]: O_NONBLOCK failed.\n");
+ smb_panic("select_pipe[1]: O_NONBLOCK failed");
initialised = sys_getpid();
}
if (mods == NULL) {
mods = SMB_MALLOC_P(LDAPMod *);
if (mods == NULL) {
- smb_panic("smbldap_set_mod: out of memory!\n");
+ smb_panic("smbldap_set_mod: out of memory!");
/* notreached. */
- abort();
}
mods[0] = NULL;
}
if (mods[i] == NULL) {
mods = SMB_REALLOC_ARRAY (mods, LDAPMod *, i + 2);
if (mods == NULL) {
- smb_panic("smbldap_set_mod: out of memory!\n");
+ smb_panic("smbldap_set_mod: out of memory!");
/* notreached. */
- abort();
}
mods[i] = SMB_MALLOC_P(LDAPMod);
if (mods[i] == NULL) {
- smb_panic("smbldap_set_mod: out of memory!\n");
+ smb_panic("smbldap_set_mod: out of memory!");
/* notreached. */
- abort();
}
mods[i]->mod_op = modop;
mods[i]->mod_values = NULL;
mods[i]->mod_values = SMB_REALLOC_ARRAY(mods[i]->mod_values, char *, j + 2);
if (mods[i]->mod_values == NULL) {
- smb_panic("smbldap_set_mod: out of memory!\n");
+ smb_panic("smbldap_set_mod: out of memory!");
/* notreached. */
- abort();
}
if (push_utf8_allocate(&utf8_value, value) == (size_t)-1) {
- smb_panic("smbldap_set_mod: String conversion failure!\n");
+ smb_panic("smbldap_set_mod: String conversion failure!");
/* notreached. */
- abort();
}
mods[i]->mod_values[j] = utf8_value;
if (sys_setgroups(gid, ngrp_saved, gids_saved) != 0) {
/* yikes! */
DEBUG(0,("ERROR: getgrouplist: failed to reset group list!\n"));
- smb_panic("getgrouplist: failed to reset group list!\n");
- free(gids_saved);
- return -1;
+ smb_panic("getgrouplist: failed to reset group list!");
}
free(gids_saved);
void *smb_xmalloc_array(size_t size, unsigned int count)
{
void *p;
- if (size == 0)
- smb_panic("smb_xmalloc_array: called with zero size.\n");
+ if (size == 0) {
+ smb_panic("smb_xmalloc_array: called with zero size");
+ }
if (count >= MAX_ALLOC_SIZE/size) {
- smb_panic("smb_xmalloc: alloc size too large.\n");
+ smb_panic("smb_xmalloc_array: alloc size too large");
}
if ((p = SMB_MALLOC(size*count)) == NULL) {
DEBUG(0, ("smb_xmalloc_array failed to allocate %lu * %lu bytes\n",
(unsigned long)size, (unsigned long)count));
- smb_panic("smb_xmalloc_array: malloc fail.\n");
+ smb_panic("smb_xmalloc_array: malloc failed");
}
return p;
}
#endif
#define strdup(s) __ERROR_DONT_USE_STRDUP_DIRECTLY
#endif
- if (!s1)
- smb_panic("smb_xstrdup: malloc fail\n");
+ if (!s1) {
+ smb_panic("smb_xstrdup: malloc failed");
+ }
return s1;
}
#endif
#define strndup(s,n) __ERROR_DONT_USE_STRNDUP_DIRECTLY
#endif
- if (!s1)
- smb_panic("smb_xstrndup: malloc fail\n");
+ if (!s1) {
+ smb_panic("smb_xstrndup: malloc failed");
+ }
return s1;
}
VA_COPY(ap2, ap);
n = vasprintf(ptr, format, ap2);
- if (n == -1 || ! *ptr)
+ if (n == -1 || ! *ptr) {
smb_panic("smb_xvasprintf: out of memory");
+ }
return n;
}
DEBUG(0, ("Talloc type mismatch, expected %s, got %s\n",
name, talloc_get_name(ptr)));
- smb_panic("aborting");
+ smb_panic("talloc type mismatch");
/* Keep the compiler happy */
return NULL;
}
pwnam_cache = TALLOC_ZERO_ARRAY(NULL, struct passwd *,
PWNAMCACHE_SIZE);
if (pwnam_cache == NULL) {
- smb_panic("Could not init pwnam_cache\n");
+ smb_panic("Could not init pwnam_cache");
}
return;
if ((res = tdb_store(tdb, key, dbuf, flag)) != 0) {
DEBUG(10, ("tdb_store failed\n"));
if (tdb_transaction_cancel(tdb) != 0) {
- smb_panic("Cancelling transaction failed\n");
+ smb_panic("Cancelling transaction failed");
}
return res;
}
if ((res = tdb_delete(tdb, key)) != 0) {
DEBUG(10, ("tdb_delete failed\n"));
if (tdb_transaction_cancel(tdb) != 0) {
- smb_panic("Cancelling transaction failed\n");
+ smb_panic("Cancelling transaction failed");
}
return res;
}
ZERO_STRUCT(qt);
- if (!rdata||!offset||!pqt)
- smb_panic("parse_quota_record: called with NULL POINTER!\n");
+ if (!rdata||!offset||!pqt) {
+ smb_panic("parse_quota_record: called with NULL POINTER!");
+ }
if (rdata_count < 40) {
return False;
unsigned int sid_len;
unsigned int offset;
- if (!cli||!pqt)
+ if (!cli||!pqt) {
smb_panic("cli_get_user_quota() called with NULL Pointer!");
+ }
setup = NT_TRANSACT_GET_USER_QUOTA;
unsigned int sid_len;
memset(data,'\0',112);
- if (!cli||!pqt)
+ if (!cli||!pqt) {
smb_panic("cli_set_user_quota() called with NULL Pointer!");
+ }
setup = NT_TRANSACT_SET_USER_QUOTA;
SMB_NTQUOTA_STRUCT qt;
SMB_NTQUOTA_LIST *tmp_list_ent;
- if (!cli||!pqt_list)
+ if (!cli||!pqt_list) {
smb_panic("cli_list_user_quota() called with NULL Pointer!");
+ }
setup = NT_TRANSACT_GET_USER_QUOTA;
SMB_NTQUOTA_STRUCT qt;
ZERO_STRUCT(qt);
- if (!cli||!pqt)
+ if (!cli||!pqt) {
smb_panic("cli_get_fs_quota_info() called with NULL Pointer!");
+ }
setup = TRANSACT2_QFSINFO;
ZERO_STRUCT(qt);
memset(data,'\0',48);
- if (!cli||!pqt)
+ if (!cli||!pqt) {
smb_panic("cli_set_fs_quota_info() called with NULL Pointer!");
+ }
setup = TRANSACT2_SETFSINFO;
void dump_ntquota(SMB_NTQUOTA_STRUCT *qt, BOOL _verbose, BOOL _numeric, void (*_sidtostring)(fstring str, DOM_SID *sid, BOOL _numeric))
{
- if (!qt)
+ if (!qt) {
smb_panic("dump_ntquota() called with NULL pointer");
+ }
switch (qt->qtype) {
case SMB_USER_FS_QUOTA_TYPE:
}
/* Never get here. */
- smb_panic("brlock_posix_split_merge\n");
+ smb_panic("brlock_posix_split_merge");
/* Notreached. */
- abort();
+
/* Keep some compilers happy. */
return 0;
}
if (br_lck->num_locks) {
locks_copy = (struct lock_struct *)TALLOC_MEMDUP(br_lck, locks, br_lck->num_locks * sizeof(struct lock_struct));
if (!locks_copy) {
- smb_panic("brl_close_fnum: talloc fail.\n");
+ smb_panic("brl_close_fnum: talloc failed");
}
} else {
locks_copy = NULL;
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("delete_rec returned %s\n",
nt_errstr(status)));
- smb_panic("Could not delete byte range lock entry\n");
+ smb_panic("Could not delete byte range lock entry");
}
} else {
TDB_DATA data;
TDB_REPLACE);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("store returned %s\n", nt_errstr(status)));
- smb_panic("Could not store byte range mode entry\n");
+ smb_panic("Could not store byte range mode entry");
}
}
int i;
if (dbuf.dsize < sizeof(struct locking_data)) {
- smb_panic("PANIC: parse_share_modes: buffer too short.\n");
+ smb_panic("parse_share_modes: buffer too short");
}
data = (struct locking_data *)dbuf.dptr;
if ((lck->num_share_modes < 0) || (lck->num_share_modes > 1000000)) {
DEBUG(0, ("invalid number of share modes: %d\n",
lck->num_share_modes));
- smb_panic("PANIC: invalid number of share modes");
+ smb_panic("parse_share_modes: invalid number of share modes");
}
lck->share_modes = NULL;
if (dbuf.dsize < (sizeof(struct locking_data) +
(lck->num_share_modes *
sizeof(struct share_mode_entry)))) {
- smb_panic("PANIC: parse_share_modes: buffer too short.\n");
+ smb_panic("parse_share_modes: buffer too short");
}
lck->share_modes = (struct share_mode_entry *)
sizeof(struct share_mode_entry));
if (lck->share_modes == NULL) {
- smb_panic("talloc failed\n");
+ smb_panic("parse_share_modes: talloc failed");
}
}
((data->u.s.delete_token_size - sizeof(uid_t)) % sizeof(gid_t)) != 0) {
DEBUG(0, ("parse_share_modes: invalid token size %d\n",
data->u.s.delete_token_size));
- smb_panic("parse_share_modes: invalid token size\n");
+ smb_panic("parse_share_modes: invalid token size");
}
lck->delete_token = TALLOC_P(lck, UNIX_USER_TOKEN);
if (!lck->delete_token) {
- smb_panic("talloc failed\n");
+ smb_panic("parse_share_modes: talloc failed");
}
/* Copy out the uid and gid. */
lck->delete_token->groups = TALLOC_ARRAY(lck->delete_token, gid_t,
lck->delete_token->ngroups);
if (!lck->delete_token) {
- smb_panic("talloc failed\n");
+ smb_panic("parse_share_modes: talloc failed");
}
for (i = 0; i < lck->delete_token->ngroups; i++) {
sizeof(struct share_mode_entry)) +
data->u.s.delete_token_size );
if (lck->servicepath == NULL) {
- smb_panic("talloc_strdup failed\n");
+ smb_panic("parse_share_modes: talloc_strdup failed");
}
lck->filename = talloc_strdup(lck, (const char *)dbuf.dptr + sizeof(*data) +
data->u.s.delete_token_size +
strlen(lck->servicepath) + 1 );
if (lck->filename == NULL) {
- smb_panic("talloc_strdup failed\n");
+ smb_panic("parse_share_modes: talloc_strdup failed");
}
/*
result.dptr = TALLOC_ARRAY(lck, uint8, result.dsize);
if (result.dptr == NULL) {
- smb_panic("talloc failed\n");
+ smb_panic("talloc failed");
}
data = (struct locking_data *)result.dptr;
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("delete_rec returned %s\n",
nt_errstr(status)));
- smb_panic("Could not delete share entry\n");
+ smb_panic("could not delete share entry");
}
}
goto done;
status = lck->record->store(lck->record, data, TDB_REPLACE);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("store returned %s\n", nt_errstr(status)));
- smb_panic("Could not store share mode entry\n");
+ smb_panic("could not store share mode entry");
}
done:
if (dbuf.dptr == NULL) {
dbuf.dptr = (uint8 *)SMB_MALLOC_P(int);
if (!dbuf.dptr) {
- smb_panic("increment_windows_lock_ref_count: malloc fail.\n");
+ smb_panic("increment_windows_lock_ref_count: malloc fail");
}
memset(dbuf.dptr, '\0', sizeof(int));
dbuf.dsize = sizeof(int);
memcpy(dbuf.dptr, &lock_ref_count, sizeof(int));
if (tdb_store(posix_pending_close_tdb, kbuf, dbuf, TDB_REPLACE) == -1) {
- smb_panic("increment_windows_lock_ref_count: tdb_store_fail.\n");
+ smb_panic("increment_windows_lock_ref_count: tdb_store_fail");
}
SAFE_FREE(dbuf.dptr);
dbuf = tdb_fetch(posix_pending_close_tdb, kbuf);
if (!dbuf.dptr) {
- smb_panic("decrement_windows_lock_ref_count: logic error.\n");
+ smb_panic("decrement_windows_lock_ref_count: logic error");
}
memcpy(&lock_ref_count, dbuf.dptr, sizeof(int));
memcpy(dbuf.dptr, &lock_ref_count, sizeof(int));
if (lock_ref_count < 0) {
- smb_panic("decrement_windows_lock_ref_count: lock_count logic error.\n");
+ smb_panic("decrement_windows_lock_ref_count: lock_count logic error");
}
if (tdb_store(posix_pending_close_tdb, kbuf, dbuf, TDB_REPLACE) == -1) {
- smb_panic("decrement_windows_lock_ref_count: tdb_store_fail.\n");
+ smb_panic("decrement_windows_lock_ref_count: tdb_store_fail");
}
SAFE_FREE(dbuf.dptr);
lock_ref_count -= dcount;
if (lock_ref_count < 0) {
- smb_panic("reduce_windows_lock_ref_count: lock_count logic error.\n");
+ smb_panic("reduce_windows_lock_ref_count: lock_count logic error");
}
memcpy(dbuf.dptr, &lock_ref_count, sizeof(int));
if (tdb_store(posix_pending_close_tdb, kbuf, dbuf, TDB_REPLACE) == -1) {
- smb_panic("reduce_windows_lock_ref_count: tdb_store_fail.\n");
+ smb_panic("reduce_windows_lock_ref_count: tdb_store_fail");
}
SAFE_FREE(dbuf.dptr);
dbuf.dptr = (uint8 *)SMB_REALLOC(dbuf.dptr, dbuf.dsize + sizeof(int));
if (!dbuf.dptr) {
- smb_panic("add_fd_to_close_entry: Realloc fail !\n");
+ smb_panic("add_fd_to_close_entry: SMB_REALLOC failed");
}
memcpy(dbuf.dptr + dbuf.dsize, &fsp->fh->fd, sizeof(int));
dbuf.dsize += sizeof(int);
if (tdb_store(posix_pending_close_tdb, kbuf, dbuf, TDB_REPLACE) == -1) {
- smb_panic("add_fd_to_close_entry: tdb_store_fail.\n");
+ smb_panic("add_fd_to_close_entry: tdb_store_fail");
}
DEBUG(10,("add_fd_to_close_entry: added fd %d file %s\n",
TDB_DATA kbuf = fd_array_key_fsp(fsp);
if (tdb_delete(posix_pending_close_tdb, kbuf) == -1) {
- smb_panic("delete_close_entries: tdb_delete fail !\n");
+ smb_panic("delete_close_entries: tdb_delete failed");
}
}
pstring msg;
slprintf(msg, sizeof(msg)-1, "logic flaw in cases: l_curr: start = %.0f, size = %.0f : \
-lock: start = %.0f, size = %.0f\n", (double)l_curr->start, (double)l_curr->size, (double)lock->start, (double)lock->size );
+lock: start = %.0f, size = %.0f", (double)l_curr->start, (double)l_curr->size, (double)lock->start, (double)lock->size );
smb_panic(msg);
}
static struct event_context *ctx;
if (!ctx && !(ctx = event_context_init(NULL))) {
- smb_panic("Could not init nmbd event context\n");
+ smb_panic("Could not init nmbd event context");
}
return ctx;
}
if (!ctx && !(ctx = messaging_init(NULL, server_id_self(),
nmbd_event_context()))) {
- smb_panic("Could not init nmbd messaging context\n");
+ smb_panic("Could not init nmbd messaging context");
}
return ctx;
}
static struct event_context *ctx;
if (!ctx && !(ctx = event_context_init(NULL))) {
- smb_panic("Could not init winbind event context\n");
+ smb_panic("Could not init winbind event context");
}
return ctx;
}
if (!ctx && !(ctx = messaging_init(NULL, server_id_self(),
winbind_event_context()))) {
- smb_panic("Could not init winbind messaging context\n");
+ smb_panic("Could not init winbind messaging context");
}
return ctx;
}
/* The above *has* to succeed for winbindd to work. */
if (!domain->check_online_event) {
- smb_panic("set_domain_offline: failed to add online handler.\n");
+ smb_panic("set_domain_offline: failed to add online handler");
}
DEBUG(10,("set_domain_offline: added event handler for domain %s\n",
/* The above *has* to succeed for winbindd to work. */
if (!domain->check_online_event) {
- smb_panic("set_domain_online_request: failed to add online handler.\n");
+ smb_panic("set_domain_online_request: failed to add online handler");
}
}
/* Initialise list */
if ((!_domain_list) && (!init_domain_list())) {
- smb_panic("Init_domain_list failed\n");
+ smb_panic("Init_domain_list failed");
}
return _domain_list;
return domain;
}
- smb_panic("Could not find our domain\n");
+ smb_panic("Could not find our domain");
return NULL;
}
string_to_sid(&sid, "S-1-5-32");
domain = find_domain_from_sid(&sid);
- if (domain == NULL)
- smb_panic("Could not find BUILTIN domain\n");
+ if (domain == NULL) {
+ smb_panic("Could not find BUILTIN domain");
+ }
return domain;
}
}
if (lp_talloc == NULL) {
- smb_panic("Could not create temporary talloc context\n");
+ smb_panic("Could not create temporary talloc context");
}
return lp_talloc;
pdb_generate_sam_sid() as needed */
if (!(global_sam_sid = pdb_generate_sam_sid())) {
- smb_panic("Could not generate a machine SID\n");
+ smb_panic("could not generate a machine SID");
}
return global_sam_sid;
done:
if ((tdb != NULL) && (tdb_close(tdb) != 0)) {
- smb_panic("tdb_close(idmap_tdb) failed\n");
+ smb_panic("tdb_close(idmap_tdb) failed");
}
return ret;
if (!main_loop_talloc) {
main_loop_talloc = talloc_init("main loop talloc (mainly parse_misc)");
if (!main_loop_talloc)
- smb_panic("main_loop_talloc: malloc fail\n");
+ smb_panic("main_loop_talloc: malloc fail");
}
return main_loop_talloc;
if (len) {
str->buffer = TALLOC_ZERO_ARRAY(get_talloc_ctx(), uint16, len);
if (str->buffer == NULL)
- smb_panic("init_unistr: malloc fail\n");
+ smb_panic("init_unistr: malloc fail");
rpcstr_push(str->buffer, buf, len*sizeof(uint16), STR_TERMINATE);
} else {
if (len) {
str->buffer = (uint8 *)TALLOC_ZERO(get_talloc_ctx(), len);
if (str->buffer == NULL)
- smb_panic("create_rpc_blob: talloc fail\n");
+ smb_panic("create_rpc_blob: talloc fail");
str->buf_len = len;
} else {
str->buffer = NULL;
str->buffer = (uint16 *)TALLOC_ZERO(get_talloc_ctx(),
str->buf_max_len);
if (str->buffer == NULL)
- smb_panic("init_regval_buffer: talloc fail\n");
+ smb_panic("init_regval_buffer: talloc fail");
memcpy(str->buffer, buf, str->buf_len);
}
}
if (str->uni_max_len) {
str->buffer = (uint16 *)TALLOC_ZERO_ARRAY(get_talloc_ctx(), uint16, str->uni_max_len);
if ((str->buffer == NULL)) {
- smb_panic("copy_unistr2: talloc fail\n");
+ smb_panic("copy_unistr2: talloc fail");
return;
}
/* copy the string */
str->buffer = (uint8 *)TALLOC_ZERO(get_talloc_ctx(),
str->str_max_len);
if (str->buffer == NULL)
- smb_panic("init_string2: malloc fail\n");
+ smb_panic("init_string2: malloc fail");
memcpy(str->buffer, buf, str_len);
}
}
str->buffer = TALLOC_ZERO_ARRAY(get_talloc_ctx(), uint16, len);
if (str->buffer == NULL) {
- smb_panic("init_unistr2: malloc fail\n");
+ smb_panic("init_unistr2: malloc fail");
return;
}
{
uni4->string = TALLOC_P( get_talloc_ctx(), UNISTR2 );
if (!uni4->string) {
- smb_panic("init_unistr4: talloc fail\n");
+ smb_panic("init_unistr4: talloc fail");
return;
}
init_unistr2( uni4->string, buf, flags );
{
uni4->string = TALLOC_P( ctx, UNISTR2 );
if (!uni4->string) {
- smb_panic("init_unistr4_w: talloc fail\n");
+ smb_panic("init_unistr4_w: talloc fail");
return;
}
init_unistr2_w( ctx, uni4->string, buf );
if (len + 1) {
str->buffer = TALLOC_ZERO_ARRAY(ctx, uint16, len + 1);
if (str->buffer == NULL) {
- smb_panic("init_unistr2_w: talloc fail\n");
+ smb_panic("init_unistr2_w: talloc fail");
return;
}
} else {
if (i) {
to->buffer = TALLOC_ZERO_ARRAY(get_talloc_ctx(), uint16, i);
if (to->buffer == NULL)
- smb_panic("init_unistr2_from_unistr: malloc fail\n");
+ smb_panic("init_unistr2_from_unistr: malloc fail");
memcpy(to->buffer, from->buffer, i*sizeof(uint16));
} else {
to->buffer = NULL;
str->buffer = NULL;
}
if ((str->buffer == NULL) && (blob->length > 0)) {
- smb_panic("init_unistr2_from_datablob: malloc fail\n");
+ smb_panic("init_unistr2_from_datablob: malloc fail");
}
}
if (str->uni_str_len) {
str->str.buffer = TALLOC_ZERO_ARRAY(get_talloc_ctx(), uint16, str->uni_str_len);
if (str->str.buffer == NULL)
- smb_panic("init_unistr3: malloc fail\n");
+ smb_panic("init_unistr3: malloc fail");
rpcstr_push((char *)str->str.buffer, buf, str->uni_str_len * sizeof(uint16), STR_TERMINATE);
} else {
return False;
if (fns[opnum].opnum != opnum) {
- smb_panic("LSA function table not sorted\n");
+ smb_panic("LSA function table not sorted");
}
return fns[opnum].fn(p);
blocking_lock_record *blr;
if (data->data == NULL) {
- smb_panic("process_blocking_lock_cancel_message: null msg\n");
+ smb_panic("process_blocking_lock_cancel_message: null msg");
}
if (data->length != MSG_BLOCKING_LOCK_CANCEL_SIZE) {
DEBUG(0, ("process_blocking_lock_cancel_message: "
"Got invalid msg len %d\n", (int)data->length));
- smb_panic("process_blocking_lock_cancel_message: bad msg\n");
+ smb_panic("process_blocking_lock_cancel_message: bad msg");
}
memcpy(&blr, msg, sizeof(blr));
file_id_static_string(&fsp->file_id),
(unsigned int)fsp->fh->gen_id,
(unsigned int)fsp->oplock_type ));
- smb_panic("file_find_dif\n");
+ smb_panic("file_find_dif");
}
return fsp;
}
DEBUG(10, ("get challenge: creating negprot_global_auth_context\n"));
if (!NT_STATUS_IS_OK(nt_status = make_auth_context_subsystem(&negprot_global_auth_context))) {
DEBUG(0, ("make_auth_context_subsystem returned %s", nt_errstr(nt_status)));
- smb_panic("cannot make_negprot_global_auth_context!\n");
+ smb_panic("cannot make_negprot_global_auth_context!");
}
DEBUG(10, ("get challenge: getting challenge\n"));
cryptkey = negprot_global_auth_context->get_ntlm_challenge(negprot_global_auth_context);
}
if (req == NULL) {
- smb_panic("notify_req not found in fsp's requests\n");
+ smb_panic("notify_req not found in fsp's requests");
}
DLIST_REMOVE(fsp->notify->requests, req);
static char *nttrans_realloc(char **ptr, size_t size)
{
if (ptr==NULL) {
- smb_panic("nttrans_realloc() called with NULL ptr\n");
+ smb_panic("nttrans_realloc() called with NULL ptr");
}
*ptr = (char *)SMB_REALLOC(*ptr, size);
/* Paranoia check. */
if(lp_security() == SEC_SHARE) {
- smb_panic("Tried to register uid in security=share\n");
+ smb_panic("Tried to register uid in security=share");
}
/* Limit allowed vuids to 16bits - VUID_OFFSET. */
if (sec_ctx_stack_ndx == MAX_SEC_CTX_DEPTH) {
DEBUG(0, ("Security context stack overflow!\n"));
- smb_panic("Security context stack overflow!\n");
+ smb_panic("Security context stack overflow!");
}
/* Store previous user context */
if (sec_ctx_stack_ndx == 0) {
DEBUG(0, ("Security context stack underflow!\n"));
- smb_panic("Security context stack underflow!\n");
+ smb_panic("Security context stack underflow!");
}
ctx_p = &sec_ctx_stack[sec_ctx_stack_ndx];
static struct event_context *ctx;
if (!ctx && !(ctx = event_context_init(NULL))) {
- smb_panic("Could not init smbd event context\n");
+ smb_panic("Could not init smbd event context");
}
return ctx;
}
if (!ctx && !(ctx = messaging_init(NULL, server_id_self(),
smbd_event_context()))) {
- smb_panic("Could not init smbd messaging context\n");
+ smb_panic("Could not init smbd messaging context");
}
return ctx;
}
* CLEAR_IF_FIRST flags */
if (tdb_reopen_all(1) == -1) {
DEBUG(0,("tdb_reopen_all failed.\n"));
- smb_panic("tdb_reopen_all failed.");
+ smb_panic("tdb_reopen_all failed");
}
return True;
if (name == NULL) {
/* This is too security sensitive, better panic than return a
* result that might be interpreted in a wrong way. */
- smb_panic("substitutions failed\n");
+ smb_panic("substitutions failed");
}
/* check to see is we already have a SID */
}
continue;
}
- smb_panic("got invalid prefix from do_groups_check\n");
+ smb_panic("got invalid prefix from do_groups_check");
}
return False;
}
}
if ( (mem_ctx = talloc_new(NULL)) == NULL ) {
- smb_panic("talloc_new failed\n");
+ smb_panic("talloc_new failed");
}
while (*list != NULL) {
main()
{
+ exit (0);
#if !(defined(HAVE_FCNTL_LOCK) || defined(HAVE_STRUCT_FLOCK64))
printf("ERROR: No locking available. Running Samba would be unsafe\n");
exit(1);