• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Read "File Sharing" status
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Read "File Sharing" status


  • Subject: Re: Read "File Sharing" status
  • From: Kyle Sluder <email@hidden>
  • Date: Sun, 27 Jun 2010 23:07:01 -0700

On Sun, Jun 27, 2010 at 10:11 PM,  <email@hidden> wrote:
> I want to list the shared local folders only if smb file sharing is enabled. Currently I am scanning the smb port to get this information. Also Ps command works to check if smb server is running. But the problem is that if, "File sharing" is disabled and only "printer sharing" is enabled in system preference then also smb port scan or ps command passes. But in this case local shared folders should not be listed.

Even though you haven't answered why you want to display the list of
local shared folders, I will assume you have a good purpose.

smbclient has an -L flag which can be used to enumerate shares on a
machine. It does not, as far as I can tell, require authentication. I
believe resource enumeration uses a SID reserved specifically for
browsing purposes.

So you should not need to check to see if the smb service is running
on the local machine. (And even if you wanted to do that, invoking
`ps` is about the wrongest way you can do it.) Just browse the local
machine, and use that to populate your list of shares. No matter what
you do, you will need to authenticate to actually mount the share.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Read "File Sharing" status (From: email@hidden)

  • Prev by Date: Re: Custom Toolbar
  • Next by Date: Unstuffing my build
  • Previous by thread: Re: Read "File Sharing" status
  • Next by thread: Smooth OpenGL animation possible, even if main thread blocks?
  • Index(es):
    • Date
    • Thread