diff options
author | Luke Leighton <lkcl@samba.org> | 1998-10-19 17:32:10 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1998-10-19 17:32:10 +0000 |
commit | fcfb40d2b0fc565ee4f66b3a3761c246366a2ef3 (patch) | |
tree | 09e62ed58c4a541be7551a637655f14d5c67f38d /source/lib | |
parent | 9b249c075e53e6cf75399d60a6371648c03104fa (diff) | |
download | samba-fcfb40d2b0fc565ee4f66b3a3761c246366a2ef3.tar.gz |
- dce/rpc code
- removed debug info in struni2 and unistr2 (security risk)
- rpc_pipe function was getting pointer to data then calling realloc *dur*
- password check function, the start of "credential checking",
user, wks, domain, pass as the credentials (not just user,pass which
is incorrect in a domain context)
- cli_write needs to return ssize_t not size_t, because total can be -1
if the write fails.
- fixed signed / unsigned warnings (how come i don't get those any more
when i compile with gcc???)
- nt password change added in smbd. yes, jeremy, i verified that the
SMBtrans2 version still works.
Diffstat (limited to 'source/lib')
-rw-r--r-- | source/lib/util.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/source/lib/util.c b/source/lib/util.c index b49369a5820..f2cd2a99d11 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -4490,16 +4490,11 @@ char *unistrn2(uint16 *buf, int len) nexti = (nexti+1)%8; - DEBUG(10, ("unistrn2: ")); - for (p = lbuf; *buf && p-lbuf < MAXUNI-2 && len > 0; len--, p++, buf++) { - DEBUG(10, ("%4x ", *buf)); *p = *buf; } - DEBUG(10,("\n")); - *p = 0; return lbuf; } @@ -4518,16 +4513,11 @@ char *unistr2(uint16 *buf) nexti = (nexti+1)%8; - DEBUG(10, ("unistr2: ")); - for (p = lbuf; *buf && p-lbuf < MAXUNI-2; p++, buf++) { - DEBUG(10, ("%4x ", *buf)); *p = *buf; } - DEBUG(10,("\n")); - *p = 0; return lbuf; } @@ -4545,17 +4535,12 @@ int struni2(uint16 *p, char *buf) if (p == NULL) return 0; - DEBUG(10, ("struni2: ")); - if (buf != NULL) { for (; *buf && len < MAXUNI-2; len++, p++, buf++) { - DEBUG(10, ("%2x ", *buf)); *p = *buf; } - - DEBUG(10,("\n")); } *p = 0; @@ -4857,6 +4842,10 @@ int set_maxfiles(int requested_max) #if (defined(HAVE_GETRLIMIT) && defined(RLIMIT_NOFILE)) struct rlimit rlp; getrlimit(RLIMIT_NOFILE, &rlp); + /* Set the fd limit to be real_max_open_files + MAX_OPEN_FUDGEFACTOR to + * account for the extra fd we need + * as well as the log files and standard + * handles etc. */ rlp.rlim_cur = MIN(requested_max,rlp.rlim_max); setrlimit(RLIMIT_NOFILE, &rlp); getrlimit(RLIMIT_NOFILE, &rlp); @@ -4868,4 +4857,3 @@ int set_maxfiles(int requested_max) return requested_max; #endif } - |