da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER START
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The contents of this file are subject to the terms of the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Common Development and Distribution License (the "License").
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You may not use this file except in compliance with the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * See the License for the specific language governing permissions
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and limitations under the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * When distributing Covered Code, include this CDDL HEADER in each
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * If applicable, add the following below this CDDL HEADER, with the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * fields enclosed by brackets "[]" replaced with your own identifying
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * information: Portions Copyright [yyyy] [name of copyright owner]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER END
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
8d7e41661dc4633488e93b13363137523ce59977jose borrego * Client NDR RPC interface.
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States#include <sys/tzfile.h>
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States#include <unistd.h>
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States#include <syslog.h>
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States#include <mlsvc.h>
8d7e41661dc4633488e93b13363137523ce59977jose borregostatic int ndr_xa_init(ndr_client_t *, ndr_xa_t *);
8d7e41661dc4633488e93b13363137523ce59977jose borregostatic int ndr_xa_exchange(ndr_client_t *, ndr_xa_t *);
8d7e41661dc4633488e93b13363137523ce59977jose borregostatic int ndr_xa_read(ndr_client_t *, ndr_xa_t *);
8d7e41661dc4633488e93b13363137523ce59977jose borregostatic void ndr_xa_preserve(ndr_client_t *, ndr_xa_t *);
8d7e41661dc4633488e93b13363137523ce59977jose borregostatic void ndr_xa_destruct(ndr_client_t *, ndr_xa_t *);
8d7e41661dc4633488e93b13363137523ce59977jose borrego * This call must be made to initialize an RPC client structure and bind
8d7e41661dc4633488e93b13363137523ce59977jose borrego * to the remote service before any RPCs can be exchanged with that service.
8d7e41661dc4633488e93b13363137523ce59977jose borrego * The mlsvc_handle_t is a wrapper that is used to associate an RPC handle
8d7e41661dc4633488e93b13363137523ce59977jose borrego * with the client context for an instance of the interface. The handle
8d7e41661dc4633488e93b13363137523ce59977jose borrego * is zeroed to ensure that it doesn't look like a valid handle -
8d7e41661dc4633488e93b13363137523ce59977jose borrego * handle content is provided by the remove service.
8d7e41661dc4633488e93b13363137523ce59977jose borrego * The client points to this top-level handle so that we know when to
8d7e41661dc4633488e93b13363137523ce59977jose borrego * unbind and teardown the connection. As each handle is initialized it
8d7e41661dc4633488e93b13363137523ce59977jose borrego * will inherit a reference to the client context.
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * Returns 0 or an NT_STATUS:
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * NT_STATUS_BAD_NETWORK_PATH (get server addr)
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * NT_STATUS_NETWORK_ACCESS_DENIED (connect, auth)
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * NT_STATUS_BAD_NETWORK_NAME (tcon, open)
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * NT_STATUS_ACCESS_DENIED (open pipe)
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * NT_STATUS_INVALID_PARAMETER (rpc bind)
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * NT_STATUS_INTERNAL_ERROR (bad args etc)
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * NT_STATUS_NO_MEMORY
8d7e41661dc4633488e93b13363137523ce59977jose borregondr_rpc_bind(mlsvc_handle_t *handle, char *server, char *domain,
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross if (handle == NULL || server == NULL || server[0] == '\0' ||
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross /* In case the service was not registered... */
8d7e41661dc4633488e93b13363137523ce59977jose borrego if ((svc = ndr_svc_lookup_name(service)) == NULL)
a0aa776e20803c84edd153d9cb584fd67163aef3Alan Wright * Set the default based on the assumption that most
1ed6b69a5ca1ca3ee5e9a4931f74e2237c7e1c9fGordon Ross * servers will be Windows 2000 or later. This used to
1ed6b69a5ca1ca3ee5e9a4931f74e2237c7e1c9fGordon Ross * try to get the actual server version, but that RPC
1ed6b69a5ca1ca3ee5e9a4931f74e2237c7e1c9fGordon Ross * is not necessarily allowed anymore, so don't bother.
1ed6b69a5ca1ca3ee5e9a4931f74e2237c7e1c9fGordon Ross * Some callers pass this when they want a NULL session.
1ed6b69a5ca1ca3ee5e9a4931f74e2237c7e1c9fGordon Ross * Todo: have callers pass an empty string for that.
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * Setup smbfs library handle, authenticate, connect to
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * the IPC$ share. This will reuse an existing connection
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * if the driver already has one for this combination of
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * server, user, domain. It may return any of:
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * NT_STATUS_BAD_NETWORK_PATH (get server addr)
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * NT_STATUS_NETWORK_ACCESS_DENIED (connect, auth)
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * NT_STATUS_BAD_NETWORK_NAME (tcon)
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross status = smbrdr_ctx_new(&ctx, server, domain, username);
1ed6b69a5ca1ca3ee5e9a4931f74e2237c7e1c9fGordon Ross "(Srv=%s Dom=%s User=%s), %s (0x%x)",
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross /* Tell the DC Locator this DC failed. */
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * Open the named pipe.
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross "smb_fh_open (%s) err=%d",
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * Setup the RPC client handle.
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross if ((clnt = malloc(sizeof (ndr_client_t))) == NULL) {
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * Fill in the caller's handle.
fe1c642d06e14b412cd83ae2179303186ab08972Bill Krier bcopy(&svinfo, &handle->svinfo, sizeof (srvsvc_server_info_t));
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * Do the OtW RPC bind.
8d7e41661dc4633488e93b13363137523ce59977jose borrego rc = ndr_clnt_bind(clnt, service, &clnt->binding);
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross case NDR_DRC_FAULT_API_SERVICE_INVALID: /* not registered */
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross /* FALLTHROUGH */
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross "ndr_clnt_bind, %s (0x%x)",
8d7e41661dc4633488e93b13363137523ce59977jose borrego * Unbind and close the pipe to an RPC service.
8d7e41661dc4633488e93b13363137523ce59977jose borrego * If the heap has been preserved we need to go through an xa release.
8d7e41661dc4633488e93b13363137523ce59977jose borrego * The heap is preserved during an RPC call because that's where data
8d7e41661dc4633488e93b13363137523ce59977jose borrego * returned from the server is stored.
8d7e41661dc4633488e93b13363137523ce59977jose borrego * Otherwise we destroy the heap directly.
8d7e41661dc4633488e93b13363137523ce59977jose borrego * Call the RPC function identified by opnum. The remote service is
8d7e41661dc4633488e93b13363137523ce59977jose borrego * identified by the handle, which should have been initialized by
8d7e41661dc4633488e93b13363137523ce59977jose borrego * ndr_rpc_bind.
8d7e41661dc4633488e93b13363137523ce59977jose borrego * If the RPC call is successful (returns 0), the caller must call
8d7e41661dc4633488e93b13363137523ce59977jose borrego * ndr_rpc_release to release the heap. Otherwise, we release the
8d7e41661dc4633488e93b13363137523ce59977jose borrego * heap here.
8d7e41661dc4633488e93b13363137523ce59977jose borregondr_rpc_call(mlsvc_handle_t *handle, int opnum, void *params)
8d7e41661dc4633488e93b13363137523ce59977jose borrego return (-1);
8d7e41661dc4633488e93b13363137523ce59977jose borrego rc = ndr_clnt_call(clnt->binding, opnum, params);
fe1c642d06e14b412cd83ae2179303186ab08972Bill Krier * Always clear the nonull flag to ensure
fe1c642d06e14b412cd83ae2179303186ab08972Bill Krier * it is not applied to subsequent calls.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw return (-1);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw return (0);
fe1c642d06e14b412cd83ae2179303186ab08972Bill Krier * Outgoing strings should not be null terminated.
fe1c642d06e14b412cd83ae2179303186ab08972Bill Krier * Return a reference to the server info.
fe1c642d06e14b412cd83ae2179303186ab08972Bill Krier * Return the RPC server OS level.
e3f2c991a8548408db0a2787bd8b43d5124821d3Keyur Desai * Get the session key from a bound RPC client handle.
e3f2c991a8548408db0a2787bd8b43d5124821d3Keyur Desai * The key returned is the 16-byte "user session key"
e3f2c991a8548408db0a2787bd8b43d5124821d3Keyur Desai * established by the underlying authentication protocol
e3f2c991a8548408db0a2787bd8b43d5124821d3Keyur Desai * (either Kerberos or NTLM). This key is needed for
e3f2c991a8548408db0a2787bd8b43d5124821d3Keyur Desai * SAM RPC calls such as SamrSetInformationUser, etc.
e3f2c991a8548408db0a2787bd8b43d5124821d3Keyur Desai * See [MS-SAMR] sections: 2.2.3.3, 2.2.7.21, 2.2.7.25.
e3f2c991a8548408db0a2787bd8b43d5124821d3Keyur Desai * Returns zero (success) or an errno.
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross rc = smb_fh_getssnkey(clnt->xa_fd, ssn_key, len);
8d7e41661dc4633488e93b13363137523ce59977jose borregondr_rpc_malloc(mlsvc_handle_t *handle, size_t size)
8d7e41661dc4633488e93b13363137523ce59977jose borrego * Must be called by RPC clients to free the heap after a successful RPC
8d7e41661dc4633488e93b13363137523ce59977jose borrego * call, i.e. ndr_rpc_call returned 0. The caller should take a copy
8d7e41661dc4633488e93b13363137523ce59977jose borrego * of any data returned by the RPC prior to calling this function because
8d7e41661dc4633488e93b13363137523ce59977jose borrego * returned data is in the heap.
8d7e41661dc4633488e93b13363137523ce59977jose borrego * Returns true if the handle is null.
8d7e41661dc4633488e93b13363137523ce59977jose borrego * Otherwise returns false.
8d7e41661dc4633488e93b13363137523ce59977jose borrego if (!memcmp(&handle->handle, &zero_handle, sizeof (ndr_hdid_t)))
8d7e41661dc4633488e93b13363137523ce59977jose borrego * Returns true if the handle is the top level bind handle.
8d7e41661dc4633488e93b13363137523ce59977jose borrego * Otherwise returns false.
8d7e41661dc4633488e93b13363137523ce59977jose borrego return (handle->clnt->handle == &handle->handle);
8d7e41661dc4633488e93b13363137523ce59977jose borrego * Pass the client reference from parent to child.
8d7e41661dc4633488e93b13363137523ce59977jose borregondr_inherit_handle(mlsvc_handle_t *child, mlsvc_handle_t *parent)
fe1c642d06e14b412cd83ae2179303186ab08972Bill Krier bcopy(&parent->svinfo, &child->svinfo, sizeof (srvsvc_server_info_t));
8d7e41661dc4633488e93b13363137523ce59977jose borregondr_rpc_status(mlsvc_handle_t *handle, int opnum, DWORD status)
8d7e41661dc4633488e93b13363137523ce59977jose borrego char *s = "unknown";
8d7e41661dc4633488e93b13363137523ce59977jose borrego s = "success";
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright s = "warning";
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright s = "error";
8d7e41661dc4633488e93b13363137523ce59977jose borrego name, opnum, s, xlate_nt_status(status), status);
8d7e41661dc4633488e93b13363137523ce59977jose borrego * The following functions provide the client callback interface.
8d7e41661dc4633488e93b13363137523ce59977jose borrego * If the caller hasn't provided a heap, create one here.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw return (-1);
fe1c642d06e14b412cd83ae2179303186ab08972Bill Krier rc = nds_initialize(send_nds, 0, NDR_MODE_CALL_SEND, heap);
fe1c642d06e14b412cd83ae2179303186ab08972Bill Krier rc = nds_initialize(recv_nds, NDR_PDU_SIZE_HINT_DEFAULT,
fe1c642d06e14b412cd83ae2179303186ab08972Bill Krier if (rc != 0) {
fe1c642d06e14b412cd83ae2179303186ab08972Bill Krier return (-1);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw return (0);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This is the entry pointy for an RPC client call exchange with
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * a server, which will result in an smbrdr SmbTransact request.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SmbTransact should return the number of bytes received, which
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * we record as the PDU size, or a negative error code.
8d7e41661dc4633488e93b13363137523ce59977jose borregondr_xa_exchange(ndr_client_t *clnt, ndr_xa_t *mxa)
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross send_nds->pdu_size, (char *)send_nds->pdu_base_offset,
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross &nbytes, (char *)recv_nds->pdu_base_offset, &more);
8d7e41661dc4633488e93b13363137523ce59977jose borrego return (-1);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This entry point will be invoked if the xa-exchange response contained
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * only the first fragment of a multi-fragment response. The RPC client
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * code will then make repeated xa-read requests to obtain the remaining
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * fragments, which will result in smbrdr SmbReadX requests.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SmbReadX should return the number of bytes received, in which case we
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * expand the PDU size to include the received data, or a negative error
8d7e41661dc4633488e93b13363137523ce59977jose borrego if ((len = (nds->pdu_max_size - nds->pdu_size)) < 0)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw return (-1);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw return (-1);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw return (-1);
8d7e41661dc4633488e93b13363137523ce59977jose borrego * Preserve the heap so that the client application has access to data
8d7e41661dc4633488e93b13363137523ce59977jose borrego * returned from the server after an RPC call.
8d7e41661dc4633488e93b13363137523ce59977jose borregondr_xa_preserve(ndr_client_t *clnt, ndr_xa_t *mxa)
8d7e41661dc4633488e93b13363137523ce59977jose borrego * Dispose of the transaction streams. If the heap has not been
8d7e41661dc4633488e93b13363137523ce59977jose borrego * preserved, we can destroy it here.
8d7e41661dc4633488e93b13363137523ce59977jose borregondr_xa_destruct(ndr_client_t *clnt, ndr_xa_t *mxa)
8d7e41661dc4633488e93b13363137523ce59977jose borrego * Dispose of a preserved heap.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstatic void
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States/*
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States * Compare the time here with the remote time on the server
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States * and report clock skew.
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States */
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United Statesvoid
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United Statesndr_srvsvc_timecheck(char *server, char *domain)
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States{
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States char hostname[MAXHOSTNAMELEN];
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States struct timeval dc_tv;
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States struct tm dc_tm;
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States struct tm *tm;
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States time_t tnow;
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States time_t tdiff;
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States int priority;
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States if (srvsvc_net_remote_tod(server, domain, &dc_tv, &dc_tm) < 0) {
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States syslog(LOG_DEBUG, "srvsvc_net_remote_tod failed");
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States return;
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States }
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States tnow = time(NULL);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States if (tnow > dc_tv.tv_sec)
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States tdiff = (tnow - dc_tv.tv_sec) / SECSPERMIN;
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States else
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States tdiff = (dc_tv.tv_sec - tnow) / SECSPERMIN;
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States if (tdiff != 0) {
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States (void) strlcpy(hostname, "localhost", MAXHOSTNAMELEN);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States (void) gethostname(hostname, MAXHOSTNAMELEN);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States priority = (tdiff > 2) ? LOG_NOTICE : LOG_DEBUG;
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States syslog(priority, "DC [%s] clock skew detected: %u minutes",
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States server, tdiff);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States tm = gmtime(&dc_tv.tv_sec);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States syslog(priority, "%-8s UTC: %s", server, asctime(tm));
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States tm = gmtime(&tnow);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States syslog(priority, "%-8s UTC: %s", hostname, asctime(tm));
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States }