Chore Account server

Check-in [a1cb0fe2a0]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Make UDS group protection friendly
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:a1cb0fe2a012ecc008dc342549371da36e33d7031e59856b725f44c7f0fe69ed
User & Date: ajv-899-334-8894@vsta.org 2016-11-30 22:48:55
Context
2018-04-27
03:52
Track chore changes check-in: 105e6cf694 user: vandyswa@gmail.com tags: master, trunk
2016-11-30
22:48
Make UDS group protection friendly check-in: a1cb0fe2a0 user: ajv-899-334-8894@vsta.org tags: master, trunk
20:27
Get server name into title so bookmarks are more descriptive check-in: 6e9e3d2bcf user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to main.py.

1
2
3
4
5
6
7
8
9
10
11
12
...
271
272
273
274
275
276
277
278
279




280
281
282
283
284
285
286
#
# account.py
#	Manage user accounts across chore services
#
import sys, os, threading, socket, json
import chore
from get import GET_mixin
from post import POST_mixin

# Extra chars for service names, beyond isalnum()
OkChars = set([' ', '_'])

................................................................................
        nm = "/tmp/acct-%s" % (dom,)
        try:
            # Old instance
            os.unlink(nm)
        except:
            pass
        s = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
        os.fchmod(s.fileno(), 0660)
        s.bind(nm)




        sys.stderr.write("Account server for %s running\n" % (dom,))

        # Service loop
        while True:
            # Next request
            buf = s.recv(65536)





|







 







<

>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
...
271
272
273
274
275
276
277

278
279
280
281
282
283
284
285
286
287
288
289
#
# account.py
#	Manage user accounts across chore services
#
import sys, os, threading, socket, json, grp
import chore
from get import GET_mixin
from post import POST_mixin

# Extra chars for service names, beyond isalnum()
OkChars = set([' ', '_'])

................................................................................
        nm = "/tmp/acct-%s" % (dom,)
        try:
            # Old instance
            os.unlink(nm)
        except:
            pass
        s = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)

        s.bind(nm)
        os.chmod(nm, 0660)
	os.chown(nm,
	    os.getuid(),
	    grp.getgrnam(cfg.get("group", "chore")).gr_gid)
        sys.stderr.write("Account server for %s running\n" % (dom,))

        # Service loop
        while True:
            # Next request
            buf = s.recv(65536)