MagickCore
7.0.10
sanitize.c
Go to the documentation of this file.
1
/*
2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3
% %
4
% %
5
% %
6
% SSSSS AAA N N IIIII TTTTT IIIII ZZZZZ EEEEE %
7
% SS A A NN N I T I ZZ E %
8
% SSS AAAAA N N N I T I ZZZ EEE %
9
% SS A A N NN I T I ZZ E %
10
% SSSSS A A N N IIIII T IIIII ZZZZZ EEEEE %
11
% %
12
% %
13
% Wizard's Toolkit Environment Sanitazion Methods %
14
% %
15
% Software Design %
16
% Cristy %
17
% March 2003 %
18
% %
19
% %
20
% Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization %
21
% dedicated to making software imaging solutions freely available. %
22
% %
23
% You may not use this file except in compliance with the License. You may %
24
% obtain a copy of the License at %
25
% %
26
% https://imagemagick.org/script/license.php %
27
% %
28
% Unless required by applicable law or agreed to in writing, software %
29
% distributed under the License is distributed on an "AS IS" BASIS, %
30
% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. %
31
% See the License for the specific language governing permissions and %
32
% limitations under the License. %
33
% %
34
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
35
%
36
%
37
*/
38
␌
39
/*
40
Include declarations.
41
*/
42
#include "
wizard/studio.h
"
43
#include "
wizard/sanitize.h
"
44
␌
45
/*
46
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
47
% %
48
% %
49
% %
50
% S a n i t i z e E n v i r o n m e n t %
51
% %
52
% %
53
% %
54
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
55
%
56
% SanitizeEnvironment sanitizes the environment to help ensure the Wizard's
57
% Toolkit operates in a secure manner.
58
%
59
% The format of the SanitizeEnvironment method is:
60
%
61
% void SanitizeEnvironment(void)
62
%
63
*/
64
WizardExport
void
SanitizeEnvironment
(
void
)
65
{
66
#if defined(SANS)
67
{
68
struct
rlimit
69
limit;
70
71
/*
72
Prevent core dumps.
73
*/
74
limit.rlim_cur=0;
75
limit.rlim_max=0;
76
setrlimit(RLIMIT_CORE,&limit);
77
}
78
#endif
79
}
WizardExport
#define WizardExport
Definition
method-attribute.h:98
SanitizeEnvironment
WizardExport void SanitizeEnvironment(void)
Definition
sanitize.c:64
sanitize.h
studio.h
home
cristy
WizardsToolkit-1.0.9
wizard
sanitize.c
Generated by
1.9.7