From ff78c3bf5c3a73cf90f6517d9b2d6b8c12d22d68 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 18 Feb 2003 22:14:04 +0000 Subject: Regenerate (This used to be commit 1ab5a3b17feb677425bb1071357c3dbabcc46c7e) --- docs/htmldocs/Samba-Developers-Guide.html | 145 ++++++++++++++++++++++++++---- 1 file changed, 127 insertions(+), 18 deletions(-) (limited to 'docs/htmldocs/Samba-Developers-Guide.html') diff --git a/docs/htmldocs/Samba-Developers-Guide.html b/docs/htmldocs/Samba-Developers-Guide.html index b90d99bf66..5d9702e49e 100644 --- a/docs/htmldocs/Samba-Developers-Guide.html +++ b/docs/htmldocs/Samba-Developers-Guide.html @@ -5,7 +5,7 @@ >SAMBA Developers Guide
10.4. ChangeID & Client Caching of Printer InformationChangeID and Client Caching of Printer Information
10.5. The smbpasswd file>The smbpasswd file
14. RPC Pluggable Modules
14.1. About
14.2. General Overview

This is a short document that describes some of the issues that confront a SMB implementation on unix, and how Samba copes with -them. They may help people who are looking at unix<->PC +them. They may help people who are looking at unix<->PC interoperability.

It was written to help out a person who was writing a paper on unix to @@ -2881,14 +2900,14 @@ example, if I'm using a csh style shell:

strace -f -p 3872 >& strace.outstrace -f -p 3872 >& strace.out

or with a sh style shell:

strace -f -p 3872 > strace.out 2>&1strace -f -p 3872 > strace.out 2>&1

Note the "-f" option. This is only available on some systems, and @@ -6985,7 +7004,7 @@ CLASS="emphasis" >Note: mailslots will contain a response mailslot, to which the response - should be sent. the target NetBIOS name is REQUEST_NAME<20>, where + should be sent. the target NetBIOS name is REQUEST_NAME<20>, where REQUEST_NAME is the name of the machine that sent the request.

9.7.2. Protocol

C->S ReqChal,Cc S->C Cs

C->S ReqChal,Cc S->C Cs

C & S compute session key Ks = E(PW[9..15],E(PW[0..6],Add(Cc,Cs)))

C & S compute session key Ks = E(PW[9..15],E(PW[0..6],Add(Cc,Cs)))

C: Rc = Cred(Ks,Cc) C->S Authenticate,Rc S: Rs = Cred(Ks,Cs), -assert(Rc == Cred(Ks,Cc)) S->C Rs C: assert(Rs == Cred(Ks,Cs))

On joining the domain the client will optionally attempt to change its password and the domain controller may refuse to update it depending on registry settings. This will also occur weekly afterwards.

C: Tc = Time(), Rc' = Cred(Ks,Rc+Tc) C->S ServerPasswordSet,Rc',Tc, +>C: Tc = Time(), Rc' = Cred(Ks,Rc+Tc) C->S ServerPasswordSet,Rc',Tc, arc4(Ks[0..7,16],lmowf(randompassword()) C: Rc = Cred(Ks,Rc+Tc+1) S: assert(Rc' == Cred(Ks,Rc+Tc)), Ts = Time() S: Rs' = Cred(Ks,Rs+Tc+1) S->C Rs',Ts C: assert(Rs' == Cred(Ks,Rs+Tc+1)) S: Rs = Rs'

User: U with password P wishes to login to the domain (incidental data such as workstation and domain omitted)

C: Tc = Time(), Rc' = Cred(Ks,Rc+Tc) C->S NetLogonSamLogon,Rc',Tc,U, +>C: Tc = Time(), Rc' = Cred(Ks,Rc+Tc) C->S NetLogonSamLogon,Rc',Tc,U, arc4(Ks[0..7,16],16,ntowf(P),16), arc4(Ks[0..7,16],16,lmowf(P),16) S: assert(Rc' == Cred(Ks,Rc+Tc)) assert(passwords match those in SAM) S: Ts = Time()

10.4. ChangeID & Client Caching of Printer Information10.4. ChangeID and Client Caching of Printer Information

[To be filled in later]

For example, when you call

<
-NTSTATUS sam_get_account_by_name(const SAM_CONTEXT *context, const
+>NTSTATUS sam_get_account_by_name(const SAM_CONTEXT *context, const
 NT_USER_TOKEN *access_token, uint32 access_desired, const char *domain,
 const char *name, SAM_ACCOUNT_HANDLE **account)

13.3. The smbpasswd file>The smbpasswd file

In order for Samba to participate in the above protocol it must be able to look up the 16 byte hashed values given a user name. @@ -9131,7 +9149,7 @@ CLASS="FILENAME" CLASS="FILENAME" >/etc/passwd file use the following command :

file use the following command:

file.


Chapter 14. RPC Pluggable Modules

14.1. About

This document describes how to make use the new RPC Pluggable Modules features +of Samba 3.0. This architecture was added to increase the maintainability of +Samba allowing RPC Pipes to be worked on separately from the main CVS branch. +The RPM architecture will also allow third-party vendors to add functionality +to Samba through plug-ins.


14.2. General Overview

When an RPC call is sent to smbd, smbd tries to load a shared library by the +name librpc_<pipename>.so to handle the call if +it doesn't know how to handle the call internally. For instance, LSA calls +are handled by librpc_lsass.so.. +These shared libraries should be located in the <sambaroot>/lib/rpc. smbd then attempts to call the rpc_pipe_init function within +the shared library.

In the rpc_pipe_init function, the library should call +rpc_pipe_register_commands(). This function takes the following arguments:

int rpc_pipe_register_commands(const char *clnt, const char *srv,
+                               const struct api_struct *cmds, int size);

clnt

the Client name of the named pipe

srv

the Server name of the named pipe

cmds

a list of api_structs that map RPC ordinal numbers to function calls

size

the number of api_structs contained in cmds

See rpc_server/srv_reg.c and rpc_server/srv_reg_nt.c for a small example of +how to use this library.