Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Git Check Time of Client

Posted on 2016-09-12
2
Medium Priority
?
45 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 35

Accepted Solution

by:
Duncan Roe earned 1500 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 35

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
A publishing tool, a Version Control System, or a Collaboration Platform! These can be some of the defining words for the two very famous web-hosting Git repositories: Bitbucket and Github. Git is widely used amongst the programmers and developers f…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

610 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