git.samba.org
/
kai
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
57f1129
)
added new smb.conf option "panic action". see my samba-technical
author
Andrew Tridgell
<tridge@samba.org>
Fri, 21 Aug 1998 11:37:40 +0000
(11:37 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Fri, 21 Aug 1998 11:37:40 +0000
(11:37 +0000)
explanation.
(This used to be commit
c6899df44c34088a4d2bf1edc840320b0ba7e32e
)
source3/include/proto.h
patch
|
blob
|
history
source3/include/smb.h
patch
|
blob
|
history
source3/lib/fault.c
patch
|
blob
|
history
source3/lib/util.c
patch
|
blob
|
history
source3/param/loadparm.c
patch
|
blob
|
history
source3/smbd/ipc.c
patch
|
blob
|
history
diff --git
a/source3/include/proto.h
b/source3/include/proto.h
index a4cac1c2f8e6a66b51825a0b684e89db7f3113b6..b89bb088dcfe8ae6a5b9e816d1484decc5dbb867 100644
(file)
--- a/
source3/include/proto.h
+++ b/
source3/include/proto.h
@@
-327,7
+327,7
@@
struct hostent *Get_Hostbyname(char *name);
BOOL process_exists(int pid);
char *uidtoname(int uid);
char *gidtoname(int gid);
BOOL process_exists(int pid);
char *uidtoname(int uid);
char *gidtoname(int gid);
-void
ajt_panic(void
);
+void
smb_panic(char *why
);
char *readdirname(void *p);
BOOL is_in_path(char *name, name_compare_entry *namelist);
void set_namearray(name_compare_entry **ppname_array, char *namelist);
char *readdirname(void *p);
BOOL is_in_path(char *name, name_compare_entry *namelist);
void set_namearray(name_compare_entry **ppname_array, char *namelist);
@@
-901,6
+901,7
@@
char *lp_nis_home_map_name(void);
char *lp_announce_version(void);
char *lp_netbios_aliases(void);
char *lp_driverfile(void);
char *lp_announce_version(void);
char *lp_netbios_aliases(void);
char *lp_driverfile(void);
+char *lp_panic_action(void);
char *lp_domain_sid(void);
char *lp_domain_other_sids(void);
char *lp_domain_groups(void);
char *lp_domain_sid(void);
char *lp_domain_other_sids(void);
char *lp_domain_groups(void);
diff --git
a/source3/include/smb.h
b/source3/include/smb.h
index 9d6c8d7e29508558968608896ff43d3b953a77cb..a11a3ac61f1f45f4ff9a26c7c96e5f8df637cbc8 100644
(file)
--- a/
source3/include/smb.h
+++ b/
source3/include/smb.h
@@
-1265,10
+1265,6
@@
void dfs_unlogin(void);
extern int dcelogin_atmost_once;
#endif
extern int dcelogin_atmost_once;
#endif
-#if AJT
-void ajt_panic(void);
-#endif
-
#ifdef NOSTRDUP
char *strdup(char *s);
#endif
#ifdef NOSTRDUP
char *strdup(char *s);
#endif
diff --git
a/source3/lib/fault.c
b/source3/lib/fault.c
index 9b665f65c79e80a5267160a3e45c6285e452a3ee..6effaf7d7c6811854a17710f56629c3ff7a24567 100644
(file)
--- a/
source3/lib/fault.c
+++ b/
source3/lib/fault.c
@@
-42,9
+42,7
@@
static void fault_report(int sig)
DEBUG(0,("\nPlease read the file BUGS.txt in the distribution\n"));
DEBUG(0,("===============================================================\n"));
DEBUG(0,("\nPlease read the file BUGS.txt in the distribution\n"));
DEBUG(0,("===============================================================\n"));
-#if AJT
- ajt_panic();
-#endif
+ smb_panic("internal error");
if (cont_fn) {
cont_fn(NULL);
if (cont_fn) {
cont_fn(NULL);
diff --git
a/source3/lib/util.c
b/source3/lib/util.c
index c1eb7cc8798be6e0f2cda9e776ab0608c4567b16..9543388b458e25b5a06acf4aed5bab3b6650f735 100644
(file)
--- a/
source3/lib/util.c
+++ b/
source3/lib/util.c
@@
-378,13
+378,11
@@
char *StrCpy(char *dest,char *src)
{
char *d = dest;
{
char *d = dest;
-#if AJT
/* I don't want to get lazy with these ... */
if (!dest || !src) {
/* I don't want to get lazy with these ... */
if (!dest || !src) {
- DEBUG(0,("ERROR: NULL StrCpy() called!\n"));
-
ajt_panic(
);
+
DEBUG(0,("ERROR: NULL StrCpy() called!\n"));
+
smb_panic("invalid StrCpy"
);
}
}
-#endif
if (!dest) return(NULL);
if (!src) {
if (!dest) return(NULL);
if (!src) {
@@
-4320,15
+4318,17
@@
char *gidtoname(int gid)
return(name);
}
return(name);
}
-#if AJT
/*******************************************************************
/*******************************************************************
-my own panic function - not suitable for general use
+something really nasty happened - panic!
********************************************************************/
********************************************************************/
-void
ajt_panic(void
)
+void
smb_panic(char *why
)
{
{
- system("/usr/bin/X11/xedit -display :0 /tmp/ERROR_FAULT");
+ char *cmd = lp_panic_action();
+ if (cmd && *cmd) {
+ system(cmd);
+ exit(1);
+ }
}
}
-#endif
/*******************************************************************
/*******************************************************************
diff --git
a/source3/param/loadparm.c
b/source3/param/loadparm.c
index 6fcd1eaf9ba493f513c66f4147538be17e85bee4..765fae4f5c1dd11fb49c02fba48c032ba415a030 100644
(file)
--- a/
source3/param/loadparm.c
+++ b/
source3/param/loadparm.c
@@
-152,6
+152,7
@@
typedef struct
char *szLdapFilter;
char *szLdapRoot;
char *szLdapRootPassword;
char *szLdapFilter;
char *szLdapRoot;
char *szLdapRootPassword;
+ char *szPanicAction;
int max_log_size;
int mangled_stack;
int max_xmit;
int max_log_size;
int mangled_stack;
int max_xmit;
@@
-734,6
+735,8
@@
static struct parm_struct parm_table[] =
{"dos filetime resolution",P_BOOL,P_LOCAL,&sDefault.bDosFiletimeResolution, NULL, NULL, FLAG_GLOBAL},
{"fake directory create times", P_BOOL,P_LOCAL, &sDefault.bFakeDirCreateTimes, NULL, NULL, FLAG_GLOBAL},
{"dos filetime resolution",P_BOOL,P_LOCAL,&sDefault.bDosFiletimeResolution, NULL, NULL, FLAG_GLOBAL},
{"fake directory create times", P_BOOL,P_LOCAL, &sDefault.bFakeDirCreateTimes, NULL, NULL, FLAG_GLOBAL},
+ {"panic action", P_STRING, P_GLOBAL, &Globals.szPanicAction, NULL, NULL, 0},
+
{NULL, P_BOOL, P_NONE, NULL, NULL, NULL, 0}
};
{NULL, P_BOOL, P_NONE, NULL, NULL, NULL, 0}
};
@@
-1065,6
+1068,7
@@
FN_GLOBAL_STRING(lp_nis_home_map_name,&Globals.szNISHomeMapName)
FN_GLOBAL_STRING(lp_announce_version,&Globals.szAnnounceVersion)
FN_GLOBAL_STRING(lp_netbios_aliases,&Globals.szNetbiosAliases)
FN_GLOBAL_STRING(lp_driverfile,&Globals.szDriverFile)
FN_GLOBAL_STRING(lp_announce_version,&Globals.szAnnounceVersion)
FN_GLOBAL_STRING(lp_netbios_aliases,&Globals.szNetbiosAliases)
FN_GLOBAL_STRING(lp_driverfile,&Globals.szDriverFile)
+FN_GLOBAL_STRING(lp_panic_action,&Globals.szPanicAction);
FN_GLOBAL_STRING(lp_domain_sid,&Globals.szDomainSID)
FN_GLOBAL_STRING(lp_domain_other_sids,&Globals.szDomainOtherSIDs)
FN_GLOBAL_STRING(lp_domain_sid,&Globals.szDomainSID)
FN_GLOBAL_STRING(lp_domain_other_sids,&Globals.szDomainOtherSIDs)
diff --git
a/source3/smbd/ipc.c
b/source3/smbd/ipc.c
index 1a6fb3366af66dba26175c684dfd577a9d3b5375..eb0abc37c0270c19997ae9f4397cbb4e7126bc3e 100644
(file)
--- a/
source3/smbd/ipc.c
+++ b/
source3/smbd/ipc.c
@@
-377,9
+377,7
@@
va_dcl
DEBUG(2,("type error in package: %s instead of %*s\n",str,
strlen(str),p->curpos));
va_end(args);
DEBUG(2,("type error in package: %s instead of %*s\n",str,
strlen(str),p->curpos));
va_end(args);
-#if AJT
- ajt_panic();
-#endif
+ smb_panic("invalid types in ipc");
return 0;
}
#endif
return 0;
}
#endif