diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/connection.c | 8 | ||||
-rw-r--r-- | source3/smbd/trans2.c | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c index 7e53a29b04..5c31a5460b 100644 --- a/source3/smbd/connection.c +++ b/source3/smbd/connection.c @@ -108,13 +108,13 @@ static int count_fn( TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *u if (cs->Clear && !process_exists(crec.pid) && (errno == ESRCH)) { DEBUG(2,("pid %s doesn't exist - deleting connections %d [%s]\n", - procid_str_static(&crec.pid), crec.cnum, crec.name)); + procid_str_static(&crec.pid), crec.cnum, crec.servicename)); if (tdb_delete(the_tdb, kbuf) != 0) DEBUG(0,("count_fn: tdb_delete failed with error %s\n", tdb_errorstr(tdb) )); return 0; } - if (strequal(crec.name, cs->name)) + if (strequal(crec.servicename, cs->name)) cs->curr_connections++; return 0; @@ -191,8 +191,8 @@ BOOL claim_connection(connection_struct *conn, const char *name,int max_connecti if (conn) { crec.uid = conn->uid; crec.gid = conn->gid; - safe_strcpy(crec.name, - lp_servicename(SNUM(conn)),sizeof(crec.name)-1); + safe_strcpy(crec.servicename, + lp_servicename(SNUM(conn)),sizeof(crec.servicename)-1); } crec.start = time(NULL); crec.bcast_msg_flags = msg_flags; diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 04969784c0..8f1226c666 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -2247,7 +2247,7 @@ static int call_trans2qfsinfo(connection_struct *conn, char *inbuf, char *outbuf uint16 info_level; int data_len, len; SMB_STRUCT_STAT st; - char *vname = volume_label(SNUM(conn)); + const char *vname = volume_label(SNUM(conn)); int snum = SNUM(conn); char *fstype = lp_fstype(SNUM(conn)); int quota_flag = 0; @@ -2368,9 +2368,11 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)st.st_dev, (unsi SIVAL(pdata,8,str_checksum(lp_servicename(snum)) ^ (str_checksum(get_local_machine_name())<<16)); + /* Max label len is 32 characters. */ len = srvstr_push(outbuf, pdata+18, vname, -1, STR_UNICODE); SIVAL(pdata,12,len); data_len = 18+len; + DEBUG(5,("call_trans2qfsinfo : SMB_QUERY_FS_VOLUME_INFO namelen = %d, vol=%s serv=%s\n", (int)strlen(vname),vname, lp_servicename(snum))); break; |