Solved

Git Check Time of Client

Posted on 2016-09-12
2
35 Views
Last Modified: 2016-10-03
We need to check time of Client from where user is connecting to git server & refuse the connection if the time difference between the server & client is not correct by some margin.

Example : if the time on Server is 18:00 UTC & the time of client is 21:00 UTC, I would like to refuse connection.

I believe this should be forced at Linux Server Level.Please let me know how to accomplish this.
0
Comment
Question by:sivaatluri
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 34

Accepted Solution

by:
Duncan Roe earned 500 total points (awarded by participants)
ID: 41797161
I think you will have to write your own solution. What you need to do is connect to the client system on port 37 (the timeserver port) and read the client's idea of the time from there, as per RFC 868. This requires that clients support time service: under Linux, inetd supports time as an internal service (so it has to be enabled in /etc/inetd.conf); under Windows I do not know what to do, but likely you additionally have to enable port 37 in the firewall.
You can get a report of the time difference from the netdate utility (not run as root ;)
11:08:53$ netdate dwarfstar
netdate: settimeofday: Operation not permitted
dwarfstar -11.352        Wed Sep 14 11:11:17.000
11:11:28$ 

Open in new window

Slackware has had netdate for ever. It's very old, and I couldn't easily find it on the web. I can post the source as an attachment if you like - it's only about 500 lines.

Do you need a plan for integrating your solution with the git server?
0
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 41826014
The proposed solution is certainly valid as far as it goes. It does require some effort on the part of the author to implement a working solution, but describes the steps necessary to achieve one.
The author has not seen fit to respond , so we have to assume he is content with this partial solution, and close it with a 'B'.
Should the author wish to keep the question open, he has 4 days to object to the proposed closure.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to create a branch, fetch changes, and merge them into another branch using the EGit plugin for Eclipse.

742 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question