Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

To make certain modifications to system preferences, you first need to unlock the preference pane. Some of these changes are done on a system level and the command-line equivalent would need to be invoked as the root user (via setuid). However, running sudo has an expiration (typically 5 minutes) before needing to re-authenticate again; how do system preferences assert their "open lock" state?

share|improve this question
    
It's not at all clear that the preference pane calls sudo. Are you looking for a technical reverse engineering how things work or is there some practical question you are seeking to solve like perhaps how to modify the timeout or something else altogether? –  bmike Sep 12 '12 at 19:27
    
Thanks, bmike. I'm curious if the authenticated "session" for an unlocked preference pane can be reversed for malicious intent, e.g. if an evil daemon can pose as the system preference pane to modify network settings without the user's knowledge by "piggybacking" off the unlocked prefs. –  shg Sep 12 '12 at 19:31
    
Perfect - if you don't get a good answer - consider editing the question to call this out more clearly - comments can be missed and also deleted from time to time. –  bmike Sep 12 '12 at 19:32
add comment

1 Answer

What you are describing is the standard way, the Mac OS X do it. You have to do the following to get around the five minuts loop hole: Guide to lock system preference

It is assert by using plist files which I hold system times etc. or that is how it was done i Snow Leopard and older.

share|improve this answer
    
Could you incorporate enough of the linked content so people can understand what solution you are proposing to the question at hand? There is an edit button above to let you add details to this stub of an answer. –  bmike Sep 12 '12 at 19:25
add comment

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.