I had my first run in with .Net security today. I was experimenting with the declaritive security model in some code, so I wanted to see what happened when I denied printing rights to a user.

So using the .net wizards I loaded it up, copied full trust, added printing and denied it. then went to the “all code” bit for my user and set the security from full to copy of full. Had a warning but thought nothing of it.

Bet you cant guess what happened.

Yeh, I had to do a system restore, luckliy I had one.

Now call me stupid if you like but if a UI for security whose state is full permission has an empty box of permissions, that you can add things into, wouldnt you think that it implies that full permissions means having nothing in the box and you add things to deny, especially when the defualt for that thing you add is deny.

But Noooooo. Full permissions seems to be a special condition, if there is nowt in the list its full permissions, if you add something then it becomes the opposite, only those things listed are allowed. So I added deny printing, and what happened was now everything was denied with my special exclusion of printing.

Nothing would run, not caspol resets nothing. Thank that I had a restore point.

Its my own stupid fault for experimenting on my primary user account and not reading the manual I suppose, and not following the warnings.

So be careful when messing with these options.

(stupid interface, dumbass desigers, harumpf!).

Advertisements