diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-08-25 19:47:57 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:30:13 -0500 |
commit | 5993ddf240a945ae770754454a201c3f7a0ad7d8 (patch) | |
tree | f8f80827d86c094944175774f96212939a3bd14e | |
parent | d61c180e4903012a868c36e19473ccff5545976c (diff) | |
download | samba-5993ddf240a945ae770754454a201c3f7a0ad7d8.tar.gz samba-5993ddf240a945ae770754454a201c3f7a0ad7d8.tar.bz2 samba-5993ddf240a945ae770754454a201c3f7a0ad7d8.zip |
r24659: Some formatting changes helping to minimize the 3_2_0 diff
(This used to be commit c5caea43af154671448df82881efe09a5c982386)
-rw-r--r-- | source3/smbd/negprot.c | 9 | ||||
-rw-r--r-- | source3/smbd/nttrans.c | 6 | ||||
-rw-r--r-- | source3/smbd/reply.c | 16 |
3 files changed, 15 insertions, 16 deletions
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index 935d25fab3..4437f0bd3f 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -229,10 +229,9 @@ static DATA_BLOB negprot_spnego(void) char *host_princ_s = NULL; name_to_fqdn(myname, global_myname()); strlower_m(myname); - asprintf(&host_princ_s, "cifs/%s@%s", myname, lp_realm()); - if (host_princ_s == NULL) { - blob = data_blob_null; - return blob; + if (asprintf(&host_princ_s, "cifs/%s@%s", myname, lp_realm()) + == -1) { + return data_blob_null; } blob = spnego_gen_negTokenInit(guid, OIDs_krb5, host_princ_s); SAFE_FREE(host_princ_s); @@ -540,7 +539,7 @@ void reply_negprot(connection_struct *conn, struct smb_request *req) num_cliprotos = 0; cliprotos = NULL; - while (p < (smb_buf(req->inbuf) + bcc)) { + while (p < (smb_buf(req->inbuf) + bcc)) { char **tmp; diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 907176c161..5e20002339 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -859,19 +859,19 @@ void reply_ntcreate_and_X(connection_struct *conn, create_options, file_attributes, &info, &fsp); - } } TALLOC_FREE(case_state); - if (!NT_STATUS_IS_OK(status)) { - END_PROFILE(SMBntcreateX); + if (!NT_STATUS_IS_OK(status)) { if (open_was_deferred(req->mid)) { /* We have re-scheduled this call. */ + END_PROFILE(SMBntcreateX); return; } reply_openerror(req, status); + END_PROFILE(SMBntcreateX); return; } diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index b3c4717b0b..c3ae4ef61f 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -486,7 +486,7 @@ void reply_tcon(connection_struct *conn, struct smb_request *req) SSVAL(req->outbuf,smb_vwv1,conn->cnum); SSVAL(req->outbuf,smb_tid,conn->cnum); - DEBUG(3,("tcon service=%s cnum=%d\n", + DEBUG(3,("tcon service=%s cnum=%d\n", service, conn->cnum)); END_PROFILE(SMBtcon); @@ -1550,12 +1550,13 @@ void reply_open(connection_struct *conn, struct smb_request *req) &info, &fsp); if (!NT_STATUS_IS_OK(status)) { - END_PROFILE(SMBopen); if (open_was_deferred(req->mid)) { + END_PROFILE(SMBopen); /* We have re-scheduled this call. */ return; } reply_openerror(req, status); + END_PROFILE(SMBopen); return; } @@ -1876,7 +1877,7 @@ void reply_mknew(connection_struct *conn, struct smb_request *req) srvstr_get_path((char *)req->inbuf, req->flags2, fname, smb_buf(req->inbuf) + 1, sizeof(fname), 0, - STR_TERMINATE, &status); + STR_TERMINATE, &status); if (!NT_STATUS_IS_OK(status)) { reply_nterror(req, status); END_PROFILE(SMBcreate); @@ -1947,7 +1948,6 @@ void reply_mknew(connection_struct *conn, struct smb_request *req) file_ntimes(conn, fname, ts); reply_outbuf(req, 1, 0); - SSVAL(req->outbuf,smb_vwv0,fsp->fnum); if (oplock_request && lp_fake_oplocks(SNUM(conn))) { @@ -2059,12 +2059,13 @@ void reply_ctemp(connection_struct *conn, struct smb_request *req) close(tmpfd); if (!NT_STATUS_IS_OK(status)) { - END_PROFILE(SMBctemp); if (open_was_deferred(req->mid)) { /* We have re-scheduled this call. */ + END_PROFILE(SMBctemp); return; } reply_openerror(req, status); + END_PROFILE(SMBctemp); return; } @@ -2668,7 +2669,7 @@ void reply_readbraw(connection_struct *conn, struct smb_request *req) fsp = file_fsp(SVAL(req->inbuf,smb_vwv0)); - /* + /* * We have to do a check_fsp by hand here, as * we must always return 4 zero bytes on error, * not a NTSTATUS. @@ -2760,7 +2761,7 @@ void reply_readbraw(connection_struct *conn, struct smb_request *req) if (startpos >= size) { nread = 0; } else { - nread = MIN(maxcount,(size - startpos)); + nread = MIN(maxcount,(size - startpos)); } #if 0 /* mincount appears to be ignored in a W2K server. JRA. */ @@ -3088,7 +3089,6 @@ static void send_file_readX(connection_struct *conn, struct smb_request *req, TALLOC_FREE(req->outbuf); return; } - #endif normal_read: |