SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-16-2007, 07:14 PM
Lester Jacobs Lester Jacobs is offline
Sage Aficionado
 
Join Date: Mar 2003
Location: Mississauga, Canada
Posts: 498
Simple (but effective) security for any STV

For those of us who have our Sage systems running where they can be accessed by kids/friends/guests it is useful to be able to protect your SageTV install from accidental file deletions, configuration changes, etc. I've developed a "quick and dirty" method to provide simple security to any Sage STV including those where STV customisations have been imported.

The process relies on the following assumptions:
1) The STV is saved as a .xml file (true for the current version of SageTV)
2) SageTV does not throw error dialogs when it encounters invalid function calls while executing an STV. It silently fails. This appears to be true based on my testing.

Armed with these premises we can then do the following:
1) Search any STV file for functions we wish to neuter.
2) Replace the function name with some invalid string. For example I replace the Sage DeleteFile function with xxDeleteFile. Thus when the user tries to execute any action in the STV which would delete a file it simply does not work.

The process to accomplish this is as follows.

1) Download the free search/replace utility BKReplaceEM from Fit Software
2) Download the BKReplaceEM configuration file that I've developed for SageTV attached to this post. Unzip this file to some location on your hard drive.
3) Install BKReplaceEM then run it. Select File>Open File Set and choose the configuration file you unzipped in step 2.
4) Click on each of the groups that are displayed to see what replace actions are configured. I've configured the following groups; FavoriteReadOnly (disables creating, modifying or deleting Favorites), NoConflictResolution (disables the conflict resolution dialogs so users cannot override upcoming Favorite and Manual recordings), NoDelete (disables manual deletion of files but SageTV's internal deletions will still function e.g. partial recordings, automatic deletions to create space for new recordings, etc), TranscodeReadOnly (disables creating, modifying or deleting Video Conversion jobs).
5) Configure an STV with your preferred customisations. Note the name of the STV file. Be sure to create a backup of this STV so you can revert if necessary!!!
6) For each of the replace groups you want to apply to this STV, right click on the group in BKReplaceEM and choose Add Files. Use the dialog presented to add the aforementioned STV file to the group. You need to add the STV file to each group you are interested in using.
7) Select Replace>Start Replacing from the menu and follow the instructions.
8) You can now switch to this STV file from SageTVs setup menu. Your SageTV install is now protected.


You can change the Replace Groups I've configured or develop new ones suited to your particular needs. I use this process to lock down the Sage clients my kids use and it has performed flawlessly so far.

Hint: If you use Nielm's Dynamic Menu System you can assign a pin code to the Setup menu so users cannot switch to a non-protected STV.

Cheers
Lester
Attached Files
File Type: zip SageSecurity.zip (599 Bytes, 503 views)
__________________
Lester Jacobs
Web: http://www.digicasa.com
"The shortest answer is doing."
English Proverb. Collected in: George Herbert, Jacula Prudentum (1651).
Reply With Quote
  #2  
Old 04-16-2007, 08:02 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by Lester Jacobs View Post
2) SageTV does not throw error dialogs when it encounters invalid function calls while executing an STV. It silently fails. This appears to be true based on my testing.
Actually there is an option in Studio to trap errors and pop up dialogs. But what may be more relevant from your point of view is the fact that Sage will log an error to the debug log (if enabled) every time a function call fails. So if you ever have a real problem that requires tech support, you'll want to restore the unmodified STV in order to get clean logs that demonstrate your problem without a lot of spurious error messages.
__________________
-- Greg
Reply With Quote
  #3  
Old 04-16-2007, 08:14 PM
Lester Jacobs Lester Jacobs is offline
Sage Aficionado
 
Join Date: Mar 2003
Location: Mississauga, Canada
Posts: 498
Quote:
Originally Posted by GKusnick View Post
Actually there is an option in Studio to trap errors and pop up dialogs. But what may be more relevant from your point of view is the fact that Sage will log an error to the debug log (if enabled) every time a function call fails. So if you ever have a real problem that requires tech support, you'll want to restore the unmodified STV in order to get clean logs that demonstrate your problem without a lot of spurious error messages.
Good points. I forgot about the debug logging and Studio functionality. Haven't touched Studio in a while (lack of time hence the quick and dirty compromise).

Cheers
Lester
__________________
Lester Jacobs
Web: http://www.digicasa.com
"The shortest answer is doing."
English Proverb. Collected in: George Herbert, Jacula Prudentum (1651).
Reply With Quote
  #4  
Old 12-17-2010, 02:54 PM
salsbst's Avatar
salsbst salsbst is offline
SageTVaholic
 
Join Date: Jun 2003
Posts: 2,592
Wow this is an old thread. Has anybody tried to do anything like this in recent versions of SageTV? I'd like to take the stock STV and remove everything that would cause wathced/unwatched statii to change and everything that would cause any change in recordings (no scheduling, no live tv, no nothing), just the ability to watch whatever's in the list of recording without doing *anything* else. I suppose it shouldn't be all that difficult, but if someone's already done it....
Reply With Quote
  #5  
Old 12-17-2010, 02:59 PM
Lester Jacobs Lester Jacobs is offline
Sage Aficionado
 
Join Date: Mar 2003
Location: Mississauga, Canada
Posts: 498
tmiranda has a much better implementation of this idea here. He has also ported it to Sage7

Cheers
Lester
__________________
Lester Jacobs
Web: http://www.digicasa.com
"The shortest answer is doing."
English Proverb. Collected in: George Herbert, Jacula Prudentum (1651).
Reply With Quote
  #6  
Old 12-17-2010, 03:21 PM
salsbst's Avatar
salsbst salsbst is offline
SageTVaholic
 
Join Date: Jun 2003
Posts: 2,592
Thanks Lester!

That looks right up my alley! I think I can live without the watched/unwatched status lock.. and if my optimistic reading of tmiranda's description is correct, I can still let guests watch live TV if it doesn't interfere with the existing recording schedule (which would be super sweet but something I wasn't even hoping for)... I guess I'll find out.... and take any questions I have over to tmiranda's thread.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
STV: SageMC 16x9 Version 6.x (latest dev build) dflachbart SageMC Custom Interface 6112 04-04-2008 11:16 PM
STV: DigiCasa - Add security to your SageTV install - Last Updated May 14 2005 Lester Jacobs SageTV Customizations 24 04-23-2006 08:36 AM


All times are GMT -6. The time now is 06:21 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.