Changeset 645 for trunk/client/src


Ignore:
Timestamp:
Oct 25, 2011, 9:14:03 PM (14 years ago)
Author:
Silvan Scherrer
Message:

Samba Client 2.2: some small adjustments and building with bin mode on

Location:
trunk/client/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/src/Config.km_

    r631 r645  
    1616# libz is needed by samba client, if it's found in the path leave the below definition blank. otherwise set it
    1717Z_LIBDIR =
    18 
     18# set this to where the gcc_libs are. right now used to find binmode.obj
     19GCC_LIB=e:/usr/lib
    1920# libsmb 3.3 is threadunsafe, change =0 to =1 if it works again
    2021LIBSMB_THREAD_UNSAFE = LIBSMB_THREAD_SAFE=0
  • trunk/client/src/Makefile.kmk

    r627 r645  
    5454                $(SAMBA)/librpc \
    5555                $(SAMBA)/lib/tdb/include \
    56                 $(SAMBA)/lib/tevent \
    57                 $(GCC_INC)
     56                $(SAMBA)/lib/tevent
    5857
    5958ndpsmb_LIBS = libsmbclient.a socket.a libtalloc.a libtdb.a libwbclient.a z
     59ndpsmb_LIBS += $(GCC_LIB)/binmode.obj
    6060ndpsmb_LIBPATH = $(SAMBA)/source3/bin $(Z_LIBDIR)
    6161
  • trunk/client/src/smbwrp.c

    r630 r645  
    465465        char* dev_type;
    466466        int loginerror = 0;
     467        NTSTATUS status;
    467468
    468469        zero_sockaddr(&ss);
     
    550551
    551552                /* try an anonymous login if it failed */
    552                 if (!NT_STATUS_IS_OK(cli_session_setup(c, "", "", 1,"", 0, workgroup))) {
    553                         debuglocal(4,"Anonymous login failed");
     553                if (!NT_STATUS_IS_OK(cli_session_setup(c, "", "", 0,"", 0, workgroup))) {
     554                        debuglocal(4,"Anonymous login failed\n");
    554555                        cli_shutdown(c);
    555556                        return 6;
    556557                }
     558                debuglocal(4,"Anonymous login successful\n");
     559                status = cli_init_creds(c, "", lp_workgroup(), "");
     560        } else {
     561                status = cli_init_creds(c, srv->username, workgroup, srv->password);
     562        }
     563
     564        if (!NT_STATUS_IS_OK(status)) {
     565                debuglocal(4,"cli_init_creds() failed\n");
     566                cli_shutdown(c);
     567                // if loginerror is != 0 means normal login failed, but anonymous login worked
     568                if (loginerror !=0)
     569                        return 6;
     570                else
     571                        return 7;
    557572        }
    558573
Note: See TracChangeset for help on using the changeset viewer.