diff options
author | Gerald Carter <jerry@samba.org> | 2005-09-30 17:13:37 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:04:48 -0500 |
commit | 54abd2aa66069e6baf7769c496f46d9dba18db39 (patch) | |
tree | 9cf8e88168011797319ba9e9866749201b1eac1e /source3/utils/net_status.c | |
parent | 4a2cc231d22a82ed21771a72508f15d21ed63227 (diff) | |
download | samba-54abd2aa66069e6baf7769c496f46d9dba18db39.tar.gz |
r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
(This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
Diffstat (limited to 'source3/utils/net_status.c')
-rw-r--r-- | source3/utils/net_status.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/source3/utils/net_status.c b/source3/utils/net_status.c index d5845972730..960379b3838 100644 --- a/source3/utils/net_status.c +++ b/source3/utils/net_status.c @@ -31,7 +31,7 @@ static int show_session(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, memcpy(&sessionid, dbuf.dptr, sizeof(sessionid)); - if (!process_exists(sessionid.pid)) { + if (!process_exists_by_pid(sessionid.pid)) { return 0; } @@ -101,8 +101,8 @@ static int show_share(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, return 0; } - d_printf("%-10.10s %5d %-12s %s", - crec.name,(int)crec.pid, + d_printf("%-10.10s %s %-12s %s", + crec.name,procid_str_static(&crec.pid), crec.machine, asctime(LocalTime(&crec.start))); @@ -125,7 +125,7 @@ static int collect_pid(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, memcpy(&sessionid, dbuf.dptr, sizeof(sessionid)); - if (!process_exists(sessionid.pid)) + if (!process_exists_by_pid(sessionid.pid)) return 0; ids->num_entries += 1; @@ -156,14 +156,15 @@ static int show_share_parseable(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, } for (i=0; i<ids->num_entries; i++) { - if (ids->entries[i].pid == crec.pid) { + struct process_id id = pid_to_procid(ids->entries[i].pid); + if (procid_equal(&id, &crec.pid)) { guest = False; break; } } - d_printf("%s\\%d\\%s\\%s\\%s\\%s\\%s", - crec.name,(int)crec.pid, + d_printf("%s\\%s\\%s\\%s\\%s\\%s\\%s", + crec.name,procid_str_static(&crec.pid), guest ? "" : uidtoname(ids->entries[i].uid), guest ? "" : gidtoname(ids->entries[i].gid), crec.machine, |