summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/2011-August/007251.html
blob: 79a5c4f7d24b7b6012cc59cf8164b15f9c7bf345 (plain)
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Mageia-dev] RM replacement
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20RM%20replacement&In-Reply-To=%3C4E3BE8E4.9050009%40laposte.net%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="007243.html">
   <LINK REL="Next"  HREF="007252.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Mageia-dev] RM replacement</H1>
    <B>andre999</B> 
    <A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20RM%20replacement&In-Reply-To=%3C4E3BE8E4.9050009%40laposte.net%3E"
       TITLE="[Mageia-dev] RM replacement">andr55 at laposte.net
       </A><BR>
    <I>Fri Aug  5 14:58:12 CEST 2011</I>
    <P><UL>
        <LI>Previous message: <A HREF="007243.html">[Mageia-dev] RM replacement
</A></li>
        <LI>Next message: <A HREF="007252.html">[Mageia-dev] RM replacement
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#7251">[ date ]</a>
              <a href="thread.html#7251">[ thread ]</a>
              <a href="subject.html#7251">[ subject ]</a>
              <a href="author.html#7251">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>Colin Guthrie a &#233;crit :
&gt;<i> 'Twas brillig, and andre999 at 05/08/11 06:50 did gyre and gimble:
</I>&gt;&gt;<i> Luis Daniel Lucio Quiroz a &#233;crit :
</I>&gt;&gt;&gt;<i> Le Jeudi 04 Ao&#251;t 2011 18:39:35 andre999 a &#233;crit :
</I>&gt;&gt;&gt;&gt;<i> Luis Daniel Lucio Quiroz a &#233;crit :
</I>&gt;&gt;&gt;&gt;&gt;<i> Helo,
</I>&gt;&gt;&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;&gt;&gt;<i> As my experience in security field, to make Mageia more available in
</I>&gt;&gt;&gt;&gt;&gt;<i> enterprise environments, and specially those that are security
</I>&gt;&gt;&gt;&gt;&gt;<i> paranoid, i'm planning to port SRM.  SRM is a package that does a
</I>&gt;&gt;&gt;&gt;&gt;<i> &quot;secure&quot; file deleting according some security standards (i dont
</I>&gt;&gt;&gt;&gt;&gt;<i> remember right now names, i guess it is something in NIST, but that
</I>&gt;&gt;&gt;&gt;&gt;<i> doesnt matter really).
</I>&gt;&gt;&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;&gt;&gt;<i> My question is, what should be the procedure that when you install srm,
</I>&gt;&gt;&gt;&gt;&gt;<i> then the normal rm command could be replaced?  i was thinking in
</I>&gt;&gt;&gt;&gt;&gt;<i> pushing an alias but what other alternatives do i have?
</I>&gt;&gt;&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;&gt;&gt;<i> please comment,
</I>&gt;&gt;&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;&gt;&gt;<i> LD
</I>&gt;&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;&gt;<i> At first glance that sounds like a reasonable approach EXCEPT -- a
</I>&gt;&gt;&gt;&gt;<i> system-level alias would be over-ridden by a user alias.
</I>&gt;&gt;&gt;&gt;<i> A user could innocently have an alias such as :
</I>&gt;&gt;&gt;&gt;<i> alias rm=&quot;rm -i&quot;
</I>&gt;&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;&gt;<i> rm is in /bin
</I>&gt;&gt;&gt;&gt;<i> - /bin/rm could be replaced with a link to srm, but I don't know if that
</I>&gt;&gt;&gt;&gt;<i> would be considered acceptable.
</I>&gt;&gt;&gt;&gt;<i> rm would have to be restored if srm were uninstalled
</I>&gt;&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;&gt;<i> - wouldn't a link in /usr/bin/rm be executed first ?
</I>&gt;&gt;&gt;&gt;<i> Of course that doesn't cover execution with root privileges.
</I>&gt;&gt;&gt;&gt;<i> An alias in root wouldn't necessarily work, as an admin could
</I>&gt;&gt;&gt;&gt;<i> inadvertantly
</I>&gt;&gt;&gt;&gt;<i> replace it with another.  (By loading a new file with some changed
</I>&gt;&gt;&gt;&gt;<i> alias,
</I>&gt;&gt;&gt;&gt;<i> for example.)
</I>&gt;&gt;&gt;&gt;<i> But probably less likely than some user doing the same on their profile.
</I>&gt;&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;&gt;<i> There could be other approaches as well ... :)
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> You are right! :)
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> Well another option could be this:
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> a. we change coreutils to install /bin/rm as  /bin/rm.vanilla (or
</I>&gt;&gt;&gt;<i> other name,
</I>&gt;&gt;&gt;<i> that really doesnt matter),
</I>&gt;&gt;&gt;<i> b. i change srm to install itself in /bin instead of /usr/bin
</I>&gt;&gt;&gt;<i> c. we place alternatives in both packages to provide /bin/rm, giving
</I>&gt;&gt;&gt;<i> preference to srm if installed, otherwise it will use rm of coreutils
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> LD
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> That would probably be the ideal approach.  But it might take a while to
</I>&gt;&gt;<i> get the changes accepted in coreutils.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Maybe it could be all done from srm ?
</I>&gt;&gt;<i> On srm install,
</I>&gt;&gt;<i> a. rename /bin/rm to /bin/rm.vanilla (or rm.original or ?)
</I>&gt;&gt;<i> b. create /bin/rm link to /bin/srm
</I>&gt;<i>
</I>&gt;<i> Definitely not. It's against the commandments: Thou shalt not mess with
</I>&gt;<i> another packages' files.
</I>
ok.  I suspected that.
It would be nice to have a list of these points for newer packagers.

&gt;&gt;<i> On srm uninstall, we ensure that
</I>&gt;&gt;<i> a. rm /bin/rm link
</I>&gt;&gt;<i> b. rename /bin/rm.vanilla to /bin/rm
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Hopefully that could be done reliably, with an uninstall script.
</I>&gt;<i>
</I>&gt;<i> No, this is very bad.
</I>&gt;<i>
</I>&gt;<i> It's what the alternatives system was designed to do for you, but I
</I>&gt;<i> really don't think that something as fundamental as rm should be messed
</I>&gt;<i> with in this way as I mentioned in my own email.
</I>&gt;<i>
</I>&gt;<i> srm is an add on userspace tool. To implement secure deletes properly,
</I>&gt;<i> you would want support at a lower level (i.e in the kernel/fs).
</I>
makes sense.

&gt;<i> I think srm should just be a tool people use explicitly when they want to.
</I>
When I think about it, deleting with a pattern instead of just zeros is 
probably only advantageous when a disk is being disposed of -- in which case 
srm being a userspace tool is not a disadvantage.

&gt;<i> Col
</I>&gt;<i>
</I>
-- 
Andr&#233;
</PRE>





















<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="007243.html">[Mageia-dev] RM replacement
</A></li>
	<LI>Next message: <A HREF="007252.html">[Mageia-dev] RM replacement
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#7251">[ date ]</a>
              <a href="thread.html#7251">[ thread ]</a>
              <a href="subject.html#7251">[ subject ]</a>
              <a href="author.html#7251">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-dev">More information about the Mageia-dev
mailing list</a><br>
</body></html>