2019-04-09 15:47:33 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
*--------------------------------------
|
2020-02-17 16:55:02 +00:00
|
|
|
|
* ZPPtr1 : UID
|
|
|
|
|
* TXTPTR : pName (Input)
|
|
|
|
|
* FORPNT : pPW (Output)
|
2019-04-11 15:59:57 +00:00
|
|
|
|
* ZPPtr3 : pDB
|
|
|
|
|
* USERNAME:PASSWORD:UID:GID:GECOS:HOME:SHELL\CR
|
|
|
|
|
* ....\CR
|
|
|
|
|
* \0
|
2019-04-09 15:47:33 +00:00
|
|
|
|
*--------------------------------------
|
2020-03-12 16:44:11 +00:00
|
|
|
|
PWDX.GetPWUID lda PWD.hUsrDB
|
2020-09-10 06:28:51 +00:00
|
|
|
|
beq PWDX.GetPW.9
|
2019-04-12 15:41:05 +00:00
|
|
|
|
|
|
|
|
|
jsr K.GetmemPtr
|
|
|
|
|
>STYA ZPPtr3
|
|
|
|
|
|
|
|
|
|
.1 lda (ZPPtr3)
|
2020-09-10 06:28:51 +00:00
|
|
|
|
beq PWDX.GetPW.99 EOF
|
2020-03-13 07:15:58 +00:00
|
|
|
|
|
2019-04-12 15:41:05 +00:00
|
|
|
|
ldy #0
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.NextString skip USERNAME
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.NextString skip PASSWORD
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.GetByte get UID
|
2019-04-12 15:41:05 +00:00
|
|
|
|
cmp ZPPtr1+1
|
2020-09-10 06:28:51 +00:00
|
|
|
|
beq PWDX.GetPW.8
|
2019-10-11 13:06:33 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.NextLine
|
2019-04-12 15:41:05 +00:00
|
|
|
|
bra .1
|
2019-10-11 13:06:33 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
PWDX.GetPW.8 ldx FORPNT+1
|
2019-06-06 15:45:40 +00:00
|
|
|
|
beq .8 Dry run, no output
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jmp PWDX.Record2PW
|
2019-10-11 13:06:33 +00:00
|
|
|
|
|
2019-06-06 15:45:40 +00:00
|
|
|
|
.8 clc a = UID
|
2019-06-06 06:37:30 +00:00
|
|
|
|
rts
|
2019-10-11 13:06:33 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
PWDX.GetPW.9 lda #E.IPWDDB
|
2019-10-11 13:06:33 +00:00
|
|
|
|
.HS 2C BIT ABS
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
PWDX.GetPW.99 lda #E.IUSR
|
2019-04-12 15:41:05 +00:00
|
|
|
|
sec
|
2020-09-10 06:28:51 +00:00
|
|
|
|
PWDX.GetPW.RTS rts
|
2020-02-14 07:21:56 +00:00
|
|
|
|
*--------------------------------------
|
2020-03-12 16:44:11 +00:00
|
|
|
|
PWDX.GetPWName lda PWD.hUsrDB
|
2020-09-10 06:28:51 +00:00
|
|
|
|
beq PWDX.GetPW.9
|
2019-04-09 15:47:33 +00:00
|
|
|
|
|
2019-04-12 15:41:05 +00:00
|
|
|
|
jsr K.GetmemPtr
|
|
|
|
|
>STYA ZPPtr3
|
2019-04-15 05:40:13 +00:00
|
|
|
|
|
|
|
|
|
ldy #0
|
2019-07-28 20:39:30 +00:00
|
|
|
|
jsr SHARED.TXTPTR.GetY
|
2020-09-10 06:28:51 +00:00
|
|
|
|
beq PWDX.GetPW.99
|
2019-04-29 05:59:01 +00:00
|
|
|
|
|
2019-04-15 05:40:13 +00:00
|
|
|
|
.1 lda (ZPPtr3)
|
2020-09-10 06:28:51 +00:00
|
|
|
|
beq PWDX.GetPW.99
|
2019-04-15 05:40:13 +00:00
|
|
|
|
|
2019-04-12 15:41:05 +00:00
|
|
|
|
ldy #$ff
|
2019-10-03 06:25:27 +00:00
|
|
|
|
.2 iny
|
2019-07-28 20:39:30 +00:00
|
|
|
|
jsr SHARED.TXTPTR.GetY
|
2019-04-12 15:41:05 +00:00
|
|
|
|
beq .4
|
2019-10-11 13:06:33 +00:00
|
|
|
|
|
2019-04-12 15:41:05 +00:00
|
|
|
|
cmp (ZPPtr3),y
|
|
|
|
|
beq .2
|
2019-10-11 13:06:33 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
.3 jsr PWDX.NextLine
|
2019-04-12 15:41:05 +00:00
|
|
|
|
bra .1
|
2019-10-11 13:06:33 +00:00
|
|
|
|
|
2019-04-12 15:41:05 +00:00
|
|
|
|
.4 lda (ZPPtr3),y
|
|
|
|
|
cmp #':'
|
2019-10-11 13:06:33 +00:00
|
|
|
|
bne .3
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-02-17 16:55:02 +00:00
|
|
|
|
ldx FORPNT+1
|
2019-06-06 15:45:40 +00:00
|
|
|
|
beq .8
|
2019-10-11 13:06:33 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jmp PWDX.Record2PW
|
2019-10-11 13:06:33 +00:00
|
|
|
|
|
2019-06-06 15:45:40 +00:00
|
|
|
|
.8 iny
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.NextString skip PASSWORD
|
|
|
|
|
jmp PWDX.GetByte get UID
|
2019-04-09 15:47:33 +00:00
|
|
|
|
*--------------------------------------
|
2020-07-08 15:26:23 +00:00
|
|
|
|
* TXTPTR : pPW (Input)
|
2019-04-26 15:07:22 +00:00
|
|
|
|
* ZPPtr3 : pDB
|
|
|
|
|
*--------------------------------------
|
2020-03-12 16:44:11 +00:00
|
|
|
|
PWDX.PutPW lda PWD.hUsrDB
|
2020-07-09 15:13:30 +00:00
|
|
|
|
bne PWDX.PutPW.1
|
2019-10-11 13:06:33 +00:00
|
|
|
|
|
2019-04-11 15:59:57 +00:00
|
|
|
|
ldy #S.PW.UID
|
2019-07-28 20:39:30 +00:00
|
|
|
|
jsr SHARED.TXTPTR.GetY
|
2020-09-10 10:43:37 +00:00
|
|
|
|
bne PWDX.GetPW.99 Must be ROOT user
|
2019-10-11 13:06:33 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.GetRecordLen
|
2019-04-25 15:33:56 +00:00
|
|
|
|
tay
|
|
|
|
|
lda #0
|
2020-09-11 15:01:48 +00:00
|
|
|
|
|
|
|
|
|
>STYA PWD.UsrDBSize
|
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
iny
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
inc
|
|
|
|
|
|
2020-09-11 15:01:48 +00:00
|
|
|
|
.1 jsr K.getmem
|
2020-09-10 06:28:51 +00:00
|
|
|
|
bcs PWDX.GetPW.RTS
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
2019-04-25 15:33:56 +00:00
|
|
|
|
>STYA ZPPtr3
|
2020-03-12 16:44:11 +00:00
|
|
|
|
stx PWD.hUsrDB
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-08 15:26:23 +00:00
|
|
|
|
lda #0
|
|
|
|
|
sta (ZPPtr3)
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.AppendRecord
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-09 15:13:30 +00:00
|
|
|
|
lda PWD.hGrpDB
|
|
|
|
|
beq .2
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-09 15:13:30 +00:00
|
|
|
|
jsr K.freemem
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-09-11 15:01:48 +00:00
|
|
|
|
.2 >LDYAI PWDX.GROUP.Size+1
|
2020-07-09 15:13:30 +00:00
|
|
|
|
>STYA PWD.GrpDBSize
|
|
|
|
|
jsr K.getmem
|
|
|
|
|
bcs .9
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-09 15:13:30 +00:00
|
|
|
|
>STYA ZPPtr3
|
|
|
|
|
stx PWD.hGrpDB
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-09-10 10:43:37 +00:00
|
|
|
|
ldy #PWDX.GROUP.Size-1
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-09 15:13:30 +00:00
|
|
|
|
.3 lda PWDX.GROUP,y
|
|
|
|
|
sta (ZPPtr3),y
|
|
|
|
|
dey
|
|
|
|
|
bpl .3
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-08 15:26:23 +00:00
|
|
|
|
clc
|
2020-07-09 15:13:30 +00:00
|
|
|
|
.9 rts
|
2020-07-08 15:26:23 +00:00
|
|
|
|
*--------------------------------------
|
2020-07-09 15:13:30 +00:00
|
|
|
|
PWDX.PutPW.1 jsr K.GetmemPtr
|
2020-07-08 15:26:23 +00:00
|
|
|
|
>STYA ZPPtr3
|
2019-04-19 05:42:43 +00:00
|
|
|
|
|
2019-04-29 05:59:01 +00:00
|
|
|
|
ldy #S.PW.PASSWD
|
2019-07-28 20:39:30 +00:00
|
|
|
|
jsr SHARED.TXTPTR.GetY
|
2019-04-29 05:59:01 +00:00
|
|
|
|
bne .12
|
2019-10-11 13:06:33 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.FindRecord
|
2020-07-31 10:28:04 +00:00
|
|
|
|
bcs .99
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jmp PWDX.DeleteRecord
|
2020-07-08 15:26:23 +00:00
|
|
|
|
*--------------------------------------
|
2020-09-10 06:28:51 +00:00
|
|
|
|
.12 jsr PWDX.FindRecord
|
2020-07-08 15:26:23 +00:00
|
|
|
|
bcs .11
|
2019-10-11 13:06:33 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.DeleteRecord
|
2020-07-31 10:28:04 +00:00
|
|
|
|
bcs .99
|
|
|
|
|
bra .13
|
2020-07-08 15:26:23 +00:00
|
|
|
|
*--------------------------------------
|
2020-09-10 06:28:51 +00:00
|
|
|
|
.11 jsr PWDX.GetUID new user, get UID
|
2019-04-26 15:07:22 +00:00
|
|
|
|
bcs .99
|
2020-02-11 16:32:33 +00:00
|
|
|
|
|
2019-04-26 15:07:22 +00:00
|
|
|
|
ldy #S.PW.UID
|
|
|
|
|
sta CLRWRITEAUX
|
|
|
|
|
sta (TXTPTR),y
|
|
|
|
|
sta SETWRITEAUX
|
2020-07-09 11:34:07 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
.13 jsr PWDX.GetRecordLen
|
2019-04-23 15:47:40 +00:00
|
|
|
|
|
2019-04-19 05:42:43 +00:00
|
|
|
|
clc
|
2020-03-12 16:44:11 +00:00
|
|
|
|
adc PWD.UsrDBSize
|
|
|
|
|
sta PWD.UsrDBSize
|
2020-07-09 11:34:07 +00:00
|
|
|
|
tay
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-08 15:26:23 +00:00
|
|
|
|
lda #0
|
|
|
|
|
adc PWD.UsrDBSize+1
|
|
|
|
|
sta PWD.UsrDBSize+1
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-09-11 15:01:48 +00:00
|
|
|
|
iny
|
|
|
|
|
bne .14
|
|
|
|
|
|
|
|
|
|
inc
|
|
|
|
|
|
|
|
|
|
.14 jsr K.Getmem
|
2019-04-23 15:47:40 +00:00
|
|
|
|
bcs .99
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2019-04-23 15:47:40 +00:00
|
|
|
|
>STYA ZPPtr3
|
2019-04-25 15:33:56 +00:00
|
|
|
|
|
2020-07-09 11:34:07 +00:00
|
|
|
|
lda PWD.hUsrDB
|
|
|
|
|
jsr K.GetMemPtr
|
|
|
|
|
>STYA ZPPtr4
|
|
|
|
|
|
|
|
|
|
ldy #0
|
|
|
|
|
|
|
|
|
|
.3 lda (ZPPtr4),y
|
|
|
|
|
sta (ZPPtr3),y
|
|
|
|
|
beq .4
|
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
bne .3
|
|
|
|
|
inc ZPPtr4
|
|
|
|
|
inc ZPPtr3
|
|
|
|
|
bra .3
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-09 11:34:07 +00:00
|
|
|
|
.4 lda PWD.hUsrDB
|
|
|
|
|
stx PWD.hUsrDB
|
|
|
|
|
jsr K.Freemem
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-09 11:34:07 +00:00
|
|
|
|
lda PWD.hUsrDB
|
|
|
|
|
jsr K.GetMemPtr
|
|
|
|
|
>STYA ZPPtr3
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.AppendRecord
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
|
|
|
|
lda #0
|
2020-08-02 12:19:43 +00:00
|
|
|
|
jsr PWDX.StoreChar
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-08 15:26:23 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2019-10-11 13:06:33 +00:00
|
|
|
|
|
2019-04-11 15:59:57 +00:00
|
|
|
|
.9 lda #E.IPWDDB
|
|
|
|
|
sec
|
2020-07-30 15:45:10 +00:00
|
|
|
|
.99 rts
|
2019-04-11 15:59:57 +00:00
|
|
|
|
*--------------------------------------
|
2020-07-13 19:29:31 +00:00
|
|
|
|
PWDX.GetGRGID lda PWD.hGrpDB
|
2020-09-10 06:28:51 +00:00
|
|
|
|
beq PWDX.GetGR.9
|
2020-02-17 16:55:02 +00:00
|
|
|
|
|
2020-07-13 19:29:31 +00:00
|
|
|
|
jsr K.GetmemPtr
|
|
|
|
|
>STYA ZPPtr3
|
|
|
|
|
|
|
|
|
|
.1 lda (ZPPtr3)
|
2020-09-10 06:28:51 +00:00
|
|
|
|
beq PWDX.GetGR.99 EOF
|
2020-07-13 19:29:31 +00:00
|
|
|
|
|
|
|
|
|
ldy #0
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.NextString skip USERNAME
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.GetByte get UID
|
2020-07-13 19:29:31 +00:00
|
|
|
|
cmp ZPPtr1+1
|
2020-09-10 06:28:51 +00:00
|
|
|
|
beq PWDX.GetGR.8
|
2020-07-13 19:29:31 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.NextLine
|
2020-07-13 19:29:31 +00:00
|
|
|
|
bra .1
|
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
PWDX.GetGR.8 ldx FORPNT+1
|
2020-07-13 19:29:31 +00:00
|
|
|
|
beq .8 Dry run, no output
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jmp PWDX.Record2GR
|
2020-07-13 19:29:31 +00:00
|
|
|
|
|
|
|
|
|
.8 clc a = UID
|
|
|
|
|
rts
|
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
PWDX.GetGR.9 lda #E.IPWDDB
|
2020-07-13 19:29:31 +00:00
|
|
|
|
.HS 2C BIT ABS
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
PWDX.GetGR.99 lda #E.IUSR
|
2020-07-13 19:29:31 +00:00
|
|
|
|
sec
|
2020-09-10 06:28:51 +00:00
|
|
|
|
PWDX.GetGR.RTS rts
|
2020-02-17 16:55:02 +00:00
|
|
|
|
*--------------------------------------
|
2020-07-16 06:18:17 +00:00
|
|
|
|
PWDX.GetGRName lda PWD.hGrpDB
|
2020-09-10 06:28:51 +00:00
|
|
|
|
beq PWDX.GetGR.9
|
2020-07-16 06:18:17 +00:00
|
|
|
|
|
|
|
|
|
jsr K.GetmemPtr
|
|
|
|
|
>STYA ZPPtr3
|
|
|
|
|
|
|
|
|
|
ldy #0
|
|
|
|
|
jsr SHARED.TXTPTR.GetY
|
2020-09-10 06:28:51 +00:00
|
|
|
|
beq PWDX.GetGR.99
|
2020-07-16 06:18:17 +00:00
|
|
|
|
|
|
|
|
|
.1 lda (ZPPtr3)
|
2020-09-10 06:28:51 +00:00
|
|
|
|
beq PWDX.GetGR.99
|
2020-07-16 06:18:17 +00:00
|
|
|
|
|
|
|
|
|
ldy #$ff
|
|
|
|
|
.2 iny
|
|
|
|
|
jsr SHARED.TXTPTR.GetY
|
|
|
|
|
beq .4
|
|
|
|
|
|
|
|
|
|
cmp (ZPPtr3),y
|
|
|
|
|
beq .2
|
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
.3 jsr PWDX.NextLine
|
2020-07-16 06:18:17 +00:00
|
|
|
|
bra .1
|
|
|
|
|
|
|
|
|
|
.4 lda (ZPPtr3),y
|
|
|
|
|
cmp #':'
|
|
|
|
|
bne .3
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-16 06:18:17 +00:00
|
|
|
|
ldx FORPNT+1
|
|
|
|
|
beq .8
|
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jmp PWDX.Record2GR
|
2020-07-16 06:18:17 +00:00
|
|
|
|
|
|
|
|
|
.8 iny
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jmp PWDX.GetByte get GID
|
2020-02-17 16:55:02 +00:00
|
|
|
|
*--------------------------------------
|
2020-07-14 20:17:15 +00:00
|
|
|
|
PWDX.PutGR lda PWD.hGrpDB
|
2020-09-10 06:28:51 +00:00
|
|
|
|
beq PWDX.GetGR.9
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-14 20:17:15 +00:00
|
|
|
|
jsr K.GetmemPtr
|
|
|
|
|
>STYA ZPPtr3
|
|
|
|
|
|
|
|
|
|
|
2020-03-12 16:44:11 +00:00
|
|
|
|
lda #E.IPWDDB
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
PWDX.OpenSession
|
|
|
|
|
lda PWD.hUsrDB
|
|
|
|
|
beq .1
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
|
|
|
|
lda TXTPTR+1
|
2020-07-08 15:26:23 +00:00
|
|
|
|
bne .3
|
2020-03-12 16:44:11 +00:00
|
|
|
|
|
2020-08-02 12:19:43 +00:00
|
|
|
|
.1 >LDYAI PWDX.ROOTSESSION.Size
|
2020-03-12 16:44:11 +00:00
|
|
|
|
jsr K.GetMem
|
2020-07-08 15:26:23 +00:00
|
|
|
|
bcs .9
|
2020-03-12 16:44:11 +00:00
|
|
|
|
|
|
|
|
|
>STYA ZPPtr1
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-08-02 12:19:43 +00:00
|
|
|
|
ldy #PWDX.ROOTSESSION.Size-1
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-08-02 12:19:43 +00:00
|
|
|
|
.2 lda PWDX.ROOTSESSION,y
|
2020-03-12 16:44:11 +00:00
|
|
|
|
sta (ZPPtr1),y
|
|
|
|
|
dey
|
|
|
|
|
bpl .2
|
2020-03-13 16:10:36 +00:00
|
|
|
|
|
2020-03-12 16:44:11 +00:00
|
|
|
|
txa
|
|
|
|
|
clc
|
|
|
|
|
rts
|
2020-08-02 12:19:43 +00:00
|
|
|
|
*--------------------------------------
|
2020-09-10 06:28:51 +00:00
|
|
|
|
.3 jsr PWDX.FindRecord
|
2020-07-08 15:26:23 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
tya Y = Name length +1
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-08 15:26:23 +00:00
|
|
|
|
* clc
|
|
|
|
|
adc ZPPtr3
|
|
|
|
|
sta ZPPtr4
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-08 15:26:23 +00:00
|
|
|
|
lda ZPPtr3+1
|
|
|
|
|
adc #0
|
|
|
|
|
sta ZPPtr4+1
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-08 15:26:23 +00:00
|
|
|
|
ldy #31
|
|
|
|
|
|
|
|
|
|
.5 jsr SHARED.FORPNT.getY
|
|
|
|
|
cmp (ZPPtr4),y Check MD5
|
|
|
|
|
bne .9
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-08 15:26:23 +00:00
|
|
|
|
dey
|
|
|
|
|
bpl .5
|
|
|
|
|
|
2020-08-02 12:19:43 +00:00
|
|
|
|
jsr PWDX.GetSessionLen
|
|
|
|
|
|
2020-07-08 15:26:23 +00:00
|
|
|
|
jsr K.Getmem
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
>STYA ZPPtr2
|
2020-08-02 12:19:43 +00:00
|
|
|
|
phx
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-08-02 12:19:43 +00:00
|
|
|
|
jsr PWDX.Record2Session
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
2020-08-02 12:19:43 +00:00
|
|
|
|
pla
|
2020-07-08 15:26:23 +00:00
|
|
|
|
clc
|
|
|
|
|
.9 rts
|
2020-03-12 16:44:11 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
PWDX.CloseSession
|
2020-08-02 12:19:43 +00:00
|
|
|
|
jmp K.Freemem
|
2020-02-17 16:55:02 +00:00
|
|
|
|
*--------------------------------------
|
2019-07-29 15:38:55 +00:00
|
|
|
|
* PRIVATE
|
2019-04-25 15:33:56 +00:00
|
|
|
|
*--------------------------------------
|
2020-09-10 06:28:51 +00:00
|
|
|
|
PWDX.GetUID lda PWD.hUsrDB
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
|
|
|
|
jsr K.GetmemPtr
|
2019-04-11 15:59:57 +00:00
|
|
|
|
>STYA ZPPtr3
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
2019-04-26 15:07:22 +00:00
|
|
|
|
stz .8+1
|
|
|
|
|
.1 lda (ZPPtr3)
|
|
|
|
|
beq .8 End of DB
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
2019-04-26 15:07:22 +00:00
|
|
|
|
ldy #0
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.NextString skip name
|
|
|
|
|
jsr PWDX.NextString skip password
|
|
|
|
|
jsr PWDX.GetByte
|
2019-04-26 15:07:22 +00:00
|
|
|
|
cmp .8+1
|
|
|
|
|
bcc .4
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
2019-04-26 15:07:22 +00:00
|
|
|
|
sta .8+1
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
.4 jsr PWDX.NextLine
|
2019-04-26 15:07:22 +00:00
|
|
|
|
bra .1
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
2019-04-26 15:07:22 +00:00
|
|
|
|
.8 lda #$ff SELF MODIFIED
|
|
|
|
|
inc
|
|
|
|
|
beq .9
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
2019-04-25 15:33:56 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
2019-04-26 15:07:22 +00:00
|
|
|
|
.9 lda #E.IUSR
|
|
|
|
|
sec
|
|
|
|
|
rts
|
2019-04-19 05:42:43 +00:00
|
|
|
|
*--------------------------------------
|
2020-09-10 06:28:51 +00:00
|
|
|
|
PWDX.DeleteRecord
|
2019-04-23 15:47:40 +00:00
|
|
|
|
.1 iny
|
|
|
|
|
lda (ZPPtr3),y
|
|
|
|
|
cmp #C.CR
|
|
|
|
|
bne .1
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
2019-04-30 16:08:47 +00:00
|
|
|
|
sty .3+1
|
2019-04-23 15:47:40 +00:00
|
|
|
|
tya
|
|
|
|
|
sec
|
|
|
|
|
adc ZPPtr3
|
|
|
|
|
sta ZPPtr4
|
|
|
|
|
lda ZPPtr3+1
|
|
|
|
|
adc #0
|
|
|
|
|
sta ZPPtr4+1
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
2019-04-23 15:47:40 +00:00
|
|
|
|
ldy #$ff
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
2019-04-23 15:47:40 +00:00
|
|
|
|
.2 iny
|
|
|
|
|
lda (ZPPtr4),y
|
|
|
|
|
sta (ZPPtr3),y
|
|
|
|
|
bne .2
|
|
|
|
|
|
2020-03-12 16:44:11 +00:00
|
|
|
|
lda PWD.UsrDBSize
|
2019-04-23 15:47:40 +00:00
|
|
|
|
sec
|
2019-04-30 16:08:47 +00:00
|
|
|
|
.3 sbc #$ff SELF MODIFIED
|
2020-03-12 16:44:11 +00:00
|
|
|
|
sta PWD.UsrDBSize
|
2019-04-30 16:08:47 +00:00
|
|
|
|
bcs .8
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
2020-07-30 15:45:10 +00:00
|
|
|
|
dec PWD.UsrDBSize+1
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
2019-04-30 16:08:47 +00:00
|
|
|
|
.8 clc
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2019-10-03 06:25:27 +00:00
|
|
|
|
.9 rts
|
2019-04-23 15:47:40 +00:00
|
|
|
|
*--------------------------------------
|
2020-09-10 06:28:51 +00:00
|
|
|
|
PWDX.FindRecord lda PWD.hUsrDB
|
2020-07-08 15:26:23 +00:00
|
|
|
|
jsr K.GetmemPtr
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2019-04-19 05:42:43 +00:00
|
|
|
|
>STYA ZPPtr3
|
|
|
|
|
|
|
|
|
|
.2 lda (ZPPtr3)
|
|
|
|
|
beq .9 End of DB
|
|
|
|
|
|
|
|
|
|
ldy #$ff
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
2019-04-19 05:42:43 +00:00
|
|
|
|
.3 iny
|
2019-07-28 20:39:30 +00:00
|
|
|
|
jsr SHARED.TXTPTR.GetY
|
2019-04-23 15:47:40 +00:00
|
|
|
|
beq .4
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
2019-04-19 05:42:43 +00:00
|
|
|
|
cmp (ZPPtr3),y
|
2019-04-23 15:47:40 +00:00
|
|
|
|
beq .3
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
.5 jsr PWDX.NextLine
|
2019-04-25 15:33:56 +00:00
|
|
|
|
bra .2
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
2019-04-29 15:47:17 +00:00
|
|
|
|
.4 lda (ZPPtr3),y
|
|
|
|
|
cmp #':'
|
|
|
|
|
bne .5
|
2019-04-25 15:33:56 +00:00
|
|
|
|
|
2020-07-08 15:26:23 +00:00
|
|
|
|
iny skip ":"
|
|
|
|
|
|
2019-04-29 15:47:17 +00:00
|
|
|
|
clc
|
2019-04-25 15:33:56 +00:00
|
|
|
|
rts
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
2019-04-29 05:59:01 +00:00
|
|
|
|
.9 lda #E.IUSR
|
|
|
|
|
sec
|
2019-04-25 15:33:56 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-08-02 12:19:43 +00:00
|
|
|
|
* Record : USERNAME:PASSWORD:UID:GID:GECOS:HOME:SHELL\CR
|
2020-07-08 15:26:23 +00:00
|
|
|
|
*--------------------------------------
|
2020-09-10 06:28:51 +00:00
|
|
|
|
PWDX.Record2PW ldy #0
|
2019-04-12 15:41:05 +00:00
|
|
|
|
|
|
|
|
|
ldx #0 NAME
|
|
|
|
|
|
|
|
|
|
.1 lda (ZPPtr3),y
|
|
|
|
|
iny
|
|
|
|
|
cmp #':'
|
|
|
|
|
beq .2
|
2020-07-13 19:29:31 +00:00
|
|
|
|
|
2020-02-17 16:55:02 +00:00
|
|
|
|
jsr SHARED.FORPNT.PutNext
|
2019-04-12 15:41:05 +00:00
|
|
|
|
inx
|
|
|
|
|
bra .1
|
2020-07-13 19:29:31 +00:00
|
|
|
|
|
2019-04-12 15:41:05 +00:00
|
|
|
|
.2 lda #0
|
2020-02-17 16:55:02 +00:00
|
|
|
|
jsr SHARED.FORPNT.PutNext
|
2019-04-12 15:41:05 +00:00
|
|
|
|
inx
|
|
|
|
|
cpx #S.PW.PASSWD
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
.3 lda (ZPPtr3),y
|
|
|
|
|
iny
|
|
|
|
|
cmp #':'
|
|
|
|
|
beq .4
|
|
|
|
|
|
2020-02-17 16:55:02 +00:00
|
|
|
|
jsr SHARED.FORPNT.PutNext
|
2019-04-12 15:41:05 +00:00
|
|
|
|
inx
|
|
|
|
|
bra .3
|
|
|
|
|
|
|
|
|
|
.4 lda #0
|
2020-02-17 16:55:02 +00:00
|
|
|
|
jsr SHARED.FORPNT.PutNext
|
2019-04-12 15:41:05 +00:00
|
|
|
|
inx
|
|
|
|
|
cpx #S.PW.UID
|
|
|
|
|
bne .4
|
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.GetByte UID
|
2020-02-17 16:55:02 +00:00
|
|
|
|
jsr SHARED.FORPNT.PutNext
|
2019-04-12 15:41:05 +00:00
|
|
|
|
|
2020-07-13 19:29:31 +00:00
|
|
|
|
iny
|
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.GetByte GID
|
2020-02-17 16:55:02 +00:00
|
|
|
|
jsr SHARED.FORPNT.PutNext
|
2019-04-12 15:41:05 +00:00
|
|
|
|
|
2020-07-13 19:29:31 +00:00
|
|
|
|
iny
|
|
|
|
|
|
2019-04-12 15:41:05 +00:00
|
|
|
|
ldx #S.PW.GECOS
|
|
|
|
|
|
|
|
|
|
.5 lda (ZPPtr3),y
|
|
|
|
|
iny
|
|
|
|
|
cmp #':'
|
|
|
|
|
beq .6
|
2020-02-17 16:55:02 +00:00
|
|
|
|
jsr SHARED.FORPNT.PutNext
|
2019-04-12 15:41:05 +00:00
|
|
|
|
inx
|
|
|
|
|
bra .5
|
|
|
|
|
.6 lda #0
|
2020-02-17 16:55:02 +00:00
|
|
|
|
jsr SHARED.FORPNT.PutNext
|
2019-04-12 15:41:05 +00:00
|
|
|
|
inx
|
|
|
|
|
cpx #S.PW.DIR
|
|
|
|
|
bne .6
|
|
|
|
|
|
|
|
|
|
.7 lda (ZPPtr3),y
|
|
|
|
|
iny
|
|
|
|
|
cmp #':'
|
|
|
|
|
beq .8
|
2020-02-17 16:55:02 +00:00
|
|
|
|
jsr SHARED.FORPNT.PutNext
|
2019-04-12 15:41:05 +00:00
|
|
|
|
inx
|
|
|
|
|
bra .7
|
|
|
|
|
.8 lda #0
|
2020-02-17 16:55:02 +00:00
|
|
|
|
jsr SHARED.FORPNT.PutNext
|
2019-04-12 15:41:05 +00:00
|
|
|
|
inx
|
|
|
|
|
cpx #S.PW.SHELL
|
|
|
|
|
bne .8
|
|
|
|
|
|
|
|
|
|
.9 lda (ZPPtr3),y
|
|
|
|
|
iny
|
|
|
|
|
cmp #C.CR
|
|
|
|
|
beq .10
|
2020-02-17 16:55:02 +00:00
|
|
|
|
jsr SHARED.FORPNT.PutNext
|
2019-04-12 15:41:05 +00:00
|
|
|
|
inx
|
|
|
|
|
bra .9
|
|
|
|
|
.10 lda #0
|
2020-02-17 16:55:02 +00:00
|
|
|
|
jsr SHARED.FORPNT.PutNext
|
|
|
|
|
|
2019-04-12 15:41:05 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-09-10 06:28:51 +00:00
|
|
|
|
PWDX.Record2GR ldy #0
|
2020-07-13 19:29:31 +00:00
|
|
|
|
|
|
|
|
|
ldx #0 NAME
|
2019-04-12 15:41:05 +00:00
|
|
|
|
|
|
|
|
|
.1 lda (ZPPtr3),y
|
|
|
|
|
iny
|
2020-07-13 19:29:31 +00:00
|
|
|
|
cmp #':'
|
|
|
|
|
beq .2
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-13 19:29:31 +00:00
|
|
|
|
jsr SHARED.FORPNT.PutNext
|
|
|
|
|
inx
|
|
|
|
|
bra .1
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-13 19:29:31 +00:00
|
|
|
|
.2 lda #0
|
|
|
|
|
jsr SHARED.FORPNT.PutNext
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.GetByte UID
|
2020-07-13 19:29:31 +00:00
|
|
|
|
jsr SHARED.FORPNT.PutNext
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-08-02 12:19:43 +00:00
|
|
|
|
* Record : USERNAME:PASSWORD:UID:GID:GECOS:HOME:SHELL\CR
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
PWDX.GetSessionLen
|
|
|
|
|
ldy #0
|
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.NextString USERNAME
|
2020-08-02 12:19:43 +00:00
|
|
|
|
tya
|
|
|
|
|
clc
|
|
|
|
|
adc #S.SESSION.NAME
|
|
|
|
|
tax
|
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.NextString skip PASSWORD
|
|
|
|
|
jsr PWDX.NextString skip UID
|
|
|
|
|
jsr PWDX.NextString skip GID
|
2020-08-02 12:19:43 +00:00
|
|
|
|
|
|
|
|
|
.1 inx
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPPtr3),y
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
eor #C.CR
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
.8 phx A = 0
|
|
|
|
|
ply
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
PWDX.Record2Session
|
|
|
|
|
ldy #0
|
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.NextString skip USERNAME
|
|
|
|
|
jsr PWDX.NextString skip PASSWORD
|
|
|
|
|
jsr PWDX.GetByte get UID
|
2020-08-02 12:19:43 +00:00
|
|
|
|
sta ZPPtr1
|
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.GetByte get GID
|
2020-08-02 12:19:43 +00:00
|
|
|
|
sta ZPPtr1+1
|
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
|
ldx ZPPtr1
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
ora #S.SESSION.P.ROOT
|
|
|
|
|
|
|
|
|
|
.1 ldx ZPPtr1+1
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
ora #S.SESSION.P.SYSADMIN
|
|
|
|
|
|
|
|
|
|
.2 jsr SHARED.PutCharPtr2
|
|
|
|
|
|
|
|
|
|
lda ZPPtr1
|
|
|
|
|
jsr SHARED.PutCharPtr2 UID
|
|
|
|
|
|
|
|
|
|
lda ZPPtr1+1
|
|
|
|
|
jsr SHARED.PutCharPtr2 GID
|
|
|
|
|
|
|
|
|
|
phy
|
|
|
|
|
|
|
|
|
|
ldy #$ff
|
|
|
|
|
|
|
|
|
|
.3 iny
|
|
|
|
|
lda (ZPPtr3),y
|
|
|
|
|
cmp #':'
|
|
|
|
|
beq .4
|
|
|
|
|
|
|
|
|
|
jsr SHARED.PutCharPtr2
|
|
|
|
|
bra .3
|
|
|
|
|
|
|
|
|
|
.4 lda #0
|
|
|
|
|
jsr SHARED.PutCharPtr2
|
|
|
|
|
|
|
|
|
|
ply
|
|
|
|
|
|
|
|
|
|
.5 lda (ZPPtr3),y
|
|
|
|
|
cmp #C.CR
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
cmp #':'
|
|
|
|
|
bne .6
|
|
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
|
|
|
|
|
|
.6 jsr SHARED.PutCharPtr2
|
|
|
|
|
iny
|
|
|
|
|
bra .5
|
|
|
|
|
|
|
|
|
|
.8 lda #0
|
|
|
|
|
jmp SHARED.PutCharPtr2
|
|
|
|
|
*--------------------------------------
|
2020-09-10 06:28:51 +00:00
|
|
|
|
PWDX.NextString lda (ZPPtr3),y
|
2020-07-13 19:29:31 +00:00
|
|
|
|
beq .8
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-13 19:29:31 +00:00
|
|
|
|
iny
|
|
|
|
|
cmp #':'
|
2020-09-10 06:28:51 +00:00
|
|
|
|
bne PWDX.NextString
|
2020-07-13 19:29:31 +00:00
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
2020-09-10 06:28:51 +00:00
|
|
|
|
PWDX.NextLine lda (ZPPtr3),y
|
2020-07-13 19:29:31 +00:00
|
|
|
|
beq .8
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-13 19:29:31 +00:00
|
|
|
|
iny
|
|
|
|
|
cmp #C.CR
|
2020-09-10 06:28:51 +00:00
|
|
|
|
bne PWDX.NextLine
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-13 19:29:31 +00:00
|
|
|
|
tya
|
|
|
|
|
clc
|
|
|
|
|
adc ZPPtr3
|
|
|
|
|
sta ZPPtr3
|
|
|
|
|
bcc .8
|
|
|
|
|
inc ZPPtr3+1
|
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
2020-09-10 06:28:51 +00:00
|
|
|
|
PWDX.GetByte stz .8+1
|
2020-07-13 19:29:31 +00:00
|
|
|
|
|
|
|
|
|
.1 lda (ZPPtr3),y
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
cmp #C.CR
|
|
|
|
|
beq .8
|
|
|
|
|
|
2019-04-12 15:41:05 +00:00
|
|
|
|
cmp #':'
|
|
|
|
|
beq .8
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
2019-04-12 15:41:05 +00:00
|
|
|
|
and #$f
|
|
|
|
|
pha
|
2020-07-08 15:26:23 +00:00
|
|
|
|
lda .8+1
|
2019-04-12 15:41:05 +00:00
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
clc
|
2020-07-08 15:26:23 +00:00
|
|
|
|
adc .8+1
|
2019-04-12 15:41:05 +00:00
|
|
|
|
asl
|
2020-07-08 15:26:23 +00:00
|
|
|
|
sta .8+1
|
2019-04-12 15:41:05 +00:00
|
|
|
|
pla
|
|
|
|
|
clc
|
2020-07-08 15:26:23 +00:00
|
|
|
|
adc .8+1
|
|
|
|
|
sta .8+1
|
2020-07-13 19:29:31 +00:00
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
|
2019-04-12 15:41:05 +00:00
|
|
|
|
bra .1
|
2020-07-08 15:26:23 +00:00
|
|
|
|
|
|
|
|
|
.8 lda #$ff SELF MODIFIED
|
|
|
|
|
|
2019-06-11 05:52:24 +00:00
|
|
|
|
clc
|
2019-04-12 15:41:05 +00:00
|
|
|
|
rts
|
2019-04-09 15:47:33 +00:00
|
|
|
|
*--------------------------------------
|
2020-09-10 06:28:51 +00:00
|
|
|
|
PWDX.AppendRecord
|
2020-07-08 15:26:23 +00:00
|
|
|
|
.1 lda (ZPPtr3)
|
|
|
|
|
beq .8
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2020-07-08 15:26:23 +00:00
|
|
|
|
inc ZPPtr3
|
|
|
|
|
bne .1
|
|
|
|
|
inc ZPPtr3+1
|
|
|
|
|
bra .1
|
|
|
|
|
|
|
|
|
|
.8 sec
|
2019-04-11 15:59:57 +00:00
|
|
|
|
.HS 90 BCC
|
|
|
|
|
*--------------------------------------
|
2020-09-10 06:28:51 +00:00
|
|
|
|
PWDX.GetRecordLen
|
2019-04-11 15:59:57 +00:00
|
|
|
|
clc
|
|
|
|
|
ldx #0
|
2020-07-30 15:45:10 +00:00
|
|
|
|
ldy #S.PW.NAME
|
2019-04-11 15:59:57 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.StoreString
|
2019-04-11 15:59:57 +00:00
|
|
|
|
lda #':'
|
2020-08-02 12:19:43 +00:00
|
|
|
|
jsr PWDX.StoreChar
|
2020-07-30 15:45:10 +00:00
|
|
|
|
ldy #S.PW.PASSWD
|
2019-04-11 15:59:57 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.StoreString
|
2019-04-12 15:41:05 +00:00
|
|
|
|
|
2019-04-11 15:59:57 +00:00
|
|
|
|
lda #':'
|
2020-08-02 12:19:43 +00:00
|
|
|
|
jsr PWDX.StoreChar
|
2019-04-11 15:59:57 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.PW.UID
|
2019-07-28 20:39:30 +00:00
|
|
|
|
jsr SHARED.TXTPTR.GetY
|
2020-08-02 12:19:43 +00:00
|
|
|
|
jsr PWDX.StoreByte
|
2019-04-11 15:59:57 +00:00
|
|
|
|
|
|
|
|
|
lda #':'
|
2020-08-02 12:19:43 +00:00
|
|
|
|
jsr PWDX.StoreChar
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2019-10-16 20:42:21 +00:00
|
|
|
|
ldy #S.PW.GID
|
2019-07-28 20:39:30 +00:00
|
|
|
|
jsr SHARED.TXTPTR.GetY
|
2020-08-02 12:19:43 +00:00
|
|
|
|
jsr PWDX.StoreByte
|
2019-04-11 15:59:57 +00:00
|
|
|
|
lda #':'
|
2020-08-02 12:19:43 +00:00
|
|
|
|
jsr PWDX.StoreChar
|
2019-04-11 15:59:57 +00:00
|
|
|
|
|
2020-07-30 15:45:10 +00:00
|
|
|
|
ldy #S.PW.GECOS
|
2019-04-11 15:59:57 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.StoreString
|
2019-04-11 15:59:57 +00:00
|
|
|
|
lda #':'
|
2020-08-02 12:19:43 +00:00
|
|
|
|
jsr PWDX.StoreChar
|
2019-04-11 15:59:57 +00:00
|
|
|
|
|
2020-07-30 15:45:10 +00:00
|
|
|
|
ldy #S.PW.DIR
|
2019-04-11 15:59:57 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.StoreString
|
2019-04-11 15:59:57 +00:00
|
|
|
|
lda #':'
|
2020-08-02 12:19:43 +00:00
|
|
|
|
jsr PWDX.StoreChar
|
2019-04-11 15:59:57 +00:00
|
|
|
|
|
2020-07-30 15:45:10 +00:00
|
|
|
|
ldy #S.PW.SHELL
|
2019-04-11 15:59:57 +00:00
|
|
|
|
|
2020-09-10 06:28:51 +00:00
|
|
|
|
jsr PWDX.StoreString
|
2019-04-11 15:59:57 +00:00
|
|
|
|
lda #C.CR
|
2020-08-02 12:19:43 +00:00
|
|
|
|
jsr PWDX.StoreChar
|
2019-04-11 15:59:57 +00:00
|
|
|
|
|
|
|
|
|
txa
|
2020-09-10 06:28:51 +00:00
|
|
|
|
PWDX.GetRecordLen.RTS
|
2019-04-11 15:59:57 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-09-10 06:28:51 +00:00
|
|
|
|
PWDX.StoreString
|
|
|
|
|
jsr SHARED.TXTPTR.GetY
|
|
|
|
|
beq PWDX.GetRecordLen.RTS
|
2020-08-02 12:19:43 +00:00
|
|
|
|
jsr PWDX.StoreChar
|
2020-07-13 19:29:31 +00:00
|
|
|
|
iny
|
2020-09-10 06:28:51 +00:00
|
|
|
|
bra PWDX.StoreString
|
2019-04-12 15:41:05 +00:00
|
|
|
|
*--------------------------------------
|
2020-08-02 12:19:43 +00:00
|
|
|
|
PWDX.StoreByte php
|
2019-04-11 15:59:57 +00:00
|
|
|
|
phx
|
2020-03-16 06:50:15 +00:00
|
|
|
|
jsr MATH32.A2STR10NP
|
2019-04-11 15:59:57 +00:00
|
|
|
|
plx
|
2019-04-12 15:41:05 +00:00
|
|
|
|
plp
|
2020-07-13 19:29:31 +00:00
|
|
|
|
|
2019-06-24 15:32:22 +00:00
|
|
|
|
ldy #0
|
2020-07-30 15:45:10 +00:00
|
|
|
|
|
2019-07-03 15:25:07 +00:00
|
|
|
|
.1 lda A2osX.NumStrBuf,y
|
2020-09-10 06:28:51 +00:00
|
|
|
|
beq PWDX.GetRecordLen.RTS
|
2019-06-24 15:32:22 +00:00
|
|
|
|
iny
|
2020-08-02 12:19:43 +00:00
|
|
|
|
jsr PWDX.StoreChar
|
2019-06-24 15:32:22 +00:00
|
|
|
|
bra .1
|
2019-04-11 15:59:57 +00:00
|
|
|
|
*--------------------------------------
|
2020-08-02 12:19:43 +00:00
|
|
|
|
PWDX.StoreChar inx
|
2019-04-12 15:41:05 +00:00
|
|
|
|
bcc .9 Dry run, no store
|
2019-04-11 15:59:57 +00:00
|
|
|
|
sta (ZPPtr3)
|
|
|
|
|
inc ZPPtr3
|
|
|
|
|
bne .9
|
|
|
|
|
inc ZPPtr3+1
|
2019-10-03 06:25:27 +00:00
|
|
|
|
.9 rts
|
2019-04-11 15:59:57 +00:00
|
|
|
|
*--------------------------------------
|
2020-08-02 12:19:43 +00:00
|
|
|
|
PWDX.ROOTSESSION
|
|
|
|
|
.DA #S.SESSION.P.ROOT
|
2020-03-12 16:44:11 +00:00
|
|
|
|
.DA #0 UID
|
|
|
|
|
.DA #0 GID
|
|
|
|
|
.AZ "root" NAME
|
|
|
|
|
.AZ "Root User" GECOS
|
|
|
|
|
.AZ "${ROOT}root/" DIR
|
|
|
|
|
.AZ "${ROOT}bin/sh" SHELL
|
2020-08-02 12:19:43 +00:00
|
|
|
|
PWDX.ROOTSESSION.Size .EQ *-PWDX.ROOTSESSION
|
2020-03-12 16:44:11 +00:00
|
|
|
|
*--------------------------------------
|
2020-07-09 15:13:30 +00:00
|
|
|
|
PWDX.GROUP .AS "root:0"
|
|
|
|
|
.DA #C.CR
|
|
|
|
|
.AS "users:1"
|
|
|
|
|
.DA #C.CR
|
|
|
|
|
PWDX.GROUP.Size .EQ *-PWDX.GROUP
|
|
|
|
|
*--------------------------------------
|
2019-04-09 15:47:33 +00:00
|
|
|
|
MAN
|
|
|
|
|
SAVE USR/SRC/SYS/KERNEL.S.PWDX
|
|
|
|
|
LOAD USR/SRC/SYS/KERNEL.S
|
|
|
|
|
ASM
|