GSoC Proposal: Enhanced Registry Configuration for Samba3

suheaven suheaven at gmail.com
Tue Apr 6 06:21:11 MDT 2010


Hello, Everyone:
 
My name is Hang Su, a student from china. This is my proposal for samba3's GSoC subject--"Add remote (RPC) support for Samba configuration". I have discussed this subject with obnox for about 3 weeks. I have submitted this proposal to Google gsoc application web site 1 week ago but get no comment till now. So I post it to the mail list hoping to get some advice from you. Thank you for taking your time reading my proposal and i will appreciat very much for your coment.
 
P.S: Have someone contacted obnox these days? I saw he was on line in IRC but couldn’t get reply from him…He’s the mentor of this subject. So I want to get some of his opinion on my proposal…

Application for Samba GSoC 2010 subject  
  --Enhanced Registry Configuration for Samba3(for the idea “Add remote (RPC) support for Samba configuration”)
   
Hang Su<suheaven at gmail.com>    
 1. Self Introduction & Personal Information  
  My name is Hang Su, a student from China. I'm in my first year for my doctor's degree of engineering (3 years in total) in the Graduate University of Chinese Academy of Sciences. My major is P2P and multimedia networks.
   I have 5 years' experience on C language and 4 years on C++. More detailed resume of mine is listed here: http://socghop.appspot.com/document/show/user/suheaven/resume_2010
    My Email: suheaven at gmail.com
   IRC nick name: alexaa
   I usually hang on IRC around 9:00~11:30 AM and 14:00~22:30 in the timezone of GMT+8.    
 2. Software Development Experience
   During the last 3 years, I participated in the developing of a P2P Streaming system called NOVA of my lab. And the project is still going on. we are a team composed by 6~8 members, most of us are graduate students in the lab. The whole P2P streaming system is composed of several different components: server side components and client side in conclusion. I have designed and fulfilled the server side RP server, live source server, vod server, info collecting server, database backend, etc. the DHT based overlay, video player and UI of the client side.
   Client side and most of the server project are developed under MS visual studio. And we use ns2 to do the simulation of the whole P2P system on our Linux server.
   The whole task is cut in to small parts as weekly task and important milestones. What we should do is not only writing codes but also design all the parts of the whole system, reviewing codes of other team members, carrying out debugging of different parts worked together, etc.
    The teamwork developing experience told me that personal ability is important but highly effective communication, well designed program roadmap and task assignment, and concordant cooperation are other necessary elements of success of the whole team.      
3. Developing Tools Used
   I use MS visual studio to develop the projects for windows. And for Linux, I usually use sourceinsight under Windows as the editor to edit the source code on a Linux server. Of cause, this is enabled since we have Samba. And then use putty as the SSH tool to carry out compiling debugging on the Linux server. I use SVN to manage the version of projects.    
4. English Level
   I took the TOEFL English test and get a score 609 4 years ago. I think I can communicate in English well.      
5. Why I Chose Samba:
   Samba came into my view as an amazing tool 3 years ago. We use Samba to access files on Linux server of our team. Samba makes developing code projects on Linux much more convenient. It enables us to use tools on Windows to edit the codes on Linux server. As having enjoyed the convenience taken by Samba for so many years, I’d like to walk into the world of Samba’s code project and make some contributor for it. Making my codes used all over the world would be a great thing for me. I want to learn more from you on software developing, teamwork, software design, etc.      
6. My Choice of Samba GSoC Subject
     I would like to take the subject of “Add remote (RPC) support for Samba configuration”.    
 7. Ideas On The Subject “Add remote (RPC) support for Samba configuration”     
  7.1. Background of The Subject
    Now there exist 3 ways to access Samba’s registry based configuration: calling reg_api directly, using libsmbconf abstraction which will call reg_api finally, and using win_reg based methods. The former 2 are “local” methods which just call local functions and could only be used to configure registry of local Samba server. The win_reg based method could be used to configure both local and remote Samba server via rpc call remotely. But all the 3 ways would call the code of reg_api finally, even libsmbconf use reg_api to access the registry back backend, win_reg based method call reg_api finally in the code of win_reg rpc server.
   The different methods of calling reg_api make the code identity not very good and restrict the scale of operation target. So there need a new way to call the registry operation code to make all the methods identical.
   Binding reg_api to a local rpc client and calling it in a “remote like” way is a solution to this problem.    
 7.2. My Ideas on "Add remote (RPC) support for Samba configuration"    
 7.2.1. The whole subject could be carried out following the next 3 steps:  
  (1) Do a local bind to reg_api:
   Add a function reg_bind_local() to reg_api.c to do a local bind for reg_api. This function should call rpc_pipe_open_internal()  in  srv_pipe_hnd.c to create a local rpc_pipe_client. And the local client would be used in the following steps.
   In this step, rpc_pipe_open_internal() need a input parameter “dispatch”. Creating of this param could use the rpc_winreg_dispatch() in srv_winreg.c as a reference. rpc_winreg_dispatch() also call reg_api finally.    
The auth info could be supplied by calling functions in auth_util.c 
(2) Change net registry to use local bind of reg_api:  
  Currently, net registry directly calls reg_api. When the first step if finished, we could change net registry to call win_reg functions by passing the local rpc client created in the 1st step to rpccli_winreg_xxx(). This step makes net registry calling reg_api in a “remote like” way, and the reg_api functions would be called in win_reg rpc server side.  
  Actually, the effect of this step is same to adding a local mode to net_rpc_registry. By judging the configuration target and passing local rpc_pipe_client created in the 1st step to rpccli_winreg_xxx() functions when the target is local machine, net_rpc_registry will also have a local mode to finish registry operation without a real rpc pipe. And the reg_api is also called in win_reg server code.      
(3) Add remote support to libsmbconf
   This step is composed of 2 sub steps 
  (3.1) Abandon calling reg_api directly 
  After the 2 steps above, libsmbconf is the next target to be enhanced. libsmbconf calls rep_api to access the registry backend. So we could follow the idea of the 2nd step, switch libsmbconf to using the local bind+ rpccli_winreg_xxx method instead of calling reg_api directly. 
  This step mainly focuses on smbconf_reg.c. As smbconf_reg_xxx() functions use the same parameter list to the text based smbconf_txt_xxx() functions, 
  (3.2) Enable remote configuration of libsmbconf
   The sub step 3.1 gives libsmbconf the infrastructure of accessing registry in a rpc calling way, although step 3.1 only use a fake local rpc pipe. If we pass a real remote rpc pipe client to libsmbconf now, it could also access the remote samba server’s registry.
   To create the real remote rpc pipe, we need further information about the target remote machine, such as the domain name, user name, password, etc. These information could be fetched in the following ways:
   User input. The user of “net conf” utility should input the information needed to establish a rpc bind as part of input arguments, such as server ip: port, username, and password, etc.
   Copy the information from another rpc pipe      
7.2.2. Test of The Code
   testsuit.c under lib/smbconf could be used to test new functionalities added to libsmbconf.by modifying some code and give extra connection info needed to establish remote bind. I have a laptop and 2 desktop PC to carry out remote test suits.
   To test the new functionalities of “net_registry”/”net_rpc_registry” and “net conf”, running the utility and call the new functionalities accordingly is also a necessary step.   
 8.My Time zone 
   I'm in GMT+8, Beijing China





suheaven
2010-04-06


More information about the samba-technical mailing list