<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Shared Services</title><link>http://blogs.msdn.com/b/larryosterman/archive/2005/09/09/463018.aspx</link><description>One of the comments I made when doing my "first impressions" of the Mirra backup device was that the Windows software starts two separate services running in two different processes.
 I see this a lot - people architect their product into multiple services</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Nynaeve  &amp;raquo; Blog Archive   &amp;raquo; How least privilege is that service, anyway (or much ado about impersonation) - part 1</title><link>http://blogs.msdn.com/b/larryosterman/archive/2005/09/09/463018.aspx#4257553</link><pubDate>Mon, 06 Aug 2007 15:00:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4257553</guid><dc:creator>Nynaeve  » Blog Archive   » How least privilege is that service, anyway (or much ado about impersonation) - part 1</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.nynaeve.net/?p=154"&gt;http://www.nynaeve.net/?p=154&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4257553" width="1" height="1"&gt;</description></item><item><title>Breaking Up (shared services) Is(n't) Hard To Do</title><link>http://blogs.msdn.com/b/larryosterman/archive/2005/09/09/463018.aspx#464078</link><pubDate>Mon, 12 Sep 2005 20:58:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:464078</guid><dc:creator>Larry Osterman's WebLog</dc:creator><description>The last time I wrote, I talked about shared services. One of the problems of working with shared services...&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=464078" width="1" height="1"&gt;</description></item><item><title>re: Shared Services</title><link>http://blogs.msdn.com/b/larryosterman/archive/2005/09/09/463018.aspx#463877</link><pubDate>Mon, 12 Sep 2005 09:36:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:463877</guid><dc:creator>Cheong</dc:creator><description>Yes. There is security consideration on allowing a process that run with high privellege to interact with user. That what causing me think to lowering it(i.e. a normal user account will do in many case).&lt;br&gt;&lt;br&gt;And controlling the behaviour within the same application is much more simple than using another program to control it. &lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=463877" width="1" height="1"&gt;</description></item><item><title>re: Shared Services</title><link>http://blogs.msdn.com/b/larryosterman/archive/2005/09/09/463018.aspx#463374</link><pubDate>Sat, 10 Sep 2005 17:23:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:463374</guid><dc:creator>Larry Osterman [MSFT]</dc:creator><description>CPAU will continue to work, it doesn't have the security problems that interactive services have.&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=463374" width="1" height="1"&gt;</description></item><item><title>re: Shared Services</title><link>http://blogs.msdn.com/b/larryosterman/archive/2005/09/09/463018.aspx#463367</link><pubDate>Sat, 10 Sep 2005 16:47:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:463367</guid><dc:creator>Ben</dc:creator><description>&amp;gt;&amp;gt;You don't want to EVER pop UI up from a service. &amp;lt;&amp;lt;&lt;br&gt;&lt;br&gt;What about launching another &amp;quot;normal&amp;quot; program from a service, perhaps using CreateProcessAsUser? Does the same rule apply? Any implications from Vista on that? &lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=463367" width="1" height="1"&gt;</description></item><item><title>re: Shared Services</title><link>http://blogs.msdn.com/b/larryosterman/archive/2005/09/09/463018.aspx#463357</link><pubDate>Sat, 10 Sep 2005 15:04:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:463357</guid><dc:creator>Andreas Häber</dc:creator><description>Interactive services are not available anymore in Vista. From the release notes[1]:&lt;br&gt;&amp;quot;The concept of interactive services is being phased out, starting with Windows Vista versions of Windows. Session 0 is now reserved for services and system processes, and users can no longer interactively log on to session 0. Services that assume session 0 is an interactive session might no longer work correctly. Windows and dialog boxes that were displayed directly from services will not be visible to the user, and the service might stop responding if the user interface (UI) requires user input.&amp;quot;&lt;br&gt;&lt;br&gt;One thing I like with interactive services are for global hotkeys. For example I have one interactive service which registers a hotkey for the ctrl+| (pipe) keys. When this hotkey is fired then the service will move the current window from one monitor over to another one. You could do this with an application running from the taskbar too, but I really dislike using the taskbar for stuff which are supposed to be running in the background.&lt;br&gt;&lt;br&gt;[1] &lt;a rel="nofollow" target="_new" href="http://www.microsoft.com/technet/windowsvista/relnotes.mspx"&gt;http://www.microsoft.com/technet/windowsvista/relnotes.mspx&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=463357" width="1" height="1"&gt;</description></item><item><title>re: Shared Services</title><link>http://blogs.msdn.com/b/larryosterman/archive/2005/09/09/463018.aspx#463283</link><pubDate>Sat, 10 Sep 2005 06:01:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:463283</guid><dc:creator>Larry Osterman [MSFT]</dc:creator><description>Cheong, do a google search for &amp;quot;shatter attack&amp;quot; before you consider deploying a service with the SERVICE_INTERACTIVE_PROCESS flag.  &lt;br&gt;&lt;br&gt;Also note that the SERVICE_INTERACTIVE_PROCESS flag doesn't work correctly in FUS scenarios (the UI only pops up on session 0).&lt;br&gt;&lt;br&gt;For Vista, your service is highly unlikely to work correctly do to some significant security work that's been done to mitigate shatter attacks.  You don't want to EVER pop UI up from a service.&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=463283" width="1" height="1"&gt;</description></item><item><title>re: Shared Services</title><link>http://blogs.msdn.com/b/larryosterman/archive/2005/09/09/463018.aspx#463272</link><pubDate>Sat, 10 Sep 2005 05:14:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:463272</guid><dc:creator>Cheong</dc:creator><description>After reading the MSDN page of CreateService, may I ask one question?&lt;br&gt;&lt;br&gt;The article states that the &amp;quot;SERVICE_INTERACTIVE_PROCESS&amp;quot; attribute requires LocalSystem security context. But is it possible to create serivce that can be interactive with desktop, yet just run in normal user account?&lt;br&gt;&lt;br&gt;For example, if I'm writing a FTP server, I think a normal user account for that ftproot folder could be enough.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=463272" width="1" height="1"&gt;</description></item><item><title>re: Shared Services</title><link>http://blogs.msdn.com/b/larryosterman/archive/2005/09/09/463018.aspx#463268</link><pubDate>Sat, 10 Sep 2005 04:50:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:463268</guid><dc:creator>Shiv</dc:creator><description>I've noticed the same problem as Stephen Viess and have come to the conclusion that perhaps the benefit of running many services in one svchost.exe aren't as great as touted. Once I also had the &amp;quot;svchost -k netsvcs&amp;quot; process running away with more memory than usual. I thought that perhaps restarting the offending service would fix it. But how does one find out which one is the culprit? After hunting around with various tools I gave up and started restarting all the services inside it one by one. Guess what? Just like Stephen mentioned it didn't make any difference! The memory usage remained the same (actually increased by a few %). Something isn't quite right in the svchost mechanism. There should be tools to figure out which service is running away and some way to reclaim its resources. Without that IMHO it might be better to have more processes. After all RAM is cheap these days :) It might make sense to do svchost for some common related services. But IMO &amp;quot;svchost -k netsvcs&amp;quot; is quite the extreme counterproductive example.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=463268" width="1" height="1"&gt;</description></item><item><title>re: Shared Services</title><link>http://blogs.msdn.com/b/larryosterman/archive/2005/09/09/463018.aspx#463146</link><pubDate>Sat, 10 Sep 2005 00:52:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:463146</guid><dc:creator>Larry Osterman [MSFT]</dc:creator><description>Stefan, that's a good question.  The answer is that people would start putting 3rd party code in the same process as the built-in services.&lt;br&gt;&lt;br&gt;&lt;br&gt;And that in turn turns into a reliability nightmare - when an instance of svchost.exe goes down, it takes out all the services within the svchost, which can totally tank a system.&lt;br&gt;&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=463146" width="1" height="1"&gt;</description></item></channel></rss>