File: libtrash.conf

package info (click to toggle)
libtrash 0.8-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 300 kB
  • ctags: 113
  • sloc: ansic: 1,604; perl: 208; makefile: 77
file content (291 lines) | stat: -rw-r--r-- 13,574 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
# CONFIGURATION: 
 
# Three of these settings, DEBUG, PERSONAL_CONF_FILE and WARNING_STRING,
# define variables which cannot be changed at run-time by editing a personal
# configuration file. All the other 19 variables can be changed at run-time. 
#
# Due to the fact that this file is used to generate the system-wide 
# configuration file, it is very important that you do not make any changes to
# it besides actually modifying the values of the configuration variables.
#
# Do not use quotes in any situation, and always put an equal sign separating
# the key from the chosen value. Also, never put space in the middle of
# semi-colon separated lists.


# [BEGINNING OF COMPILE-TIME-ONLY SETTINGS]

# This setting defines whether we should output diagnostic messages to stderr
# or run silently. You should either leave it set to NO (to disable the 
# messages) or change NO to YES (to have libtrash print these messages) if you
# suspect something isn't working as it should:
  
DEBUG = NO


# This setting specifies the name (WITHOUT a leading slash) of the
# user-specific, personal configuration file: 

PERSONAL_CONF_FILE = .libtrash


# String printed to stderr if SHOULD_WARN (see below) is set to YES:

WARNING_STRING = Remember that libtrash is disabled.


# [END OF COMPILE-TIME-ONLY SETTINGS]


# This setting controls the interception of calls to unlink(). If it is set to
# YES, the "real" unlink() (the one found in GNU libc) will be used and data
# will be lost; if it set to NO, calls to unlink() will be intercepted and the
# "deleted" files will be stored in your trash can:

UNLINK_OFF = NO
 
 
# This setting controls the interception of calls to rename(). If it is set to
# YES, the "real" rename() (the one found in GNU libc) will be used and data
# might be lost; if it set to NO, calls to rename() will be intercepted and,
# if any file is overwritten, it will be stored in your trash can:

RENAME_OFF = NO


# This setting controls the interception of calls to fopen(). If it is set to
# YES, the "real" fopen() (the one found in GNU libc) will be used and data
# might be lost; if it set to NO, calls to fopen() will be intercepted and any
# truncated files will be stored in your trash can:
  
FOPEN_OFF = YES


# This setting controls the interception of calls to freopen(). If it is set
# to YES, the "real" freopen() (the one found in GNU libc) will be used and
# data might be lost; if it set to NO, calls to freopen() will be intercepted
# and any truncated files will be stored in your trash can:
  
FREOPEN_OFF = YES


# This setting controls the interception of calls to open(). If it is set to
# YES, the "real" open() (the one found in GNU libc) will be used and data
# might be lost; if it set to NO, calls to open() will be intercepted and any
# truncated files will be stored in your trash can:

OPEN_OFF = YES


# This setting sets the default name of the directory in the user's home
# directory in which "deleted" files will be stored. It mustn't contain any
# slashes:
  
TRASH_CAN = Trash


# This setting defines what should be done in case of failure: should we just
# call the desired function in GNU libc's using the argument we were passed or
# do nothing at all? (Note: There is one possible error situation in which we
# wouldn't even be able to invoke glibc's functions(): if the corresponding
# call to dlsym() had failed. The other possible errors are caused either by
# allocation failures, the impossibility to determine information about the
# user or by the fact that we were unable to create a file/directory. In any
# of these cases, we can always just pass our argument to the "real" function,
# if that is what the user prefers.) Please set it to either ALLOW_DESTRUCTION
# (to use the "real" GNU libc function, without the protection of libtrash) or
# PROTECT (to return an error code without invoking the appropriate function, 
# making sure that even if an error occurs, that file won't be lost): 

IN_CASE_OF_FAILURE = PROTECT


# This setting defines whether, when libtrash is disabled (i.e., when the
# environmental variable TRASH_OFF is set), the user gets warned about that
# fact whenever one of the overriden functions is invoked. Set to either YES 
# or NO:
  
SHOULD_WARN = NO


# This setting defines what we will do if asked to destroy a file under the
# user's TRASH_CAN. There is one thing we must refuse to do: handle it
# normally (i.e., storing a copy of it under TRASH_CAN/TRASH_CAN/). The file
# would never be deleted and you would get a chain of TRASH_CAN directories
# under your TRASH_CAN. So we can either protect the trash can (by setting
# this variable to YES), or allow direct destruction of files already inside 
# it (by variable it to NO). Please note that, if you set this setting to NO, 
# you will _NOT_ be fully protected from devastating commands such as
#
# 'rm -rf *'
#
# In this case, libtrash would store a copy of all "deleted" files under your 
# TRASH_CAN, but would still allow the removal of all of them from your 
# TRASH_CAN. (Depending on the order in which rm deletes files under your home
# dir, the consequences might vary: if it only tried to unlink() the files 
# under TRASH_CAN _after_ having "deleted" all the others, you would lose 
# everything; if, on the other hand, it first unlink()ed the files under 
# TRASH_CAN and then proceeded to the others, you would just lose the files 
# you had originally stored under TRASH_CAN itself). In other words, you 
# probably want to set it to YES, and use one of the suggested solutions 
# (hardrm or temporarily suspending libtrash) when you need to forcefully 
# remove files under your TRASH_CAN:

PROTECT_TRASH = YES


# This setting defines a semi-colon delimited list of file name extensions
# (i.e., file types) which should be "ignored": files with matching file names
# won't be copied into your trash can before being destroyed. To disable this
# feature, leave t. Note: You must NOT precede each extension with a dot; e.g.,
# to ignore C source and header files, this setting should be set to 
#
# c;h
#
# NOT 
#
# .c;.h

IGNORE_EXTENSIONS = o;log;aux


# This setting defines whether hidden files (or files under a hidden
# directory) should be handled normally or "ignored". Usually, hidden files
# are either temporary or configuration files. Set to either YES or NO. YES
# tells libtrash to "ignore" such files, i.e., to allow their permanent
# destruction. Choosing NO causes them to be handled "normally", i.e., they
# will be moved to your trash can rather than really destroyed:
  
IGNORE_HIDDEN = YES


# This setting defines whether files whose names end in a tilde ('~') should
# be handled normally or really "ignored". Usually, these files are backup
# files used by text editors. Set to either YES or NO. YES tells libtrash to
# "ignore" such files, i.e., to allow their permanent destruction. Choosing NO
# causes them to be handled "normally", i.e., they will be moved to your trash
# can rather than really destroyed:
  
IGNORE_EDITOR_BACKUP = YES


# This setting defines whether files whose names begin with a cardinal ('#')
# should be handled normally or "really" ignored. Usually, these files are
# temporary files used by text editors. Set to either YES or NO. YES tells
# libtrash to "ignore" such files, i.e., to allow their permanent destruction.
# Choosing NO causes them to be handled "normally", i.e., they will be moved
# to your trash can rather than really destroyed:

IGNORE_EDITOR_TEMPORARY = YES


# This setting allows you to instruct libtrash to never allow the destruction
# of your personal libtrash configuration file. The idea behind this variable
# is the following: if you accidentally issue a command which makes your
# personal libtrash configuration file "disappear", libtrash won't behave in
# the way you would expect it to behave, and you might not notice that until
# it is too late. This would be particularly serious if your variables differ
# from the compile-time defaults in important aspects. If you consider this
# additional protection useful, set this setting to YES; otherwise, choose NO
# (your libtrash configuration file will, in this case, be handled according
# to the other rules): 

LIBTRASH_CONFIG_FILE_UNREMOVABLE = YES


# This setting determines whether requests by users which would cause the
# destruction of a file outside of their home directory are intercepted, i.e.,
# if such files are moved to the user's trash can or really destroyed. Of
# course, any of these things will only happen if the user has sufficient
# permissions. If you set this variable to YES, you should take a look at 
# TRASH_SYSTEM_ROOT below. An example: Alice tries to unlink() / common /
# latest-news.txt. If you set GLOBAL_PROTECTION to YES, / common / 
# latest-news.txt will be moved to / home / alice / Trash / SYSTEM_ROOT /
# common / latest-news.txt, assuming that TRASH_SYSTEM_ROOT is set to 
# SYSTEM_ROOT. If GLOBAL_PROTECTION had the value NO, / common / 
# latest-news.txt would be unlink()ed using glibc's unlink(), and no copy 
# would be stored in Alice's TRASH_CAN. If Alice lacked write-permission to 
# that directory in the first place, her request would naturally fail.
#
# NOTES: 
# 1- This _DOESN'T_ apply to requests which would destroy files under one of 
# the "protected" directories listed in UNREMOVABLE_DIRS: if the super user 
# lists /lib in unremovable_dirs, and sets GLOBAL_PROTECTION, trying to 
# unlink(), e.g., /lib/libc.so.6 will still fail: the original file (actually,
# it is a symlink) will be left in the same place, and it won't be copied to
# her TRASH_CAN. If GLOBAL_PROTECTION hadn't been set, exactly the same thing
# would have happened: this request would have been ignored. Summary:
# UNREMOVABLE_DIRS takes precedence over GLOBAL_PROTECTION. 
# 2- Files under TEMPORARY_DIRS are always ignored: e.g., requests to unlink()
# files under these dirs are passed on to glibc's unlink() independently of 
# the value of GLOBAL_PROTECTION. It doesn't make any sense to allow storing
# back-up copies of temporary files; besides, this would make your TRASH_CAN
# unbrowsable due to the quantity of litter (pun intended). 
# 3- If you set GLOBAL_PROTECTION to YES, and then proceed to delete a file on
# a partition or file system different from the one on which your home directory
# resides, the file will be _copied_ byte-after-byte to your trash can. If the
# file is very large (e.g., ISO images), that operation will take some time.

GLOBAL_PROTECTION = YES


# This setting sets the default name of the directory under TRASH_CAN which
# will serve as "root" of the file system if you have set GLOBAL_PROTECTION
# above (if GLOBAL_PROTECTION is set to NO, this value is ignored). E.g.: if
# you set this setting to SYSTEM_ROOT, and GLOBAL_PROTECTION is set to YES,
# trying to unlink() /common/interesting-stuff/important.html will result in a
# copy of the deleted file in / (YOUR_HOME_DIR) / (YOUR_TRASH_CAN) /
# SYSTEM_ROOT / common / interesting-stuff / important.html. Just like
# TRASH_CAN, it musn't contain any slashes - it should be a plain directory
# name:

TRASH_SYSTEM_ROOT = SYSTEM_ROOT


# This variable defines a list of directories under which no files will ever
# be destroyed by the user running a program under libtrash. They won't be
# transferred to the user's TRASH_CAN: these requests are simply ignored and
# an error code is returned after each call to the "wrapped" functions.
#
# NOTES: 
# 1- Each user can choose her own list of "untouchable" dirs. 
# 2- root can use this variable to prevent catastrophic events which would
# render a system unusable, e.g., "rm -r /". Leave this setting empty (i.e.,
# enter a newline after the equal sign) if you don't need this feature. 
# Otherwise, fill in a semi-colon separated list of directories. By default, a
# list of system directories is provided which will prevent root from seriously
# damaging the system (this variable has no impact on other users since 
# normally they would never have write-permission to any of these dirs): 

UNREMOVABLE_DIRS = /bin;/boot;/dev;/etc;/lib;/proc;/sbin;/usr


# This setting sets a list of directories under which temporary files are 
# created. We always destroy files under any of these directories. This must 
# be a semi-colon separated list of directories. Leave this setting empty
# (i.e., enter a newline after the equal sign) if you don't need/want this 
# exception:

TEMPORARY_DIRS = /tmp;/var


# This setting sets a list of directories under which files are really
# destroyed, exactly like what happens in the directories listed in
# TEMPORARY_DIRS. The only difference is that this variable is meant to be
# used to prevent files on removable media (e.g., floppies, CD-RW, etc) from
# having a copy of themselves "saved" in your trash can if GLOBAL_PROTECTION
# is set. It is enabled by default, since I suppose that for most people
# saving back-up copies of files destroyed on a removable medium doesn't make
# a lot of sense. For that reason, and to prevent those unnecessary copies
# from being made, fill in a semi-colon separated list of directories which
# are used as mount points for removable media in your system. If you wish to
# have that extra level of protection enabled, just leave this variable unset
# (i.e., enter a newline after the equal sign) - and don't forget to enable 
# GLOBAL_PROTECTION, of course):
#
# NOTE: This variable is ignored if global_protection is disabled.

REMOVABLE_MEDIA_MOUNT_POINTS = /mnt


# End of configuration.