John Hodge [Fri, 7 Jan 2011 07:33:09 +0000 (15:33 +0800)]
Moved GetUserAuth out to Cokebank (removes potential duplication)
- Also did some cleanup changes (placed TODOs)
- Removed `dispense acct <name> =<value>` because it will mess up the
accounting logs.
John Hodge [Fri, 7 Jan 2011 07:16:57 +0000 (15:16 +0800)]
Actually implemented `dispense -u`
- Only the backend was implemented before
John Hodge [Fri, 7 Jan 2011 07:07:58 +0000 (15:07 +0800)]
Working on LDAP Authentication, added `dispense -u` support
John Hodge [Fri, 7 Jan 2011 03:57:27 +0000 (11:57 +0800)]
Moved to syslog for the dispense log
- Commenting changes
John Hodge [Fri, 7 Jan 2011 03:33:53 +0000 (11:33 +0800)]
Updated ShowUsage for the new commands
John Hodge [Fri, 7 Jan 2011 03:20:52 +0000 (11:20 +0800)]
Implemented altering user flags
- `dispense user type` added to set flags
John Hodge [Fri, 7 Jan 2011 01:54:05 +0000 (09:54 +0800)]
Added new user command (wheel only)
John Hodge [Thu, 6 Jan 2011 06:07:32 +0000 (14:07 +0800)]
Implemented limits on `dispense acct` and in ENUM_USERS
John Hodge [Thu, 6 Jan 2011 05:47:14 +0000 (13:47 +0800)]
Changed ENUM_ITEMS to the ENUM_USERS format
- Much cleaner client and server code now :)
John Hodge [Thu, 6 Jan 2011 05:41:28 +0000 (13:41 +0800)]
Cokebank now checks users' groups when getting flags
- Checks if the user is in the 'coke' or 'wheel' groups, and if they
are, sets the flags accordingly.
John Hodge [Thu, 6 Jan 2011 05:25:30 +0000 (13:25 +0800)]
Added coke group check to ADD
- Also fixed a place where a newline was not sent to the client
- Added a "door" flag
John Hodge [Thu, 6 Jan 2011 05:19:09 +0000 (13:19 +0800)]
Added user flags, disable server trace
- Added support for user flags to USER_INFO
> TODO: Check for coke or higher when doing a privalaged operation
- Unified ENUM_USERS and USER_INFO's output function
John Hodge [Thu, 6 Jan 2011 05:06:51 +0000 (13:06 +0800)]
Removed heap abuse from server (now uses sendf)
- Added cokebank.h
- Fixed namespace on user flags
John Hodge [Thu, 6 Jan 2011 04:43:31 +0000 (12:43 +0800)]
COPYING and README
- A little threadbare for now.
> Anyone else want to work on the readme?
John Hodge [Thu, 6 Jan 2011 04:25:45 +0000 (12:25 +0800)]
User enumeration implemented
- TODO: Implement <min balance> and <max balance>
- Updated protocol spec for extended ENUM_USERS
- Client Dispense_EnumUsers implemented
> Changed padding in Dispense_ShowUser
- Fixed client's ReadLine
> Was not using the remaining data in the buffer
- Created a common "cokebank.h" for server
> Moved pseudo-account names into this file
- Implemented ENUM_USERS at server side
> Copied sendf to the server to improve response times (and memory
usage)
John Hodge [Thu, 6 Jan 2011 03:40:22 +0000 (11:40 +0800)]
Updated protocol def
- Changed ENUM_USERS to return a list of USER_INFO responses.
- Adding stub support for reading user flags from cokebank (TODO:
standardise the flag values)
> Also TODO: Common header for the cokebank (shared between it and the
server)
John Hodge [Thu, 6 Jan 2011 03:08:53 +0000 (11:08 +0800)]
Removed debug from server, cleaning client
- Removed the last use of 'recv' from the client code.
- Added a catch to the cokebank code for the username 'root'
John Hodge [Thu, 6 Jan 2011 03:00:25 +0000 (11:00 +0800)]
Cleanup and Implementations
- Implemented `dispense acct <user>`
- Partitally implemented `dispense acct <user> +-<amt> <reason>`
> Seems to not like the '>liability' pseudo account (not letting it
go negative)
- Cleaned up more of the client code, and added debugging to it
John Hodge [Thu, 6 Jan 2011 00:05:55 +0000 (08:05 +0800)]
Fiddling with protocol (might redesign it a bit)
John Hodge [Wed, 5 Jan 2011 08:49:39 +0000 (16:49 +0800)]
Implemented `dispense add` in server
John Hodge [Wed, 5 Jan 2011 08:36:17 +0000 (16:36 +0800)]
More cleanup, implementing `dispense give`
John Hodge [Wed, 5 Jan 2011 08:22:37 +0000 (16:22 +0800)]
Restuctured cokebank
Moved all references to Unix UIDs out to bank.c where it can be
safely removed if required.
- The password code is still in main.c, because that doesn't matter
(if LDAP goes down, users will just be unable to use non-trusted
machines.
root [Wed, 5 Jan 2011 07:48:25 +0000 (15:48 +0800)]
Fixed coke handler, now can dispense a drink ^_^
root [Wed, 5 Jan 2011 06:55:32 +0000 (14:55 +0800)]
Fixes to the coke handler
John Hodge [Wed, 5 Jan 2011 06:28:48 +0000 (15:13 +0845)]
Fixed behavior in coke (maybe)
John Hodge [Wed, 5 Jan 2011 06:24:56 +0000 (15:09 +0845)]
Added check for second WaitForColon
John Hodge [Wed, 5 Jan 2011 06:20:51 +0000 (15:05 +0845)]
Does help if I spell it correctly
John Hodge [Wed, 5 Jan 2011 06:19:48 +0000 (15:04 +0845)]
Added root noauth hack
John Hodge [Wed, 5 Jan 2011 06:12:06 +0000 (14:57 +0845)]
Cleaning up client, cleaning coke code
John Hodge [Wed, 5 Jan 2011 05:00:24 +0000 (13:45 +0845)]
Cleaning up the NCurses GUI
John Hodge [Wed, 5 Jan 2011 04:36:05 +0000 (13:21 +0845)]
Cleanup work (much needed)
- Added basic logging code (TODO: USe syslog)
- Cleaned up client to remove that monolithic main()
- Added proper value for the dispense reason passed to CokeBank
- Added logging to basic CokeBank
John Hodge [Sat, 4 Dec 2010 15:54:47 +0000 (23:54 +0800)]
More fiddling with coke code
- TODO: Wait for a prompt correctly (if there is nothing waiting,
send newlines until we get the colon prompt)
John Hodge [Sat, 4 Dec 2010 13:05:49 +0000 (21:05 +0800)]
Moved serial port opening out into a helper, added delay
to coke read.
John Hodge [Sat, 4 Dec 2010 12:50:27 +0000 (20:50 +0800)]
Fixing serial handling
John Hodge [Sat, 4 Dec 2010 12:24:19 +0000 (20:24 +0800)]
Added log of coke machine test with picocom
John Hodge [Sat, 4 Dec 2010 11:54:57 +0000 (19:54 +0800)]
Updated items, set coke port to USB
John Hodge [Sat, 4 Dec 2010 10:41:16 +0000 (18:41 +0800)]
Cleaning up client code and server responses
- Commenting, it is nice :)
- Changed the handler interface to return boolean failure
- Cleaned up the server responses to correctly correspond with
the sped
John Hodge [Sat, 4 Dec 2010 10:08:01 +0000 (18:08 +0800)]
Fixing coke handler and login (a nice cleanup)
John Hodge [Sat, 4 Dec 2010 09:43:22 +0000 (17:43 +0800)]
Working on password-based user auth
John Hodge [Sat, 4 Dec 2010 08:18:00 +0000 (16:18 +0800)]
Door controller code (well, the start of it)
John Hodge [Sat, 4 Dec 2010 08:09:42 +0000 (16:09 +0800)]
Snack handler added
John Hodge [Sat, 4 Dec 2010 08:09:32 +0000 (16:09 +0800)]
Cleaning up client code
John Hodge [Tue, 30 Nov 2010 13:45:00 +0000 (21:45 +0800)]
Start on a ncurses GUI
> Very sparcely commented atm, and really needs to be sorted out,
but it renders.
John Hodge [Tue, 30 Nov 2010 11:40:57 +0000 (19:40 +0800)]
Fiddling with UI design
John Hodge [Tue, 30 Nov 2010 11:27:52 +0000 (19:27 +0800)]
Merge branch 'master' of serenade.mutabah.net:opendispense2
John Hodge [Tue, 30 Nov 2010 11:25:12 +0000 (19:25 +0800)]
User auths and client UI design
> Changed AUTOAUTH to return 404 on bad user
> Started work on a UI design for the `dispense` app
John Hodge [Tue, 23 Nov 2010 03:30:49 +0000 (11:30 +0800)]
Snack machine handlers
John Hodge [Tue, 23 Nov 2010 03:27:54 +0000 (11:27 +0800)]
Client work
- You could dispense now, if the client actually authed
John Hodge [Sat, 20 Nov 2010 22:02:17 +0000 (06:02 +0800)]
Started on the client
- Also, fiddle, fiddle, fiddle
John Hodge [Sat, 20 Nov 2010 19:03:51 +0000 (03:03 +0800)]
Fixed coke handler regex, added init for handlers
John Hodge [Sat, 20 Nov 2010 18:11:07 +0000 (02:11 +0800)]
Cleanups of bugs and segfaults
John Hodge [Sat, 20 Nov 2010 17:34:31 +0000 (01:34 +0800)]
Fixing basic cokebank to actually work
John Hodge [Sat, 20 Nov 2010 17:04:18 +0000 (01:04 +0800)]
Started work on an alternate cokebank that actually does something
John Hodge [Sat, 20 Nov 2010 15:12:51 +0000 (23:12 +0800)]
Why didn't this update properly?
John Hodge [Sat, 20 Nov 2010 15:09:24 +0000 (23:09 +0800)]
Restructured code into src/<module>
- Added cokebank library
> Also changed API slightly
- Implemented more of the protocol in server.c
- Coke handler started
- Other misc changes
John Hodge [Sat, 20 Nov 2010 07:47:58 +0000 (15:47 +0800)]
Item file parsing :)
- Added --itemfile to change the item file from the default
- Used the POSIX regex library to parse the item file
- Random cleanups
John Hodge [Sat, 20 Nov 2010 06:08:27 +0000 (14:08 +0800)]
Working on item database
John Hodge [Fri, 6 Aug 2010 11:32:52 +0000 (19:32 +0800)]
It's been so long, I don't know what I did
John Hodge [Mon, 12 Jul 2010 02:35:25 +0000 (10:35 +0800)]
Cleaning up cokebank code
John Hodge [Mon, 12 Jul 2010 02:00:30 +0000 (10:00 +0800)]
And, modified .gitignore to ignore the binary
John Hodge [Mon, 12 Jul 2010 02:00:01 +0000 (10:00 +0800)]
Hey, It's a .gitignore file!
John Hodge [Mon, 12 Jul 2010 01:59:05 +0000 (09:59 +0800)]
Implemented AUTOAUTH
John Hodge [Sun, 11 Jul 2010 15:18:49 +0000 (23:18 +0800)]
Adding some nice debug
John Hodge [Sun, 11 Jul 2010 14:39:17 +0000 (22:39 +0800)]
Server now listens and accepts connections (and returns a value to USER)
John Hodge [Sun, 11 Jul 2010 14:10:46 +0000 (22:10 +0800)]
Compile fixes
John Hodge [Sun, 11 Jul 2010 11:22:59 +0000 (19:22 +0800)]
Moar server work
John Hodge [Sun, 11 Jul 2010 11:02:14 +0000 (19:02 +0800)]
Slight change to the proto
John Hodge [Sun, 11 Jul 2010 10:24:22 +0000 (18:24 +0800)]
Skeleton server code (compiles, just doesn't do anything)
John Hodge [Sun, 11 Jul 2010 10:24:05 +0000 (18:24 +0800)]
Basic outline
UCC git Repository :: git.ucc.asn.au