ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/SambaTest/SambaTest.cpp
(Generate patch)

Comparing SambaTest/SambaTest.cpp (file contents):
Revision 413 by douglas, 2005-01-14T20:43:21-08:00 vs.
Revision 427 by douglas, 2005-03-22T22:57:52-08:00

# Line 9 | Line 9
9   #include <cstdio>
10   #include <cstring>
11  
12 extern "C"
13 {
12   #include <errno.h>
13   #include <pwd.h>
14   #include <unistd.h>
17 }
18
15   #include <libsmbclient.h>
16  
17   struct Exception
# Line 40 | Line 36 | extern "C"
36   {
37          void authenticate(const char* srv, const char* shr, char* wg, int wglen, char* un, int unlen, char* pw, int pwlen)
38          {
39 <                std::cout << "srv = " << srv << std::endl << "shr = " << shr << std::endl << "wg = " << wg << std::endl << "un = " << un << std::endl << "un = ";
39 >                std::cout << "srv = " << srv << std::endl << "shr = " << shr << std::endl << "wg = " << wg << std::endl << "wglen = " << wglen << std::endl << "un = " << un << std::endl << "unlen = " << unlen << std::endl << "un = ";
40  
41                  std::string line;
42  
# Line 48 | Line 44 | extern "C"
44  
45                  if (!line.empty()) ::snprintf(un, unlen, line.c_str());
46  
47 +                std::cout << "pw = " << pw << std::endl << "pwlen = " << pwlen << std::endl;
48 +
49                  ::snprintf(pw, pwlen, "%s", ::getpass("pw = "));
50          }
51   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines