cvs and smbdes.c

Anders Blomdell anders.blomdell at control.lth.se
Thu Dec 11 09:06:32 GMT 1997


Hi,

I'm trying to use the samba cvs service to keep up with the NT Domain
Stuff, my problem is that the smbdes.c that I receive is mangled (looks
like the diffs has lost sync somehow, since some lines are duplicated, and
others have mismatched parenthesises). Here is the diff I get between the
current cvs version and alpha12.

--- alpha12/source/smbdes.c     Mon Oct 27 18:15:44 1997
+++ samba/source/smbdes.c       Thu Dec 11 10:00:31 1997
@@ -14,10 +14,7 @@

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR  have received a copy of
the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
@@ -307,31 +304,31 @@
 {
        unsigned char sp8[8] = {0x4b, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24,
0x25};
        smbhash(p16, sp8, p14);
-       smbhash(p16+8, sp8, p14+7);
+       smbhash(p16+8, sp8, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25};
+       smbhash(p16, sp8, p14);
+       smbhash(p16  , sp8, p14  );
 }

 void E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24)
 {
        smbhash(p24, c8, p21);
-       smbhash(p24+8, c8, p21+7);
-       smbhash(p24+16, c8, p21+14);
+       smbhash(p24   , c8, p21   );
+       smbhash(p24+8 , c8, p21+7 );
 }

 void cred_hash1(unsigned char *out,unsigned char *in,unsigned char *key)
-{
+void cred_hash1(unsigned char out[8],unsigned char in[8],unsigned char
pass[16])
        unsigned char buf[8];

        smbhash(buf, in, key);
-       smbhash(out, buf, key+9);
-}
+       smbhash(buf, in , pass  );
+       smbhash(out, buf, pass+9);

 void cred_hash2(unsigned char *out,unsigned char *in,unsigned char *key)
-{
+void cred_hash2(unsigned char out[8], unsigned char in[8], unsigned char
key[16])
        unsigned char buf[8];
        static unsigned char key2[8];
-
        smbhash(buf, in, key);
-       key2[0] = key[7];
-       smbhash(out, buf, key2);
-}
+       smbhash(buf, in , key  );
+       smbhash(out, buf, key+7);


My operating system is Solaris 2.5.1 and cvs is version 1.9.

The smbdes.c file is retrieved by the command:

  cvs -d :pserver:cvs at samba.anu.edu.au:/cvsroot co -r BRANCH_NTDOM \
	 samba/source/smbdes.c


Regards

Anders Blomdell


------------------------------------------------------------------------------
 Anders Blomdell
 Department of Automatic Control        Email: anders.blomdell at control.lth.se
 Lund Institute of Technology           Phone: +46 46 222 4625
 Box 118, S-221 00 Lund, Sweden         Fax:   +46 46 138118






More information about the samba mailing list