[TxMt] TextMate and editing administrative files

Jeroen van der Ham jeroen at je-ju.net
Sat May 7 21:24:57 UTC 2005


Hi,

I'm a bit of a security freak and would like to know when I'm editing
files and exercising my administrative rights when saving them.
TextMate uses the normal channels to gain permission to do that, but the
thing is that it caches this authorization because that's the way OS X
authorization is configured.
Now I don't want to change that, but I do want to change TM's behavior
and this is possible.

Add the following bit into the file /etc/authorization:
		<key>com.macromates.textmate.openfile.readwritecreate.</key>
<dict>
    <key>class</key>
    <string>user</string>
    <key>comment</key>
    <string>require the user to allow TextMate to save a file as
admin</string>
    <key>group</key>
    <string>admin</string>
    <key>shared</key>
    <false/>
    <key>timeout</key>
    <integer>0</integer>
</dict>

It must be inside the:
</string>
    <key>rights</key>
    <dict>

dictionary. I placed it below the default rule's ending </dict> tag.

It means that from the moment you saved that file, all authorized saves
ask you for your password, without any caching.

Jeroen.

-- 
            <http://www.je-ju.net/~jeroen/blog/>



More information about the textmate mailing list