Project

General

Profile

Feature #851

Remove [homes] section from smb.conf

Added by jayrock almost 10 years ago. Updated over 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
07/17/2011
Due date:
% Done:

0%


Description

At present, the folder /home/ username is accessible through samba when username logs on. For instance Windows explorer shows this directory as a shared folder on HDA. Suggest to remove the [homes] section from smb.conf by default.

History

#1 Updated by cpg almost 10 years ago

  • Tracker changed from Bug to Feature
  • Project changed from greyhole to platform

#2 Updated by jayrock over 9 years ago

jayrock wrote:

At present, the folder /home/ username is accessible through samba when username logs on. For instance Windows explorer shows this directory as a shared folder on HDA. Suggest to remove the [homes] section from smb.conf by default.

I think the change required is pretty small, it is in platform/platform/html/app/models/share.rb. I'm going to test it soon but would like to give the opportunity for feedback.

Change this:

def self.samba_conf(domain)
ret = self.header(domain)
Share.find(:all).each do |s|
ret += s.share_conf
end
ret
end

to:

def self.samba_conf(domain)
ret = self.header(domain)
Share.find(:all).each do |s|
unless(s.include?('/home/'))
ret += s.share_conf
end
end
ret
end

Comments?

Also available in: Atom